refac
This commit is contained in:
@@ -375,7 +375,7 @@
|
||||
return { toolServer, toolServerData, token };
|
||||
};
|
||||
|
||||
const executeTool = async (data, cb) => {
|
||||
const executeTool = async (data, cb, chatId) => {
|
||||
const { toolServer, toolServerData, token } = resolveToolServer(data.server?.url);
|
||||
|
||||
console.log('executeTool', data, toolServer);
|
||||
@@ -386,7 +386,8 @@
|
||||
toolServer.url,
|
||||
data?.name,
|
||||
data?.params,
|
||||
toolServerData
|
||||
toolServerData,
|
||||
chatId
|
||||
);
|
||||
|
||||
console.log('executeToolServer', res);
|
||||
@@ -485,7 +486,7 @@
|
||||
executePythonAsWorker(data.id, data.code, cb, data.files || []);
|
||||
} else if (type === 'execute:tool') {
|
||||
console.log('execute:tool', data);
|
||||
executeTool(data, cb);
|
||||
executeTool(data, cb, event.chat_id);
|
||||
} else if (type === 'request:chat:completion') {
|
||||
console.log(data, $socket.id);
|
||||
const { session_id, channel, form_data, model } = data;
|
||||
|
||||
Reference in New Issue
Block a user