Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -150,12 +150,12 @@ def function(Textbox,Textbox2, Textbox3):
|
|
150 |
{"role": "user", "content": i}
|
151 |
)
|
152 |
try:
|
153 |
-
sleep(0.8)
|
154 |
-
|
155 |
-
"
|
156 |
-
|
157 |
# reply = chat.choices[0].message.content
|
158 |
-
reply =
|
159 |
messages.append({"role": "assistant", "content": reply})
|
160 |
return reply
|
161 |
except:
|
|
|
150 |
{"role": "user", "content": i}
|
151 |
)
|
152 |
try:
|
153 |
+
# sleep(0.8)
|
154 |
+
chat = openai.ChatCompletion.create(
|
155 |
+
model="gpt-3.5-turbo", messages=messages
|
156 |
+
)
|
157 |
# reply = chat.choices[0].message.content
|
158 |
+
reply = chat.choices[0].message.content
|
159 |
messages.append({"role": "assistant", "content": reply})
|
160 |
return reply
|
161 |
except:
|