mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-11 03:46:52 +08:00
fix: tongyi empty tool_calls is not supported in message (#6719)
This commit is contained in:
@@ -501,8 +501,7 @@ You should also complete the text started with ``` but not tell ``` directly.
|
|||||||
'role': 'assistant',
|
'role': 'assistant',
|
||||||
'content': content if not rich_content else [{"text": content}],
|
'content': content if not rich_content else [{"text": content}],
|
||||||
'tool_calls': [tool_call.model_dump() for tool_call in
|
'tool_calls': [tool_call.model_dump() for tool_call in
|
||||||
prompt_message.tool_calls] if prompt_message.tool_calls else []
|
prompt_message.tool_calls] if prompt_message.tool_calls else None
|
||||||
|
|
||||||
})
|
})
|
||||||
elif isinstance(prompt_message, ToolPromptMessage):
|
elif isinstance(prompt_message, ToolPromptMessage):
|
||||||
tongyi_messages.append({
|
tongyi_messages.append({
|
||||||
|
|||||||
Reference in New Issue
Block a user