fix bug with print statement when no key is sent in
This commit is contained in:
parent
51147bed66
commit
1cf4d544d5
@ -48,7 +48,8 @@ async def stream_code_test(websocket: WebSocket):
|
|||||||
print("Using OpenAI API key from client-side settings dialog")
|
print("Using OpenAI API key from client-side settings dialog")
|
||||||
else:
|
else:
|
||||||
openai_api_key = os.environ.get("OPENAI_API_KEY")
|
openai_api_key = os.environ.get("OPENAI_API_KEY")
|
||||||
print("Using OpenAI API key from environment variable")
|
if openai_api_key:
|
||||||
|
print("Using OpenAI API key from environment variable")
|
||||||
|
|
||||||
if not openai_api_key:
|
if not openai_api_key:
|
||||||
print("OpenAI API key not found")
|
print("OpenAI API key not found")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user