Skip to content

Commit

Permalink
mistral[patch]: ensure tool call IDs in tool messages are correctly f…
Browse files Browse the repository at this point in the history
  • Loading branch information
ccurme authored Nov 29, 2024
1 parent 2813e86 commit c2f1d02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/partners/mistralai/langchain_mistralai/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit c2f1d02

Please sign in to comment.