We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22d1a7d commit 299b222Copy full SHA for 299b222
libs/partners/mistralai/langchain_mistralai/chat_models.py
@@ -274,7 +274,9 @@ def _convert_chunk_to_message_chunk(
274
}
275
else:
276
usage_metadata = None
277
- if _choice.get("finish_reason") is not None:
+ if _choice.get("finish_reason") is not None and isinstance(
278
+ chunk.get("model"), str
279
+ ):
280
response_metadata["model_name"] = chunk.get("model")
281
return AIMessageChunk(
282
content=content,
0 commit comments