We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f78fc56 commit cfccd5cCopy full SHA for cfccd5c
lib/llm_agent/providers/anthropic.ex
@@ -184,23 +184,23 @@ defmodule LLMAgent.Providers.Anthropic do
184
defp parse_anthropic_response(response) do
185
case response do
186
%{content: content} = resp when is_list(content) ->
187
- # 检查是否有工具调用
+ # Check if there are tool calls
188
if Map.has_key?(resp, :tool_calls) and length(resp.tool_calls) > 0 do
189
- # 包含工具调用的响应
+ # Response containing tool calls
190
%{
191
content: extract_text_content(content),
192
tool_calls: resp.tool_calls
193
}
194
else
195
- # 普通文本响应
+ # Regular text response
196
197
198
tool_calls: []
199
200
end
201
202
_ ->
203
- # 处理其他类型的响应或错误
+ # Handle other types of responses or errors
204
205
content: "Unable to parse response",
206
0 commit comments