Update app.py
Browse files
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,
|