Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,6 +29,7 @@ hermes = "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO"
|
|
29 |
codellama = "codellama/CodeLlama-70b-Instruct-hf"
|
30 |
|
31 |
async def chat(conversationId, ip, cookie):
|
|
|
32 |
url = f"https://huggingface.co/chat/conversation/{conversationId}"
|
33 |
|
34 |
payload = {
|
@@ -47,8 +48,9 @@ async def chat(conversationId, ip, cookie):
|
|
47 |
"content-type": "application/json",
|
48 |
}
|
49 |
|
50 |
-
|
51 |
-
|
|
|
52 |
|
53 |
@client.tree.command(
|
54 |
description="Starts the conversation with Lyre.",
|
|
|
29 |
codellama = "codellama/CodeLlama-70b-Instruct-hf"
|
30 |
|
31 |
async def chat(conversationId, ip, cookie):
|
32 |
+
s = requests.Session()
|
33 |
url = f"https://huggingface.co/chat/conversation/{conversationId}"
|
34 |
|
35 |
payload = {
|
|
|
48 |
"content-type": "application/json",
|
49 |
}
|
50 |
|
51 |
+
response = s.post(url, json=payload, headers=headers)
|
52 |
+
return response
|
53 |
+
s.close()
|
54 |
|
55 |
@client.tree.command(
|
56 |
description="Starts the conversation with Lyre.",
|