Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,9 @@ def process_message(user_input, chat_history, orchestrator_state):
|
|
| 16 |
orchestrator_state = create_orchestrator()
|
| 17 |
|
| 18 |
response = orchestrator_state.process_user_message(user_input)
|
| 19 |
-
chat_history.append(
|
|
|
|
|
|
|
| 20 |
new_state_text = f"当前状态: {orchestrator_state.state.name}"
|
| 21 |
|
| 22 |
return chat_history, orchestrator_state, new_state_text, ""
|
|
@@ -90,5 +92,5 @@ with gr.Blocks(theme=gr.themes.Soft(), title="运筹优化对话平台") as demo
|
|
| 90 |
|
| 91 |
# 【修改后】的代码
|
| 92 |
if __name__ == "__main__":
|
| 93 |
-
demo.launch(
|
| 94 |
|
|
|
|
| 16 |
orchestrator_state = create_orchestrator()
|
| 17 |
|
| 18 |
response = orchestrator_state.process_user_message(user_input)
|
| 19 |
+
chat_history.append({"role": "user", "content": user_input})
|
| 20 |
+
chat_history.append({"role": "assistant", "content": response})
|
| 21 |
+
print(chat_history)
|
| 22 |
new_state_text = f"当前状态: {orchestrator_state.state.name}"
|
| 23 |
|
| 24 |
return chat_history, orchestrator_state, new_state_text, ""
|
|
|
|
| 92 |
|
| 93 |
# 【修改后】的代码
|
| 94 |
if __name__ == "__main__":
|
| 95 |
+
demo.launch()
|
| 96 |
|