@xuda.io/ai_module 1.1.4143 → 1.1.4144

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 +2 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2021,7 +2021,7 @@ export const unarchive_ai_chat = async function (req) {
2021
2021
  // }
2022
2022
  // };
2023
2023
 
2024
- const create_image = async function (uid, prompt, model = 'gpt-image-1-mini', size = '1024x1024', n = 1, width = 256, height = 256, metadata = {}) {
2024
+ const create_image = async function (uid, prompt, model = 'gpt-image-1-mini', size = '1024x1024', n = 1, width = 256, height = 256, metadata = {}, account_profile_info) {
2025
2025
  try {
2026
2026
  const response = await client.images.generate({
2027
2027
  model,
@@ -2065,7 +2065,7 @@ const create_image = async function (uid, prompt, model = 'gpt-image-1-mini', si
2065
2065
 
2066
2066
  const thumbnailBase64 = resized.toString('base64');
2067
2067
 
2068
- record_chat_usage(uid, response.usage.input_tokens, response.usage.output_tokens, 'create image', prompt, model, metadata);
2068
+ record_chat_usage(uid, response.usage.input_tokens, response.usage.output_tokens, 'create image', prompt, model, metadata, account_profile_info);
2069
2069
 
2070
2070
  return thumbnailBase64;
2071
2071
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4143",
3
+ "version": "1.1.4144",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",