diff --git a/package.json b/package.json index b97cd5c..e3d6784 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@codota/token.js", - "version": "0.15.0", + "version": "0.16.0", "repository": { "type": "git", "url": "https://github.com/codota/token.js" diff --git a/src/handlers/anthropic-vertex.ts b/src/handlers/anthropic-vertex.ts index 1bb1134..f5c5221 100644 --- a/src/handlers/anthropic-vertex.ts +++ b/src/handlers/anthropic-vertex.ts @@ -178,7 +178,16 @@ export async function* createCompletionResponseStreaming( index: 0, finish_reason: finishReason, logprobs: null, - delta, + delta: finishReason === "tool_calls" ? { + tool_calls: [ + { + index: 0, + function: { + arguments: '{}', + }, + }, + ], + } : delta, } yield {