Skip to content

Commit 7180ed9

Browse files
committed
hotfix
1 parent 0a5522d commit 7180ed9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/client/platforms/anthropic.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,9 @@ export class ClaudeApi implements LLMApi {
285285
type: "tool_use",
286286
id: tool.id,
287287
name: tool?.function?.name,
288-
input: JSON.parse(tool?.function?.arguments as string),
288+
input: tool?.function?.arguments
289+
? JSON.parse(tool?.function?.arguments)
290+
: {},
289291
}),
290292
),
291293
},

app/utils/chat.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,9 @@ export function stream(
215215
// @ts-ignore
216216
funcs[tool.function.name](
217217
// @ts-ignore
218-
JSON.parse(tool.function.arguments),
218+
tool?.function?.arguments
219+
? JSON.parse(tool?.function?.arguments)
220+
: {},
219221
),
220222
)
221223
.then((res) => {

0 commit comments

Comments
 (0)