@xuda.io/ai_module 1.1.3939 → 1.1.3941

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.
Files changed (2) hide show
  1. package/index.mjs +11 -0
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -6390,3 +6390,14 @@ const record_chat_usage = async function (uid, input_tokens, output_tokens, sour
6390
6390
  console.error(err);
6391
6391
  }
6392
6392
  };
6393
+
6394
+ export const create_mini_app = async function (req) {
6395
+ const { uid, prompt } = req;
6396
+ try {
6397
+ const { account_project_id: app_id, account_info } = await account_module.get_default_project_account_doc(uid);
6398
+ const param = { uid, properties: { menuName: agentConfig.agent_name, menuTitle: agentConfig.agent_name, menuType: 'ai_agent' }, checkedInUserName: account_info.first_name + ' ' + account_info.last_name, app_id, parentId: 'ai_agents' };
6399
+ var agent_doc = createDoc(param);
6400
+ } catch (err) {
6401
+ return { code: -33, data: err.message || String(err) };
6402
+ }
6403
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3939",
3
+ "version": "1.1.3941",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",