@xuda.io/ai_module 1.1.4754 → 1.1.4756
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 +5 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3291,7 +3291,7 @@ export const update_ai_agent_properties = async function (doc, app_id, uid, fiel
|
|
|
3291
3291
|
Infrastructure & Cloud`,
|
|
3292
3292
|
model: 'gpt-5-nano',
|
|
3293
3293
|
metadata: { agent_id: db_doc._id, func: 'get_agent_category' },
|
|
3294
|
-
account_profile_info
|
|
3294
|
+
account_profile_info,
|
|
3295
3295
|
});
|
|
3296
3296
|
|
|
3297
3297
|
return ret.data;
|
|
@@ -4147,7 +4147,7 @@ export const submit_chat_gpt_prompt = async function (req) {
|
|
|
4147
4147
|
format: formattedParams,
|
|
4148
4148
|
},
|
|
4149
4149
|
});
|
|
4150
|
-
account_module.record_ai_usage(uid, response.usage.input_tokens, response.usage.output_tokens, 'submit chat', prompt, model, metadata, account_profile_info);
|
|
4150
|
+
account_module.record_ai_usage(uid, response.usage.input_tokens, response.usage.output_tokens, 'submit chat', prompt, model, metadata, account_profile_info, tools);
|
|
4151
4151
|
return { code: 5, data: response.output_text };
|
|
4152
4152
|
} catch (err) {
|
|
4153
4153
|
return { code: -5, data: err.message };
|
|
@@ -6189,7 +6189,7 @@ export const get_profile_avatar = async function (profile_picture, uid, prompt,
|
|
|
6189
6189
|
const create_avatar_from_pic = async function () {
|
|
6190
6190
|
const { bio, country, mainCategory, subCategory } = metadata;
|
|
6191
6191
|
// const { first_name, last_name, bio, country, mainCategory, subCategory } = account_obj.account_info;
|
|
6192
|
-
const model = 'chatgpt-image-latest';
|
|
6192
|
+
const model = 'gpt-image-1-mini'; // 'chatgpt-image-latest';
|
|
6193
6193
|
const ai_avatar_response = await client.images.edit({
|
|
6194
6194
|
model,
|
|
6195
6195
|
image: image_blob_ret.image_blob,
|
|
@@ -6508,7 +6508,8 @@ const create_ai_agent_image = async function (req, job_id, headers) {
|
|
|
6508
6508
|
const image_blob_ret = await get_image_blob_from_downloaded_image(url);
|
|
6509
6509
|
//////////////////
|
|
6510
6510
|
imageBase64 = Buffer.from(await image_blob_ret.image_blob.arrayBuffer()).toString('base64');
|
|
6511
|
-
const model = 'chatgpt-image-latest';
|
|
6511
|
+
// const model = 'chatgpt-image-latest';
|
|
6512
|
+
const model = 'gpt-image-1-mini';
|
|
6512
6513
|
const ai_avatar_response = await client.images.edit({
|
|
6513
6514
|
model,
|
|
6514
6515
|
image: image_blob_ret.image_blob,
|