mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-26 08:33:49 +00:00
fix
This commit is contained in:
parent
cfd554bffc
commit
1160090ce3
@ -965,7 +965,7 @@ def convert_to_openai_messages(
|
||||
if isinstance(message, AIMessage) and message.invalid_tool_calls:
|
||||
oai_msg["tool_calls"] = oai_msg.get(
|
||||
"tool_calls", []
|
||||
) + _convert_to_openai_tool_calls(message.invalid_tool_calls)
|
||||
) + _convert_to_openai_tool_calls(message.invalid_tool_calls, invalid=True)
|
||||
if message.additional_kwargs.get("refusal"):
|
||||
oai_msg["refusal"] = message.additional_kwargs["refusal"]
|
||||
if isinstance(message, ToolMessage):
|
||||
|
Loading…
Reference in New Issue
Block a user