From 0a6f9c86a1dc98b93b26ede3632a284a650b9912 Mon Sep 17 00:00:00 2001 From: Michael Boeckers <56027634+boeckers@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:58:48 +0200 Subject: [PATCH] Update openai_chat.py --- src/vanna/openai/openai_chat.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/vanna/openai/openai_chat.py b/src/vanna/openai/openai_chat.py index 53990aa9..16f74793 100644 --- a/src/vanna/openai/openai_chat.py +++ b/src/vanna/openai/openai_chat.py @@ -11,14 +11,10 @@ def __init__(self, client=None, config=None): # default parameters - can be overrided using config self.temperature = 0.7 - self.max_tokens = 500 if "temperature" in config: self.temperature = config["temperature"] - if "max_tokens" in config: - self.max_tokens = config["max_tokens"] - if "api_type" in config: raise Exception( "Passing api_type is now deprecated. Please pass an OpenAI client instead." @@ -75,7 +71,6 @@ def submit_prompt(self, prompt, **kwargs) -> str: response = self.client.chat.completions.create( model=model, messages=prompt, - max_tokens=self.max_tokens, stop=None, temperature=self.temperature, ) @@ -87,7 +82,6 @@ def submit_prompt(self, prompt, **kwargs) -> str: response = self.client.chat.completions.create( engine=engine, messages=prompt, - max_tokens=self.max_tokens, stop=None, temperature=self.temperature, ) @@ -98,7 +92,6 @@ def submit_prompt(self, prompt, **kwargs) -> str: response = self.client.chat.completions.create( engine=self.config["engine"], messages=prompt, - max_tokens=self.max_tokens, stop=None, temperature=self.temperature, ) @@ -109,7 +102,6 @@ def submit_prompt(self, prompt, **kwargs) -> str: response = self.client.chat.completions.create( model=self.config["model"], messages=prompt, - max_tokens=self.max_tokens, stop=None, temperature=self.temperature, ) @@ -123,7 +115,6 @@ def submit_prompt(self, prompt, **kwargs) -> str: response = self.client.chat.completions.create( model=model, messages=prompt, - max_tokens=self.max_tokens, stop=None, temperature=self.temperature, )