Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydzhou committed Sep 3, 2024
1 parent 0a5522d commit 7180ed9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/client/platforms/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ export class ClaudeApi implements LLMApi {
type: "tool_use",
id: tool.id,
name: tool?.function?.name,
input: JSON.parse(tool?.function?.arguments as string),
input: tool?.function?.arguments
? JSON.parse(tool?.function?.arguments)
: {},
}),
),
},
Expand Down
4 changes: 3 additions & 1 deletion app/utils/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ export function stream(
// @ts-ignore
funcs[tool.function.name](
// @ts-ignore
JSON.parse(tool.function.arguments),
tool?.function?.arguments
? JSON.parse(tool?.function?.arguments)
: {},
),
)
.then((res) => {
Expand Down

0 comments on commit 7180ed9

Please sign in to comment.