Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -118,7 +118,10 @@ def chat(user_message: str, history: list, thread_id: str, current_phase: int):
|
|
| 118 |
return history, build_progress_bar(current_phase), current_phase, ""
|
| 119 |
|
| 120 |
response = invoke_agent(user_message, thread_id=thread_id)
|
| 121 |
-
history = history + [
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
new_phase = max(current_phase, detect_phase(response))
|
| 124 |
return history, build_progress_bar(new_phase), new_phase, ""
|
|
@@ -305,7 +308,7 @@ def build_ui():
|
|
| 305 |
chatbot = gr.Chatbot(
|
| 306 |
elem_id="chatbot",
|
| 307 |
height=440,
|
| 308 |
-
|
| 309 |
avatar_images=(
|
| 310 |
None,
|
| 311 |
"https://api.dicebear.com/7.x/bottts/svg?seed=bertopic&backgroundColor=4f46e5",
|
|
|
|
| 118 |
return history, build_progress_bar(current_phase), current_phase, ""
|
| 119 |
|
| 120 |
response = invoke_agent(user_message, thread_id=thread_id)
|
| 121 |
+
history = history + [
|
| 122 |
+
{"role": "user", "content": user_message},
|
| 123 |
+
{"role": "assistant", "content": response},
|
| 124 |
+
]
|
| 125 |
|
| 126 |
new_phase = max(current_phase, detect_phase(response))
|
| 127 |
return history, build_progress_bar(new_phase), new_phase, ""
|
|
|
|
| 308 |
chatbot = gr.Chatbot(
|
| 309 |
elem_id="chatbot",
|
| 310 |
height=440,
|
| 311 |
+
value=[],
|
| 312 |
avatar_images=(
|
| 313 |
None,
|
| 314 |
"https://api.dicebear.com/7.x/bottts/svg?seed=bertopic&backgroundColor=4f46e5",
|