We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
initialize_openai
1 parent 3470581 commit bf0ca67Copy full SHA for bf0ca67
operate/config.py
@@ -22,12 +22,10 @@ def __init__(self):
22
self.google_api_key = os.getenv("GOOGLE_API_KEY", "")
23
24
def initialize_openai(self):
25
- if self.openai_api_key:
26
- client = OpenAI()
27
- client.api_key = self.openai_api_key
28
- client.base_url = os.getenv("OPENAI_API_BASE_URL", client.base_url)
29
- return client
30
- return None
+ client = OpenAI()
+ client.api_key = self.openai_api_key
+ client.base_url = os.getenv("OPENAI_API_BASE_URL", client.base_url)
+ return client
31
32
def validation(self, model, voice_mode):
33
"""
0 commit comments