mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-03-19 21:38:18 +08:00
fix: validate tool_call_id pairing #2690
This commit is contained in:
@@ -10,6 +10,7 @@ This includes: OpenAI, LinkAI, Azure OpenAI, and many third-party providers.
|
||||
import json
|
||||
import openai
|
||||
from common.log import logger
|
||||
from agent.protocol.message_utils import drop_orphaned_tool_results_openai
|
||||
|
||||
|
||||
class OpenAICompatibleBot:
|
||||
@@ -300,5 +301,5 @@ class OpenAICompatibleBot:
|
||||
else:
|
||||
# Other formats, keep as is
|
||||
openai_messages.append(msg)
|
||||
|
||||
return openai_messages
|
||||
|
||||
return drop_orphaned_tool_results_openai(openai_messages)
|
||||
|
||||
Reference in New Issue
Block a user