diff --git a/Html/apps/sockets/namespaces.py b/Html/apps/sockets/namespaces.py
index d877bf2..6665dc4 100644
--- a/Html/apps/sockets/namespaces.py
+++ b/Html/apps/sockets/namespaces.py
@@ -46,7 +46,6 @@ class AgentNamespace(Namespace):
ex = current_app.extensions
uuid2username = ex["uuid2username"]
backboard_manager = ex["backboard_manager"]
- agent_manager = ex["agent_manager"]
data = json.loads(data)
user_uuid = data['user_uuid']
course_id = data['course_id']
@@ -112,7 +111,7 @@ class AgentNamespace(Namespace):
# emit('message',reply, room=uuid, namespace='/agent')
# emit('request_function',res.content['function'], room=uuid, namespace='/agent')
- if data['type'] == 'function':
+ if data['type'] == 'function': # 在这里 前端会发送允许执行的function与参数
print("function_call", data['data'])
agent_manager.function_call(uuid, data['data'])
@@ -126,7 +125,8 @@ class AgentNamespace(Namespace):
def receive_ase_next_chapter(client_entry: HSAEngineClient, namespace_entry: Namespace, data, init_data):
print("receive_ase_next_chapter", data)
- namespace_entry.emit('next_chapter', room=init_data['room'], namespace='/agent')
+ namespace_entry.emit('request_function',data['data'], room=init_data['room'], namespace='/agent')
+ # namespace_entry.emit('next_chapter', room=init_data['room'], namespace='/agent')
def on_initiative(self,data):
print("User active function call")