Removed <tool> blocks from responses
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ztimson/ai-utils",
|
||||
"version": "1.3.3",
|
||||
"version": "1.3.4",
|
||||
"description": "AI Utility library",
|
||||
"author": "Zak Timson",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -158,7 +158,6 @@ export class Anthropic extends LLMProvider {
|
||||
const turnStart = history.map(h => h.role).lastIndexOf('user');
|
||||
const finalContent = history.slice(turnStart + 1).reduce((str, h) => {
|
||||
if(h.role === 'assistant') return str + (h.content || '');
|
||||
if(h.role === 'tool') return str + `<tool>${h.name}</tool>\n\n`;
|
||||
return str;
|
||||
}, '').trim();
|
||||
|
||||
|
||||
@@ -190,7 +190,6 @@ export class OpenAi extends LLMProvider {
|
||||
const turnStart = history.map(h => h.role).lastIndexOf('user');
|
||||
const finalContent = history.slice(turnStart + 1).reduce((str, h) => {
|
||||
if(h.role === 'assistant') return str + (h.content || '');
|
||||
if(h.role === 'tool') return str + `<tool>${h.name}</tool>\n\n`;
|
||||
return str;
|
||||
}, '').trim();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user