@xuda.io/ai_module 1.1.4211 → 1.1.4212
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 +6 -6
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3131,7 +3131,7 @@ export const create_ai_agent = async function (req, job_id, headers) {
|
|
|
3131
3131
|
const { account_project_id: app_id, account_info } = await account_module.get_default_project_account_doc(uid);
|
|
3132
3132
|
|
|
3133
3133
|
const account_profile_info = await account_module.get_active_account_profile_info(uid);
|
|
3134
|
-
const {
|
|
3134
|
+
const { account_profile_obj } = account_profile_info;
|
|
3135
3135
|
try {
|
|
3136
3136
|
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: account_profile_info.app_id, parentId: 'ai_agents' };
|
|
3137
3137
|
var agent_doc = createDoc(param);
|
|
@@ -3143,7 +3143,7 @@ export const create_ai_agent = async function (req, job_id, headers) {
|
|
|
3143
3143
|
agent_doc.studio_meta.agent_tags = agentConfig.agent_tags;
|
|
3144
3144
|
agent_doc.studio_meta.agent_user_guide = agentConfig.agent_user_guide;
|
|
3145
3145
|
// agent_doc.studio_meta.account_profile_info = account_profile_info;
|
|
3146
|
-
agent_doc.studio_meta.account_profiles[
|
|
3146
|
+
agent_doc.studio_meta.account_profiles[account_profile_obj];
|
|
3147
3147
|
|
|
3148
3148
|
// const data = await db.insert(agent_doc);
|
|
3149
3149
|
|
|
@@ -4140,7 +4140,7 @@ export const create_conversation = async function (req, job_id, headers) {
|
|
|
4140
4140
|
let { reference_type, reference_id = '', conversation_type } = req;
|
|
4141
4141
|
|
|
4142
4142
|
const account_profile_info = await account_module.get_active_account_profile_info(uid);
|
|
4143
|
-
const {
|
|
4143
|
+
const { account_profile_obj } = account_profile_info;
|
|
4144
4144
|
try {
|
|
4145
4145
|
const conversation_obj = await client.conversations.create();
|
|
4146
4146
|
const t = Date.now();
|
|
@@ -4159,7 +4159,7 @@ export const create_conversation = async function (req, job_id, headers) {
|
|
|
4159
4159
|
conversation_type,
|
|
4160
4160
|
initiator_uid: uid,
|
|
4161
4161
|
|
|
4162
|
-
account_profiles: [
|
|
4162
|
+
account_profiles: [account_profile_obj],
|
|
4163
4163
|
};
|
|
4164
4164
|
const save_ret = await db_module.save_app_couch_doc(account_profile_info.app_id, conversation_doc);
|
|
4165
4165
|
|
|
@@ -6349,12 +6349,12 @@ export const create_mini_app = async function (req, job_id, headers) {
|
|
|
6349
6349
|
try {
|
|
6350
6350
|
const { account_project_id: app_id, account_info } = await account_module.get_default_project_account_doc(uid);
|
|
6351
6351
|
const account_profile_info = await account_module.get_active_account_profile_info(uid);
|
|
6352
|
-
const {
|
|
6352
|
+
const { account_profile_obj } = account_profile_info;
|
|
6353
6353
|
|
|
6354
6354
|
const param = { uid, properties: { menuName: prompt, menuTitle: prompt, menuType: 'component' }, checkedInUserName: account_info.first_name + ' ' + account_info.last_name, app_id, parentId: 'programs' };
|
|
6355
6355
|
let component_doc = createDoc(param);
|
|
6356
6356
|
component_doc.studio_meta.miniApp = true;
|
|
6357
|
-
component_doc.studio_meta.account_profiles[
|
|
6357
|
+
component_doc.studio_meta.account_profiles[account_profile_obj];
|
|
6358
6358
|
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);
|
|
6359
6359
|
component_doc.properties.menuName = name.data;
|
|
6360
6360
|
component_doc.properties.menuTitle = name.data;
|