awacke1 commited on
Commit
3ba94db
·
1 Parent(s): 410c41e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -198,7 +198,9 @@ def chat_with_model(prompt, document_section, model_choice='gpt-3.5-turbo'):
198
  res_box = st.empty()
199
  collected_chunks = []
200
  collected_messages = []
201
-
 
 
202
  for chunk in openai.ChatCompletion.create(
203
  model='gpt-3.5-turbo',
204
  messages=conversation,
 
198
  res_box = st.empty()
199
  collected_chunks = []
200
  collected_messages = []
201
+
202
+ key = os.getenv('OPENAI_KEY')
203
+ openai.api_key = key
204
  for chunk in openai.ChatCompletion.create(
205
  model='gpt-3.5-turbo',
206
  messages=conversation,