@bytexbyte/nxtlinq-ai-agent-sdk 1.3.5 → 1.3.6
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatBotContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/ChatBotContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EACL,kBAAkB,EAClB,YAAY,EAGb,MAAM,uBAAuB,CAAC;AAI/B,eAAO,MAAM,UAAU,0BAMtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"ChatBotContext.d.ts","sourceRoot":"","sources":["../../../src/components/context/ChatBotContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EACL,kBAAkB,EAClB,YAAY,EAGb,MAAM,uBAAuB,CAAC;AAI/B,eAAO,MAAM,UAAU,0BAMtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA4+ClD,CAAC"}
|
|
@@ -250,6 +250,7 @@ availableModels = DEFAULT_AI_MODELS, defaultModelIndex = 0, showModelSelector =
|
|
|
250
250
|
else {
|
|
251
251
|
// Token is valid, try to load AIT
|
|
252
252
|
await refreshAIT();
|
|
253
|
+
await sleep(1000);
|
|
253
254
|
}
|
|
254
255
|
}
|
|
255
256
|
catch (error) {
|
|
@@ -876,9 +877,9 @@ availableModels = DEFAULT_AI_MODELS, defaultModelIndex = 0, showModelSelector =
|
|
|
876
877
|
if (response.reply) {
|
|
877
878
|
replyText = Array.isArray(response.reply)
|
|
878
879
|
? response.reply
|
|
879
|
-
.map((item) => item.text
|
|
880
|
+
.map((item) => item.text)
|
|
880
881
|
.join(' ') || ''
|
|
881
|
-
: response.reply
|
|
882
|
+
: response.reply || '';
|
|
882
883
|
}
|
|
883
884
|
else if (response.fullResponse?.output?.message?.content) {
|
|
884
885
|
replyText = response.fullResponse.output.message.content
|
|
@@ -891,6 +892,7 @@ availableModels = DEFAULT_AI_MODELS, defaultModelIndex = 0, showModelSelector =
|
|
|
891
892
|
if (replyText && replyText.trim()) {
|
|
892
893
|
mergedContent += `\n\n${replyText}`;
|
|
893
894
|
}
|
|
895
|
+
updateSuggestions([...contextMessages, { role: 'assistant', text: mergedContent }]);
|
|
894
896
|
botResponse = {
|
|
895
897
|
id: (Date.now() + 1).toString(),
|
|
896
898
|
content: mergedContent,
|
|
@@ -908,9 +910,9 @@ availableModels = DEFAULT_AI_MODELS, defaultModelIndex = 0, showModelSelector =
|
|
|
908
910
|
else if (response.reply) {
|
|
909
911
|
const replyText = Array.isArray(response.reply)
|
|
910
912
|
? response.reply
|
|
911
|
-
.map((item) => item.text
|
|
913
|
+
.map((item) => item.text)
|
|
912
914
|
.join(' ') || 'Sorry, I cannot understand your question'
|
|
913
|
-
: response.reply
|
|
915
|
+
: response.reply || 'Sorry, I cannot understand your question';
|
|
914
916
|
updateSuggestions([...contextMessages, { role: 'assistant', text: replyText }]);
|
|
915
917
|
botResponse = {
|
|
916
918
|
id: (Date.now() + 1).toString(),
|
package/package.json
CHANGED