We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a5522d commit 7180ed9Copy full SHA for 7180ed9
app/client/platforms/anthropic.ts
@@ -285,7 +285,9 @@ export class ClaudeApi implements LLMApi {
285
type: "tool_use",
286
id: tool.id,
287
name: tool?.function?.name,
288
- input: JSON.parse(tool?.function?.arguments as string),
+ input: tool?.function?.arguments
289
+ ? JSON.parse(tool?.function?.arguments)
290
+ : {},
291
}),
292
),
293
},
app/utils/chat.ts
@@ -215,7 +215,9 @@ export function stream(
215
// @ts-ignore
216
funcs[tool.function.name](
217
218
- JSON.parse(tool.function.arguments),
+ tool?.function?.arguments
219
220
221
222
)
223
.then((res) => {
0 commit comments