Replace tool blocks with xml tags format to allow continuing old tasks without passing in tool schema to API

This commit is contained in:
Saoud Rizwan
2024-10-09 03:25:19 -04:00
parent f8b76256f3
commit 26bcc0b7ca
2 changed files with 40 additions and 5 deletions

View File

@@ -82,7 +82,7 @@ export function formatContentBlockToMarkdown(
}
}
function findToolName(toolCallId: string, messages: Anthropic.MessageParam[]): string {
export function findToolName(toolCallId: string, messages: Anthropic.MessageParam[]): string {
for (const message of messages) {
if (Array.isArray(message.content)) {
for (const block of message.content) {