goblin-agents 2.3.0 → 2.3.1
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/lib/llm/aiAgent.js +2 -5
- package/package.json +1 -1
package/lib/llm/aiAgent.js
CHANGED
|
@@ -134,10 +134,7 @@ function cleanText(text) {
|
|
|
134
134
|
if (typeof text !== 'string') {
|
|
135
135
|
return text;
|
|
136
136
|
}
|
|
137
|
-
const {
|
|
138
|
-
for (const think of thinks) {
|
|
139
|
-
this.log.dbg(`🧐 ${think}`);
|
|
140
|
-
}
|
|
137
|
+
const {cleanText} = splitThinkTags(text);
|
|
141
138
|
return cleanText;
|
|
142
139
|
}
|
|
143
140
|
|
|
@@ -612,7 +609,7 @@ class AiAgent extends Elf {
|
|
|
612
609
|
const res = cleanText(result.message.content);
|
|
613
610
|
if (typeof res === 'string') {
|
|
614
611
|
//keep agent response
|
|
615
|
-
this.logic.chat(contextId, 'assistant',
|
|
612
|
+
this.logic.chat(contextId, 'assistant', res);
|
|
616
613
|
}
|
|
617
614
|
|
|
618
615
|
this.log.dbg(`🐈 Chat session ended : ${contextId}`);
|