The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
fix(ollama): Remove redundant message from response_metadata (#30778)
Jacob Leee72f3c26a03b
diff --git a/libs/partners/ollama/langchain_ollama/chat_models.py b/libs/partners/ollama/langchain_ollama/chat_models.pyindex 3801fc4d0d..a163ce82f8 100644--- a/libs/partners/ollama/langchain_ollama/chat_models.py+++ b/libs/partners/ollama/langchain_ollama/chat_models.py@@ -740,7 +740,9 @@ class ChatOllama(BaseChatModel):tool_calls=_get_tool_calls_from_response(stream_resp),),generation_info=(- dict(stream_resp) if stream_resp.get("done") is True else None+ dict(stream_resp).pop("message", None)+ if stream_resp.get("done") is True+ else None),)if chunk.generation_info and (@@ -792,7 +794,9 @@ class ChatOllama(BaseChatModel):tool_calls=_get_tool_calls_from_response(stream_resp),),generation_info=(- dict(stream_resp) if stream_resp.get("done") is True else None+ dict(stream_resp).pop("message", None)+ if stream_resp.get("done") is True+ else None),)if chunk.generation_info and (