mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-05 12:48:12 +00:00
openai[patch]: fix bug where function call IDs were not populated (#31735)
(optional) IDs were getting dropped in some cases.
This commit is contained in:
parent
0bf223d6cf
commit
84500704ab
@ -142,7 +142,7 @@ def _convert_from_v03_ai_message(message: AIMessage) -> AIMessage:
|
||||
and all(isinstance(b, dict) for b in message.content)
|
||||
) or not any(
|
||||
item in message.additional_kwargs
|
||||
for item in ["reasoning", "tool_outputs", "refusal"]
|
||||
for item in ["reasoning", "tool_outputs", "refusal", _FUNCTION_CALL_IDS_MAP_KEY]
|
||||
):
|
||||
return message
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user