Skip to content

Commit

Permalink
fix: openrouter config
Browse files Browse the repository at this point in the history
  • Loading branch information
vikyw89 committed Jul 8, 2024
1 parent 5336825 commit 4c87262
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/vanna/openrouter/openrouter_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 4c87262

Please sign in to comment.