@e-llm-studio/instant-learning 1.3.3 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ILMarketplaceWrapper.js +3 -0
- package/dist/ILMarketplaceWrapper.js.map +1 -1
- package/dist/cjs/ILMarketplaceWrapper.js +3 -0
- package/dist/cjs/ILMarketplaceWrapper.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js +5 -2
- package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +12 -4
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/NormalChat.js +13 -4
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/NormalChat.js.map +1 -1
- package/dist/cjs/features/IL-marketplace/PromoteFlow/EnvironmentConfigurationModal.js +41 -4
- package/dist/cjs/features/IL-marketplace/PromoteFlow/EnvironmentConfigurationModal.js.map +1 -1
- package/dist/cjs/features/IL-marketplace/PromoteFlow/PromoteFlow.js +444 -169
- package/dist/cjs/features/IL-marketplace/PromoteFlow/PromoteFlow.js.map +1 -1
- package/dist/cjs/features/IL-marketplace/PromoteFlow/PromoteFlow.module.css.js +2 -2
- package/dist/cjs/features/IL-marketplace/PromoteFlow/promote-flow.api.js +19 -2
- package/dist/cjs/features/IL-marketplace/PromoteFlow/promote-flow.api.js.map +1 -1
- package/dist/cjs/features/IL-marketplace/PromoteFlow/promote-flow.store.js +7 -0
- package/dist/cjs/features/IL-marketplace/PromoteFlow/promote-flow.store.js.map +1 -1
- package/dist/cjs/features/InstantLearning/InstantLearning.js +1 -0
- package/dist/cjs/features/InstantLearning/InstantLearning.js.map +1 -1
- package/dist/cjs/features/InstantLearning/_components/ChatComponent.js +3 -1
- package/dist/cjs/features/InstantLearning/_components/ChatComponent.js.map +1 -1
- package/dist/cjs/features/InstantLearning/_components/ContextualChatComponent.js +3 -1
- package/dist/cjs/features/InstantLearning/_components/ContextualChatComponent.js.map +1 -1
- package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js +5 -2
- package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js.map +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +12 -4
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/NormalChat.js +13 -4
- package/dist/features/IL-OTJ/_components/ChatComponents/NormalChat.js.map +1 -1
- package/dist/features/IL-marketplace/PromoteFlow/EnvironmentConfigurationModal.js +41 -4
- package/dist/features/IL-marketplace/PromoteFlow/EnvironmentConfigurationModal.js.map +1 -1
- package/dist/features/IL-marketplace/PromoteFlow/PromoteFlow.js +446 -171
- package/dist/features/IL-marketplace/PromoteFlow/PromoteFlow.js.map +1 -1
- package/dist/features/IL-marketplace/PromoteFlow/PromoteFlow.module.css.js +2 -2
- package/dist/features/IL-marketplace/PromoteFlow/promote-flow.api.js +17 -3
- package/dist/features/IL-marketplace/PromoteFlow/promote-flow.api.js.map +1 -1
- package/dist/features/IL-marketplace/PromoteFlow/promote-flow.store.js +7 -0
- package/dist/features/IL-marketplace/PromoteFlow/promote-flow.store.js.map +1 -1
- package/dist/features/InstantLearning/InstantLearning.js +1 -0
- package/dist/features/InstantLearning/InstantLearning.js.map +1 -1
- package/dist/features/InstantLearning/_components/ChatComponent.js +3 -1
- package/dist/features/InstantLearning/_components/ChatComponent.js.map +1 -1
- package/dist/features/InstantLearning/_components/ContextualChatComponent.js +3 -1
- package/dist/features/InstantLearning/_components/ContextualChatComponent.js.map +1 -1
- package/dist/types/src/ILMarketplaceWrapper.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponents/NormalChat.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/EnvironmentConfigurationModal.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/PromoteFlow.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.api.d.ts +5 -2
- package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.api.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.interfaces.d.ts +26 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.interfaces.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.store.d.ts +3 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.store.d.ts.map +1 -1
- package/dist/types/src/features/InstantLearning/InstantLearning.d.ts.map +1 -1
- package/dist/types/src/features/InstantLearning/_components/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/InstantLearning/_components/ContextualChatComponent.d.ts.map +1 -1
- package/package.json +4 -5
|
@@ -119,6 +119,10 @@ const NormalChat = ({
|
|
|
119
119
|
useEffect(() => {
|
|
120
120
|
onStreamingStateChange == null ? void 0 : onStreamingStateChange(isStreaming);
|
|
121
121
|
}, [isStreaming, onStreamingStateChange]);
|
|
122
|
+
const accessTokenRef = useRef(user == null ? void 0 : user.accessToken);
|
|
123
|
+
useEffect(() => {
|
|
124
|
+
accessTokenRef.current = user == null ? void 0 : user.accessToken;
|
|
125
|
+
}, [user == null ? void 0 : user.accessToken]);
|
|
122
126
|
useEffect(() => {
|
|
123
127
|
isMountedRef.current = true;
|
|
124
128
|
return () => {
|
|
@@ -280,7 +284,7 @@ const NormalChat = ({
|
|
|
280
284
|
method: "get",
|
|
281
285
|
maxBodyLength: Infinity,
|
|
282
286
|
url: `${url}/api/chatbot/getChatSettings?name=${chatAssistant}&organizationName=${organizationName}`,
|
|
283
|
-
headers: {}
|
|
287
|
+
headers: (user == null ? void 0 : user.accessToken) ? { Authorization: `Bearer ${user.accessToken}` } : {}
|
|
284
288
|
};
|
|
285
289
|
http.request(config).then((response) => {
|
|
286
290
|
var _a, _b, _c;
|
|
@@ -299,6 +303,7 @@ const NormalChat = ({
|
|
|
299
303
|
const requestOptions = {
|
|
300
304
|
method: "GET",
|
|
301
305
|
params: { guestSessionId: guestSessionIdRef.current },
|
|
306
|
+
headers: (user == null ? void 0 : user.accessToken) ? { Authorization: `Bearer ${user.accessToken}` } : {},
|
|
302
307
|
withCredentials: true
|
|
303
308
|
};
|
|
304
309
|
http.get(getHistoryURL, requestOptions).then((response) => {
|
|
@@ -548,6 +553,11 @@ const NormalChat = ({
|
|
|
548
553
|
setIsStreamEnd((_H = (_G = data == null ? void 0 : data.chatStream) == null ? void 0 : _G.continueChatResult) == null ? void 0 : _H.isEnd);
|
|
549
554
|
}
|
|
550
555
|
};
|
|
556
|
+
const liveHeaders = {
|
|
557
|
+
get Authorization() {
|
|
558
|
+
return accessTokenRef.current ? `Bearer ${accessTokenRef.current}` : void 0;
|
|
559
|
+
}
|
|
560
|
+
};
|
|
551
561
|
const handleStream = (event, isFirstQuestionSent, userInputParam, isValidationFailure = false, customId, setIsLoading) => {
|
|
552
562
|
var _a, _b;
|
|
553
563
|
const contentSource = userInputParam !== void 0 ? userInputParam : userInput || "";
|
|
@@ -643,9 +653,7 @@ const NormalChat = ({
|
|
|
643
653
|
chatPreviewId: chatPreviewIdRef.current,
|
|
644
654
|
customMetaData,
|
|
645
655
|
aiModel: "",
|
|
646
|
-
additionalHeaders:
|
|
647
|
-
Authorization: `Bearer ${user.accessToken}`
|
|
648
|
-
} : void 0,
|
|
656
|
+
additionalHeaders: liveHeaders,
|
|
649
657
|
onStreamEvent: (data) => {
|
|
650
658
|
if (!isMountedRef.current || streamGenerationRef.current !== streamGeneration) return;
|
|
651
659
|
handleMessages(
|
|
@@ -693,6 +701,7 @@ const NormalChat = ({
|
|
|
693
701
|
setInitialLoadingMessage(loadingMessage);
|
|
694
702
|
streamStartTimesRef.current.set(params.requestId, Date.now());
|
|
695
703
|
currentStreamRequestIdRef.current = params.requestId;
|
|
704
|
+
console.log("Chat Stream Params:", params);
|
|
696
705
|
startChatStream(params);
|
|
697
706
|
}
|
|
698
707
|
setIsLoading && setIsLoading(false);
|