@xuda.io/ai_module 1.1.5174 → 1.1.5176
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 +10 -3
- 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
|
-
|
|
3442
|
+
let opt = {
|
|
3443
3443
|
model,
|
|
3444
3444
|
input: prompt,
|
|
3445
3445
|
tools,
|
|
@@ -3447,7 +3447,14 @@ export const submit_chat_gpt_prompt = async function (req) {
|
|
|
3447
3447
|
text: {
|
|
3448
3448
|
format: formattedParams,
|
|
3449
3449
|
},
|
|
3450
|
-
}
|
|
3450
|
+
};
|
|
3451
|
+
if (conversation_id) {
|
|
3452
|
+
opt.conversationId = conversation_id;
|
|
3453
|
+
}
|
|
3454
|
+
if (response_id) {
|
|
3455
|
+
opt.previous_response_id = response_id;
|
|
3456
|
+
}
|
|
3457
|
+
response = await client.responses.create(ot);
|
|
3451
3458
|
report_ai_status(model);
|
|
3452
3459
|
} catch (err) {
|
|
3453
3460
|
report_ai_status(model, err);
|