kooby 1.0.4 → 1.0.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.
- package/dist/cjs/index.js +4 -2
- package/dist/esm/index.js +4 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -540,7 +540,7 @@ var Conversation = function Conversation(_ref4) {
|
|
|
540
540
|
}
|
|
541
541
|
}, [conversation]);
|
|
542
542
|
var filteredConvo = conversation.filter(function (message) {
|
|
543
|
-
return message.role !== "system";
|
|
543
|
+
return message.role !== "system" && message.role !== "tool" && !message.tool_calls;
|
|
544
544
|
});
|
|
545
545
|
return /*#__PURE__*/React.createElement("div", {
|
|
546
546
|
className: "kooby-conversation"
|
|
@@ -685,7 +685,9 @@ var initializeConversation = function initializeConversation(_ref6) {
|
|
|
685
685
|
var agent = _ref6.agent,
|
|
686
686
|
initialConversation = _ref6.initialConversation;
|
|
687
687
|
if (initialConversation && initialConversation.length > 0) {
|
|
688
|
-
return initialConversation
|
|
688
|
+
return initialConversation.filter(function (message) {
|
|
689
|
+
return message.role !== "tool" && !message.tool_calls;
|
|
690
|
+
});
|
|
689
691
|
}
|
|
690
692
|
return [defaultGreetingMessage(agent)];
|
|
691
693
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -538,7 +538,7 @@ var Conversation = function Conversation(_ref4) {
|
|
|
538
538
|
}
|
|
539
539
|
}, [conversation]);
|
|
540
540
|
var filteredConvo = conversation.filter(function (message) {
|
|
541
|
-
return message.role !== "system";
|
|
541
|
+
return message.role !== "system" && message.role !== "tool" && !message.tool_calls;
|
|
542
542
|
});
|
|
543
543
|
return /*#__PURE__*/React.createElement("div", {
|
|
544
544
|
className: "kooby-conversation"
|
|
@@ -683,7 +683,9 @@ var initializeConversation = function initializeConversation(_ref6) {
|
|
|
683
683
|
var agent = _ref6.agent,
|
|
684
684
|
initialConversation = _ref6.initialConversation;
|
|
685
685
|
if (initialConversation && initialConversation.length > 0) {
|
|
686
|
-
return initialConversation
|
|
686
|
+
return initialConversation.filter(function (message) {
|
|
687
|
+
return message.role !== "tool" && !message.tool_calls;
|
|
688
|
+
});
|
|
687
689
|
}
|
|
688
690
|
return [defaultGreetingMessage(agent)];
|
|
689
691
|
};
|