Solarum Asteridion commited on
Commit
fed36b4
·
verified ·
1 Parent(s): afe890a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -17,9 +17,10 @@ logger = logging.getLogger(__name__)
17
  # Set up OpenAI authentication
18
  def setup_openai_auth():
19
  api_key = os.environ.get("LLM_API_KEY")
 
20
  if not api_key:
21
  raise Exception("LLM API authentication failed. Please set your LLM_API_KEY environment variable.")
22
- client = OpenAI(api_key=api_key)
23
  return client
24
 
25
  # Initialize OpenAI client
 
17
  # Set up OpenAI authentication
18
  def setup_openai_auth():
19
  api_key = os.environ.get("LLM_API_KEY")
20
+ baseurl = os.environ.get("LLM_API_BASE_URL")
21
  if not api_key:
22
  raise Exception("LLM API authentication failed. Please set your LLM_API_KEY environment variable.")
23
+ client = OpenAI(api_key=api_key, base_url=baseurl)
24
  return client
25
 
26
  # Initialize OpenAI client