read access code from params
This commit is contained in:
parent
78a10c9571
commit
b46d08b416
@ -79,6 +79,10 @@ async def stream_code(websocket: WebSocket):
|
|||||||
|
|
||||||
# Get the OpenAI API key from the request. Fall back to environment variable if not provided.
|
# Get the OpenAI API key from the request. Fall back to environment variable if not provided.
|
||||||
# If neither is provided, we throw an error.
|
# If neither is provided, we throw an error.
|
||||||
|
openai_api_key = None
|
||||||
|
if "accessCode" in params and params["accessCode"]:
|
||||||
|
print("Using access code")
|
||||||
|
else:
|
||||||
if params["openAiApiKey"]:
|
if params["openAiApiKey"]:
|
||||||
openai_api_key = params["openAiApiKey"]
|
openai_api_key = params["openAiApiKey"]
|
||||||
print("Using OpenAI API key from client-side settings dialog")
|
print("Using OpenAI API key from client-side settings dialog")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user