Update app.py
Browse files
app.py
CHANGED
|
@@ -79,6 +79,7 @@ def respond(message, history: list[dict]):
|
|
| 79 |
]
|
| 80 |
})
|
| 81 |
raw = agent_output["output"]
|
|
|
|
| 82 |
|
| 83 |
try:
|
| 84 |
out = parser.parse(raw)
|
|
@@ -93,8 +94,10 @@ def respond(message, history: list[dict]):
|
|
| 93 |
print("Fallback to exception: raw")
|
| 94 |
assistant_text = raw
|
| 95 |
|
| 96 |
-
|
| 97 |
|
|
|
|
|
|
|
| 98 |
'''for message in client.chat_completion(
|
| 99 |
messages,
|
| 100 |
model="HuggingFaceH4/zephyr-7b-beta",
|
|
|
|
| 79 |
]
|
| 80 |
})
|
| 81 |
raw = agent_output["output"]
|
| 82 |
+
print(message)
|
| 83 |
|
| 84 |
try:
|
| 85 |
out = parser.parse(raw)
|
|
|
|
| 94 |
print("Fallback to exception: raw")
|
| 95 |
assistant_text = raw
|
| 96 |
|
| 97 |
+
response = {"role": "assistant", "content": assistant_text}
|
| 98 |
|
| 99 |
+
yield response
|
| 100 |
+
|
| 101 |
'''for message in client.chat_completion(
|
| 102 |
messages,
|
| 103 |
model="HuggingFaceH4/zephyr-7b-beta",
|