@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
|
@@ -129,6 +129,10 @@ const NormalChat = ({
|
|
|
129
129
|
React.useEffect(() => {
|
|
130
130
|
onStreamingStateChange == null ? void 0 : onStreamingStateChange(isStreaming);
|
|
131
131
|
}, [isStreaming, onStreamingStateChange]);
|
|
132
|
+
const accessTokenRef = React.useRef(user == null ? void 0 : user.accessToken);
|
|
133
|
+
React.useEffect(() => {
|
|
134
|
+
accessTokenRef.current = user == null ? void 0 : user.accessToken;
|
|
135
|
+
}, [user == null ? void 0 : user.accessToken]);
|
|
132
136
|
React.useEffect(() => {
|
|
133
137
|
isMountedRef.current = true;
|
|
134
138
|
return () => {
|
|
@@ -290,7 +294,7 @@ const NormalChat = ({
|
|
|
290
294
|
method: "get",
|
|
291
295
|
maxBodyLength: Infinity,
|
|
292
296
|
url: `${url}/api/chatbot/getChatSettings?name=${chatAssistant}&organizationName=${organizationName}`,
|
|
293
|
-
headers: {}
|
|
297
|
+
headers: (user == null ? void 0 : user.accessToken) ? { Authorization: `Bearer ${user.accessToken}` } : {}
|
|
294
298
|
};
|
|
295
299
|
transport.http.request(config).then((response) => {
|
|
296
300
|
var _a, _b, _c;
|
|
@@ -309,6 +313,7 @@ const NormalChat = ({
|
|
|
309
313
|
const requestOptions = {
|
|
310
314
|
method: "GET",
|
|
311
315
|
params: { guestSessionId: guestSessionIdRef.current },
|
|
316
|
+
headers: (user == null ? void 0 : user.accessToken) ? { Authorization: `Bearer ${user.accessToken}` } : {},
|
|
312
317
|
withCredentials: true
|
|
313
318
|
};
|
|
314
319
|
transport.http.get(getHistoryURL, requestOptions).then((response) => {
|
|
@@ -558,6 +563,11 @@ const NormalChat = ({
|
|
|
558
563
|
setIsStreamEnd((_H = (_G = data == null ? void 0 : data.chatStream) == null ? void 0 : _G.continueChatResult) == null ? void 0 : _H.isEnd);
|
|
559
564
|
}
|
|
560
565
|
};
|
|
566
|
+
const liveHeaders = {
|
|
567
|
+
get Authorization() {
|
|
568
|
+
return accessTokenRef.current ? `Bearer ${accessTokenRef.current}` : void 0;
|
|
569
|
+
}
|
|
570
|
+
};
|
|
561
571
|
const handleStream = (event, isFirstQuestionSent, userInputParam, isValidationFailure = false, customId, setIsLoading) => {
|
|
562
572
|
var _a, _b;
|
|
563
573
|
const contentSource = userInputParam !== void 0 ? userInputParam : userInput || "";
|
|
@@ -653,9 +663,7 @@ const NormalChat = ({
|
|
|
653
663
|
chatPreviewId: chatPreviewIdRef.current,
|
|
654
664
|
customMetaData,
|
|
655
665
|
aiModel: "",
|
|
656
|
-
additionalHeaders:
|
|
657
|
-
Authorization: `Bearer ${user.accessToken}`
|
|
658
|
-
} : void 0,
|
|
666
|
+
additionalHeaders: liveHeaders,
|
|
659
667
|
onStreamEvent: (data) => {
|
|
660
668
|
if (!isMountedRef.current || streamGenerationRef.current !== streamGeneration) return;
|
|
661
669
|
handleMessages(
|
|
@@ -703,6 +711,7 @@ const NormalChat = ({
|
|
|
703
711
|
setInitialLoadingMessage(loadingMessage);
|
|
704
712
|
streamStartTimesRef.current.set(params.requestId, Date.now());
|
|
705
713
|
currentStreamRequestIdRef.current = params.requestId;
|
|
714
|
+
console.log("Chat Stream Params:", params);
|
|
706
715
|
streamingResponse.startChatStream(params);
|
|
707
716
|
}
|
|
708
717
|
setIsLoading && setIsLoading(false);
|