@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
@@ -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: (user == null ? void 0 : user.accessToken) ? {
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);