From 4701b62f3a18cf67bb10f36852f41d6812825ef3 Mon Sep 17 00:00:00 2001 From: CakeCN Date: Fri, 12 Sep 2025 13:41:33 +0800 Subject: [PATCH] chatmanager replace agentmanager --- Html/apps/sockets/namespaces.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Html/apps/sockets/namespaces.py b/Html/apps/sockets/namespaces.py index 6665dc4..08c2e8a 100644 --- a/Html/apps/sockets/namespaces.py +++ b/Html/apps/sockets/namespaces.py @@ -97,7 +97,7 @@ class AgentNamespace(Namespace): def on_message(self, data): print(f"Message from client: {data}") ex = current_app.extensions - agent_manager = ex["agent_manager"] + chatmanager = ex["user_uuid2chatmanager"] uuid = session.get('user_uuid') user_uuid2ase_client = ex["user_uuid2ase_client"] if (type(data)==str): @@ -113,7 +113,7 @@ class AgentNamespace(Namespace): if data['type'] == 'function': # 在这里 前端会发送允许执行的function与参数 print("function_call", data['data']) - agent_manager.function_call(uuid, data['data']) + chatmanager[uuid].function_call(uuid, data['data']) def receive_ase_dialog(client_entry: HSAEngineClient, namespace_entry: Namespace, data, init_data): @@ -121,11 +121,11 @@ class AgentNamespace(Namespace): def receive_ase_judge(client_entry: HSAEngineClient, namespace_entry: Namespace, data, init_data): print("receive_ase_judge", data) - namespace_entry.emit('request_function', data['data'], room=init_data['room'], namespace='/agent') + namespace_entry.emit('request_function', data['data'], room=init_data['room'], namespace='/agent') # data 是一个列表 /dict也支持 def receive_ase_next_chapter(client_entry: HSAEngineClient, namespace_entry: Namespace, data, init_data): print("receive_ase_next_chapter", data) - namespace_entry.emit('request_function',data['data'], room=init_data['room'], namespace='/agent') + namespace_entry.emit('request_function',data['data'], room=init_data['room'], namespace='/agent') # data 是一个列表 /dict也支持 # namespace_entry.emit('next_chapter', room=init_data['room'], namespace='/agent') def on_initiative(self,data):