mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-20 05:43:55 +00:00
mistral[patch]: ensure tool call IDs in tool messages are correctly formatted (#28422)
Fixes tests for cross-provider compatibility: https://github.com/langchain-ai/langchain/actions/runs/12085358877/job/33702420504#step:10:376
This commit is contained in:
parent
2813e86407
commit
c2f1d022a2
@ -353,7 +353,9 @@ def _convert_message_to_mistral_chat_message(
|
||||
"role": "tool",
|
||||
"content": message.content,
|
||||
"name": message.name,
|
||||
"tool_call_id": message.tool_call_id,
|
||||
"tool_call_id": _convert_tool_call_id_to_mistral_compatible(
|
||||
message.tool_call_id
|
||||
),
|
||||
}
|
||||
else:
|
||||
raise ValueError(f"Got unknown type {message}")
|
||||
|
Loading…
Reference in New Issue
Block a user