@xuda.io/ai_module 1.1.4174 → 1.1.4175
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 +9 -9
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2564,7 +2564,7 @@ export const delete_ai_agent = async function (req) {
|
|
|
2564
2564
|
|
|
2565
2565
|
const account_profile_info = await account_module.get_active_account_profile_info(uid);
|
|
2566
2566
|
|
|
2567
|
-
const project_db = await get_account_project_db(uid);
|
|
2567
|
+
// const project_db = await get_account_project_db(uid);
|
|
2568
2568
|
|
|
2569
2569
|
try {
|
|
2570
2570
|
let prog_doc = await db_module.get_app_couch_doc_native(app_id, agent_id);
|
|
@@ -3496,12 +3496,12 @@ const transcribe = async function (uid, stream, metadata, account_profile_info)
|
|
|
3496
3496
|
}
|
|
3497
3497
|
};
|
|
3498
3498
|
|
|
3499
|
-
const get_account_project_db = async function (uid) {
|
|
3500
|
-
|
|
3499
|
+
// const get_account_project_db = async function (uid) {
|
|
3500
|
+
// const user_project_id = await account_module.get_account_default_project_id(uid);
|
|
3501
3501
|
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
};
|
|
3502
|
+
// const project_db = await get_project_db(user_project_id);
|
|
3503
|
+
// return project_db;
|
|
3504
|
+
// };
|
|
3505
3505
|
|
|
3506
3506
|
const get_app_obj = async function (app_id) {
|
|
3507
3507
|
const db = get_xuda_couch('xuda_master');
|
|
@@ -4499,7 +4499,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4499
4499
|
const app_obj = await get_app_obj(conversation_doc.account_profile_info.app_id);
|
|
4500
4500
|
const userName = await account_module.get_user_name(uid);
|
|
4501
4501
|
const account_info = (await account_module.get_account_name({ uid })).data;
|
|
4502
|
-
let context = { ...{ app_id, uid, userName, account_info, app_obj, account_id: uid }, ...extractClientInfo(headers) };
|
|
4502
|
+
let context = { ...{ app_id: conversation_doc.account_profile_info.app_id, uid, userName, account_info, app_obj, account_id: uid }, ...extractClientInfo(headers) };
|
|
4503
4503
|
const d = new Intl.DateTimeFormat('en-US').format(new Date());
|
|
4504
4504
|
if (!visitors[d]) {
|
|
4505
4505
|
visitors[d] = {};
|
|
@@ -4955,7 +4955,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4955
4955
|
}
|
|
4956
4956
|
// const tool = await get_plugin_tool(app_id, uid, val.plugin_id, val.method, {});
|
|
4957
4957
|
const tool = await get_plugin_tool(
|
|
4958
|
-
ai_agent_doc?.reference_doc?.studio_meta?.shared_from_app_id || ai_agent_doc?.reference_doc?.studio_meta?.installed_from_app_id || app_id,
|
|
4958
|
+
ai_agent_doc?.reference_doc?.studio_meta?.shared_from_app_id || ai_agent_doc?.reference_doc?.studio_meta?.installed_from_app_id || account_profile_info.app_id,
|
|
4959
4959
|
ai_agent_doc?.reference_doc?.studio_meta?.shared_from_uid || ai_agent_doc?.reference_doc?.studio_meta?.installed_from_uid || uid,
|
|
4960
4960
|
val.plugin_id,
|
|
4961
4961
|
val.method,
|
|
@@ -6324,7 +6324,7 @@ export const create_mini_app = async function (req, job_id, headers) {
|
|
|
6324
6324
|
let component_doc = createDoc(param);
|
|
6325
6325
|
component_doc.studio_meta.miniApp = true;
|
|
6326
6326
|
|
|
6327
|
-
const name = await submit_chat_gpt_prompt({ uid, prompt: `create title for the prompt return 5 words result maximum text only without options : ${prompt}`, model: 'gpt-5-nano', metadata: { prog_id: component_doc._id, func: 'create_mini_app' } });
|
|
6327
|
+
const name = await submit_chat_gpt_prompt({ uid, prompt: `create title for the prompt return 5 words result maximum text only without options : ${prompt}`, model: 'gpt-5-nano', metadata: { prog_id: component_doc._id, func: 'create_mini_app' } }, account_profile_info);
|
|
6328
6328
|
component_doc.properties.menuName = name.data;
|
|
6329
6329
|
component_doc.properties.menuTitle = name.data;
|
|
6330
6330
|
const data = await db_module.save_app_couch_doc_native(account_profile_info.app_id, component_doc);
|