Spaces:
Sleeping
Sleeping
HashvardhanCn1
commited on
Commit
•
1c637d0
1
Parent(s):
c09287f
Update app.py
Browse files
app.py
CHANGED
@@ -29,13 +29,16 @@ def respond(
|
|
29 |
|
30 |
response = ""
|
31 |
|
32 |
-
for message in client.
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
39 |
token = message.choices[0].delta.content
|
40 |
|
41 |
response += token
|
|
|
29 |
|
30 |
response = ""
|
31 |
|
32 |
+
for message in chat_completion = client.chat.completions.create(
|
33 |
+
messages=[
|
34 |
+
{
|
35 |
+
"role": "user",
|
36 |
+
"content":prompt,
|
37 |
+
}
|
38 |
+
],
|
39 |
+
model="llama3-8b-8192",
|
40 |
+
stream=False,
|
41 |
+
):
|
42 |
token = message.choices[0].delta.content
|
43 |
|
44 |
response += token
|