Skip to content

Commit

Permalink
fix: pass down previous tool calls
Browse files Browse the repository at this point in the history
  • Loading branch information
eneufeld committed Jan 29, 2025
1 parent d4f69c0 commit e74e749
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ai-anthropic/src/node/anthropic-language-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class AnthropicModel implements LanguageModel {
content: isArray(call.result!) ? call.result.map(r => ({ type: 'text', text: r as string })) : call.result
}))
};
const result = await that.handleStreamingRequest(anthropic, request, cancellationToken, [toolRequestMessage, toolResponseMessage]);
const result = await that.handleStreamingRequest(anthropic, request, cancellationToken, [...(toolMessages ?? []), toolRequestMessage, toolResponseMessage]);
for await (const nestedEvent of result.stream) {
yield nestedEvent;
}
Expand Down

0 comments on commit e74e749

Please sign in to comment.