Ensure custom params are optional

This commit is contained in:
Bobby Lindsey
2025-01-24 14:24:15 -07:00
committed by GitHub
parent 74dd9eb1f2
commit 4e323a482c

View File

@@ -239,9 +239,11 @@ class LLM:
"api_key": self.api_key,
"stream": False,
"tools": tools,
**self.custom_params["custom_params"],
}
if self.custom_params:
params.update(self.custom_params["custom_params"])
# Remove None values from params
params = {k: v for k, v in params.items() if v is not None}