mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
fix(ollama): pop unsupported 'strict' argument in ChatOllama (#34114)
This commit is contained in:
@@ -774,6 +774,11 @@ class ChatOllama(BaseChatModel):
|
||||
**kwargs,
|
||||
}
|
||||
|
||||
# Filter out 'strict' argument if present, as it is not supported by Ollama
|
||||
# but may be passed by upstream libraries (e.g. LangChain ProviderStrategy)
|
||||
if "strict" in params:
|
||||
params.pop("strict")
|
||||
|
||||
if tools := kwargs.get("tools"):
|
||||
params["tools"] = tools
|
||||
|
||||
|
||||
Reference in New Issue
Block a user