mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
anthropic, mistral: return model_name in response metadata (#30048)
Took a "census" of models supported by init_chat_model-- of those that return model names in response metadata, these were the only two that had it keyed under `"model"` instead of `"model_name"`.
This commit is contained in:
@@ -579,7 +579,11 @@ class ChatMistralAI(BaseChatModel):
|
||||
)
|
||||
generations.append(gen)
|
||||
|
||||
llm_output = {"token_usage": token_usage, "model": self.model}
|
||||
llm_output = {
|
||||
"token_usage": token_usage,
|
||||
"model_name": self.model,
|
||||
"model": self.model, # Backwards compatability
|
||||
}
|
||||
return ChatResult(generations=generations, llm_output=llm_output)
|
||||
|
||||
def _create_message_dicts(
|
||||
|
||||
Reference in New Issue
Block a user