Spaces:
Sleeping
Sleeping
Pavithiran
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,6 @@ def respond(
|
|
29 |
response = ""
|
30 |
|
31 |
try:
|
32 |
-
response_dict = {"response": ""}
|
33 |
for message in client.chat_completion(
|
34 |
messages,
|
35 |
max_tokens=max_tokens,
|
@@ -38,9 +37,9 @@ def respond(
|
|
38 |
top_p=top_p,
|
39 |
):
|
40 |
token = message.choices[0].delta.content
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
except Exception as e:
|
45 |
yield f"Error: {e}"
|
46 |
"""
|
|
|
29 |
response = ""
|
30 |
|
31 |
try:
|
|
|
32 |
for message in client.chat_completion(
|
33 |
messages,
|
34 |
max_tokens=max_tokens,
|
|
|
37 |
top_p=top_p,
|
38 |
):
|
39 |
token = message.choices[0].delta.content
|
40 |
+
|
41 |
+
response += token
|
42 |
+
yield response
|
43 |
except Exception as e:
|
44 |
yield f"Error: {e}"
|
45 |
"""
|