GianJSX commited on
Commit
503b13d
1 Parent(s): 8037acc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -88,7 +88,7 @@ async def wait_for_key():
88
  if res:
89
  await cl.Message(content="setting up...", indent=1).send()
90
  # check if the key is valid
91
- client = OpenAI(api_key=cl.user_session.get("api_key"))
92
  try:
93
  stream = client.chat.completions.create(
94
  model=model,
 
88
  if res:
89
  await cl.Message(content="setting up...", indent=1).send()
90
  # check if the key is valid
91
+ client = OpenAI(api_key=res["content"])
92
  try:
93
  stream = client.chat.completions.create(
94
  model=model,