Update app.py
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ def call_openai_api(user_prompt):
|
|
| 40 |
{"role": "system", "content": "You are a research assistant. Provide factual short answers to your prompts."},
|
| 41 |
{"role": "user", "content": f"{text}\n\n{user_prompt}"},
|
| 42 |
],
|
| 43 |
-
stream
|
| 44 |
)
|
| 45 |
ai_response = response.choices[0].message['content']
|
| 46 |
chat_history += f"\nUser: {user_prompt}\nAI: {ai_response}"
|
|
|
|
| 40 |
{"role": "system", "content": "You are a research assistant. Provide factual short answers to your prompts."},
|
| 41 |
{"role": "user", "content": f"{text}\n\n{user_prompt}"},
|
| 42 |
],
|
| 43 |
+
stream: true
|
| 44 |
)
|
| 45 |
ai_response = response.choices[0].message['content']
|
| 46 |
chat_history += f"\nUser: {user_prompt}\nAI: {ai_response}"
|