function_call fix

This commit is contained in:
CakeCN
2025-09-14 13:45:12 +08:00
parent 443e87599a
commit 2b215287ff

View File

@@ -111,9 +111,10 @@ class AgentNamespace(Namespace):
if data['type'] == 'function': # 在这里 前端会发送允许执行的function与参数
print("function_call", data['data'])
res = chatmanager[uuid].function_call(data['data']['name'], data['data'])
data['data'] = res
emit(data['route'], data, room=uuid, namespace='/agent')
d = data['data']
res = chatmanager[uuid].function_call(d['data']['name'], d['data']['args'])
d['data'] = res
emit(d['route'], d, room=uuid, namespace='/agent')
def receive_ase_dialog(client_entry: HSAEngineClient, namespace_entry: Namespace, data, init_data):