Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,10 +2,9 @@ import openai
|
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
model_id = "gpt-3.5-turbo"
|
| 5 |
-
conversation = []
|
| 6 |
|
| 7 |
# Getting responses using the OpenAI API
|
| 8 |
-
def answer_chatgpt(api_key, message, history, conversation):
|
| 9 |
history = history or []
|
| 10 |
prompt = f"{message}"
|
| 11 |
conversation.append({"role": "user", "content": f"{prompt}"})
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
model_id = "gpt-3.5-turbo"
|
|
|
|
| 5 |
|
| 6 |
# Getting responses using the OpenAI API
|
| 7 |
+
def answer_chatgpt(api_key, message, history, conversation=[]):
|
| 8 |
history = history or []
|
| 9 |
prompt = f"{message}"
|
| 10 |
conversation.append({"role": "user", "content": f"{prompt}"})
|