@xuda.io/ai_module 1.1.5307 → 1.1.5309
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +4 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -5064,7 +5064,7 @@ setTimeout(async () => {
|
|
|
5064
5064
|
|
|
5065
5065
|
///////////////////////
|
|
5066
5066
|
|
|
5067
|
-
const run_plugin = async function (app_id, uid, plugin_name, method, prop_data, dev = true, req = {}, testing =
|
|
5067
|
+
const run_plugin = async function (app_id, uid, plugin_name, method, prop_data, dev = true, req = {}, testing = true) {
|
|
5068
5068
|
const db_module = await import(`${module_path}/db_module/index.mjs`);
|
|
5069
5069
|
|
|
5070
5070
|
const get_path = function (resource) {
|
|
@@ -5111,7 +5111,7 @@ const run_plugin = async function (app_id, uid, plugin_name, method, prop_data,
|
|
|
5111
5111
|
}
|
|
5112
5112
|
return data_obj;
|
|
5113
5113
|
};
|
|
5114
|
-
|
|
5114
|
+
|
|
5115
5115
|
console.log('Testing plugin with:', { app_id, uid });
|
|
5116
5116
|
|
|
5117
5117
|
const couch_ret = await db_module.get_app_couch_nano(app_id);
|
|
@@ -5196,7 +5196,7 @@ const run_plugin = async function (app_id, uid, plugin_name, method, prop_data,
|
|
|
5196
5196
|
}
|
|
5197
5197
|
};
|
|
5198
5198
|
|
|
5199
|
-
const get_plugin_tool = async function (app_id, uid, plugin_name, method, prop_data, dev = true, req = {}) {
|
|
5199
|
+
const get_plugin_tool = async function (app_id, uid, plugin_name, method, prop_data, dev = true, req = {}, agent_info = {}) {
|
|
5200
5200
|
const db_module = await import(`${module_path}/db_module/index.mjs`);
|
|
5201
5201
|
|
|
5202
5202
|
init(undefined, undefined, _, true, undefined, undefined, undefined, undefined, undefined, true, z);
|
|
@@ -5273,7 +5273,7 @@ const get_plugin_tool = async function (app_id, uid, plugin_name, method, prop_d
|
|
|
5273
5273
|
|
|
5274
5274
|
const fields = await get_fields_data(_method.fields, prop_data);
|
|
5275
5275
|
const params = fields;
|
|
5276
|
-
const env = { couch, app_id, uid, userName };
|
|
5276
|
+
const env = { couch, app_id, uid, userName, agent_info };
|
|
5277
5277
|
const setup_doc = plugin_doc.setup || { OPENAI_API_KEY: _conf.OPENAI_API_KEY };
|
|
5278
5278
|
|
|
5279
5279
|
///////////////////////
|