diff --git a/src/vanna/openrouter/openrouter_chat.py b/src/vanna/openrouter/openrouter_chat.py index 78622dac..49976283 100644 --- a/src/vanna/openrouter/openrouter_chat.py +++ b/src/vanna/openrouter/openrouter_chat.py @@ -23,9 +23,12 @@ def __init__( VannaBase.__init__(self, config=config) self.client = client self.aclient = aclient - if config is not None: - self.temperature = config["temperature"] or 0.7 - self.max_tokens = config["max_tokens"] or 500 + self.temperature = 0.7 + self.max_tokens = 500 + if config is not None and "temperature" in config: + self.temperature = config["temperature"] + if config is not None and "max_tokens" in config: + self.max_tokens = config["max_tokens"] def system_message(self, message: str) -> Any: return {"role": "system", "content": message}