@xuda.io/ai_module 1.1.5173 → 1.1.5175

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 +10 -6
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3429,7 +3429,7 @@ export const delete_prompt_attachment = async function (req, job_id, headers, fi
3429
3429
  };
3430
3430
 
3431
3431
  export const submit_chat_gpt_prompt = async function (req) {
3432
- const { model = _conf.default_ai_model, prompt, response_format, uid, metadata = {}, account_profile_info, tools = [] } = req; //'gpt-5-mini
3432
+ const { model = _conf.default_ai_model, prompt, response_format, uid, metadata = {}, account_profile_info, tools = [], conversation_id, response_id } = req; //'gpt-5-mini
3433
3433
 
3434
3434
  let formattedParams;
3435
3435
  if (response_format) {
@@ -3439,7 +3439,7 @@ export const submit_chat_gpt_prompt = async function (req) {
3439
3439
  try {
3440
3440
  let response;
3441
3441
  try {
3442
- response = await client.responses.create({
3442
+ let opt = {
3443
3443
  model,
3444
3444
  input: prompt,
3445
3445
  tools,
@@ -3447,7 +3447,11 @@ export const submit_chat_gpt_prompt = async function (req) {
3447
3447
  text: {
3448
3448
  format: formattedParams,
3449
3449
  },
3450
- });
3450
+ };
3451
+ if (response_id) {
3452
+ opt.previous_response_id = response_id;
3453
+ }
3454
+ response = await client.responses.create(ot);
3451
3455
  report_ai_status(model);
3452
3456
  } catch (err) {
3453
3457
  report_ai_status(model, err);
@@ -4672,9 +4676,9 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4672
4676
  // for (const suggestion of prompt_suggestions) {
4673
4677
  // emitToDashboard('stream_delta', `<button title="${suggestion.agent_description}" onclick="alert('Hello World!')">${suggestion.short_action}</button>`);
4674
4678
  // }
4675
- emitToDashboard('stream_delta', 'suggestions start');
4676
- emitToDashboard('stream_delta', JSON.stringify(prompt_suggestions));
4677
- emitToDashboard('stream_delta', 'suggestions end');
4679
+ // emitToDashboard('stream_delta', 'suggestions start');
4680
+ emitToDashboard('suggestions', JSON.stringify(prompt_suggestions));
4681
+ // emitToDashboard('stream_delta', 'suggestions end');
4678
4682
  };
4679
4683
 
4680
4684
  // try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5173",
3
+ "version": "1.1.5175",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",