Skip to content

Commit

Permalink
fix issue with openAiBaseURL not being set
Browse files Browse the repository at this point in the history
  • Loading branch information
abi committed Nov 30, 2023
1 parent 0c532e5 commit fa6f579
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async def stream_code(websocket: WebSocket):

# Get the OpenAI Base URL from the request. Fall back to environment variable if not provided.
openai_base_url = None
if params["openAiBaseURL"]:
if "openAiBaseURL" in params and params["openAiBaseURL"]:
openai_base_url = params["openAiBaseURL"]
print("Using OpenAI Base URL from client-side settings dialog")
else:
Expand All @@ -122,7 +122,7 @@ async def stream_code(websocket: WebSocket):
print("Using OpenAI Base URL from environment variable")

if not openai_base_url:
print("Using Offical OpenAI Base URL")
print("Using offical OpenAI URL")

# Get the image generation flag from the request. Fall back to True if not provided.
should_generate_images = (
Expand Down

0 comments on commit fa6f579

Please sign in to comment.