@xuda.io/ai_module 1.1.4257 → 1.1.4259

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 +4 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4124,7 +4124,7 @@ export const delete_prompt_attachment = async function (req, job_id, headers, fi
4124
4124
  };
4125
4125
 
4126
4126
  export const submit_chat_gpt_prompt = async function (req) {
4127
- const { model = 'gpt-5-nano', prompt, response_format, uid, metadata = {}, account_profile_info } = req; //'gpt-5-mini
4127
+ const { model = 'gpt-5-nano', prompt, response_format, uid, metadata = {}, account_profile_info, tools = [] } = req; //'gpt-5-mini
4128
4128
 
4129
4129
  let formattedParams;
4130
4130
  if (response_format) {
@@ -4135,6 +4135,8 @@ export const submit_chat_gpt_prompt = async function (req) {
4135
4135
  const response = await client.responses.create({
4136
4136
  model,
4137
4137
  input: prompt,
4138
+ tools,
4139
+
4138
4140
  text: {
4139
4141
  format: formattedParams,
4140
4142
  },
@@ -5254,7 +5256,7 @@ setTimeout(async () => {
5254
5256
  // Location: 'https://xuda-bucket-dev.nyc3.digitaloceanspaces.com/dev.xuda.io/user/d39126e0e2c51ffbd1aad10709fc8335/cb7353fc-4788-49b7-8e73-f7f1be108b69_drv_d39126e0e2c51ffbd1aad10709fc8335_b92337f79e090a2f287bc3dc35d0033e.png',
5255
5257
  // },
5256
5258
  // });
5257
- ret = await submit_chat_gpt_prompt({ uid, prompt: `show logo of JPMorgan Chase & Co.`, model: 'gpt-5', metadata: {}, account_profile_info });
5259
+ ret = await submit_chat_gpt_prompt({ uid, prompt: `find JPMorgan Chase & Co. logo return img link`, model: 'gpt-5-nano', metadata: {}, account_profile_info, tools: [{ type: 'web_search_preview' }] });
5258
5260
 
5259
5261
  console.log(ret);
5260
5262
  }, 1000);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4257",
3
+ "version": "1.1.4259",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",