mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-05 02:41:34 +00:00
Fix tool_calls retrieval to handle None case
This commit is contained in:
parent
3dcfccb9d8
commit
7d0d075c67
1 changed files with 1 additions and 1 deletions
|
|
@ -422,7 +422,7 @@ def convert_openai_to_anthropic_response(openai_response: dict, model: str = '')
|
|||
content.append({'type': 'text', 'text': msg_content})
|
||||
|
||||
# Tool calls → tool_use blocks
|
||||
tool_calls = message.get('tool_calls', [])
|
||||
tool_calls = message.get('tool_calls') or []
|
||||
for tc in tool_calls:
|
||||
func = tc.get('function', {})
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue