Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -169,11 +169,11 @@ def function(Textbox, Textbox2, Textbox3):
|
|
169 |
# chat = openai.ChatCompletion.create(
|
170 |
# model="gpt-3.5-turbo", messages=messages
|
171 |
# )
|
172 |
-
|
173 |
-
reply =
|
174 |
# reply = reply.replace(" ", "%20")
|
175 |
image_array = download_image(f"https://api.placid.app/u/pydav4ibo?quote[text]={reply}")
|
176 |
-
print(
|
177 |
messages.append({"role": "assistant", "content": reply})
|
178 |
return image_array
|
179 |
except Exception as e:
|
|
|
169 |
# chat = openai.ChatCompletion.create(
|
170 |
# model="gpt-3.5-turbo", messages=messages
|
171 |
# )
|
172 |
+
post = requests.post("https://vercel-ai-gpt16k.vercel.app/api/chat", json=messages)
|
173 |
+
reply = post.content.decode("utf-8")
|
174 |
# reply = reply.replace(" ", "%20")
|
175 |
image_array = download_image(f"https://api.placid.app/u/pydav4ibo?quote[text]={reply}")
|
176 |
+
print(post.content)
|
177 |
messages.append({"role": "assistant", "content": reply})
|
178 |
return image_array
|
179 |
except Exception as e:
|