@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.
Files changed (62) hide show
  1. package/dist/ILMarketplaceWrapper.js +3 -0
  2. package/dist/ILMarketplaceWrapper.js.map +1 -1
  3. package/dist/cjs/ILMarketplaceWrapper.js +3 -0
  4. package/dist/cjs/ILMarketplaceWrapper.js.map +1 -1
  5. package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js +5 -2
  6. package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js.map +1 -1
  7. package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +12 -4
  8. package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
  9. package/dist/cjs/features/IL-OTJ/_components/ChatComponents/NormalChat.js +13 -4
  10. package/dist/cjs/features/IL-OTJ/_components/ChatComponents/NormalChat.js.map +1 -1
  11. package/dist/cjs/features/IL-marketplace/PromoteFlow/EnvironmentConfigurationModal.js +41 -4
  12. package/dist/cjs/features/IL-marketplace/PromoteFlow/EnvironmentConfigurationModal.js.map +1 -1
  13. package/dist/cjs/features/IL-marketplace/PromoteFlow/PromoteFlow.js +444 -169
  14. package/dist/cjs/features/IL-marketplace/PromoteFlow/PromoteFlow.js.map +1 -1
  15. package/dist/cjs/features/IL-marketplace/PromoteFlow/PromoteFlow.module.css.js +2 -2
  16. package/dist/cjs/features/IL-marketplace/PromoteFlow/promote-flow.api.js +19 -2
  17. package/dist/cjs/features/IL-marketplace/PromoteFlow/promote-flow.api.js.map +1 -1
  18. package/dist/cjs/features/IL-marketplace/PromoteFlow/promote-flow.store.js +7 -0
  19. package/dist/cjs/features/IL-marketplace/PromoteFlow/promote-flow.store.js.map +1 -1
  20. package/dist/cjs/features/InstantLearning/InstantLearning.js +1 -0
  21. package/dist/cjs/features/InstantLearning/InstantLearning.js.map +1 -1
  22. package/dist/cjs/features/InstantLearning/_components/ChatComponent.js +3 -1
  23. package/dist/cjs/features/InstantLearning/_components/ChatComponent.js.map +1 -1
  24. package/dist/cjs/features/InstantLearning/_components/ContextualChatComponent.js +3 -1
  25. package/dist/cjs/features/InstantLearning/_components/ContextualChatComponent.js.map +1 -1
  26. package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js +5 -2
  27. package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js.map +1 -1
  28. package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +12 -4
  29. package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
  30. package/dist/features/IL-OTJ/_components/ChatComponents/NormalChat.js +13 -4
  31. package/dist/features/IL-OTJ/_components/ChatComponents/NormalChat.js.map +1 -1
  32. package/dist/features/IL-marketplace/PromoteFlow/EnvironmentConfigurationModal.js +41 -4
  33. package/dist/features/IL-marketplace/PromoteFlow/EnvironmentConfigurationModal.js.map +1 -1
  34. package/dist/features/IL-marketplace/PromoteFlow/PromoteFlow.js +446 -171
  35. package/dist/features/IL-marketplace/PromoteFlow/PromoteFlow.js.map +1 -1
  36. package/dist/features/IL-marketplace/PromoteFlow/PromoteFlow.module.css.js +2 -2
  37. package/dist/features/IL-marketplace/PromoteFlow/promote-flow.api.js +17 -3
  38. package/dist/features/IL-marketplace/PromoteFlow/promote-flow.api.js.map +1 -1
  39. package/dist/features/IL-marketplace/PromoteFlow/promote-flow.store.js +7 -0
  40. package/dist/features/IL-marketplace/PromoteFlow/promote-flow.store.js.map +1 -1
  41. package/dist/features/InstantLearning/InstantLearning.js +1 -0
  42. package/dist/features/InstantLearning/InstantLearning.js.map +1 -1
  43. package/dist/features/InstantLearning/_components/ChatComponent.js +3 -1
  44. package/dist/features/InstantLearning/_components/ChatComponent.js.map +1 -1
  45. package/dist/features/InstantLearning/_components/ContextualChatComponent.js +3 -1
  46. package/dist/features/InstantLearning/_components/ContextualChatComponent.js.map +1 -1
  47. package/dist/types/src/ILMarketplaceWrapper.d.ts.map +1 -1
  48. package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts.map +1 -1
  49. package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
  50. package/dist/types/src/features/IL-OTJ/_components/ChatComponents/NormalChat.d.ts.map +1 -1
  51. package/dist/types/src/features/IL-marketplace/PromoteFlow/EnvironmentConfigurationModal.d.ts.map +1 -1
  52. package/dist/types/src/features/IL-marketplace/PromoteFlow/PromoteFlow.d.ts.map +1 -1
  53. package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.api.d.ts +5 -2
  54. package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.api.d.ts.map +1 -1
  55. package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.interfaces.d.ts +26 -1
  56. package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.interfaces.d.ts.map +1 -1
  57. package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.store.d.ts +3 -1
  58. package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.store.d.ts.map +1 -1
  59. package/dist/types/src/features/InstantLearning/InstantLearning.d.ts.map +1 -1
  60. package/dist/types/src/features/InstantLearning/_components/ChatComponent.d.ts.map +1 -1
  61. package/dist/types/src/features/InstantLearning/_components/ContextualChatComponent.d.ts.map +1 -1
  62. 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: (user == null ? void 0 : user.accessToken) ? {
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);