@xuda.io/ai_module 1.1.4593 → 1.1.4595
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 +3 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -6331,6 +6331,7 @@ export const unpin_ai_agent = async function (req, job_id, headers) {
|
|
|
6331
6331
|
|
|
6332
6332
|
const attachment_handler = async function (uid, app_id, conversation_id, attachments, account_profile_info) {
|
|
6333
6333
|
if (!attachments?.length) return;
|
|
6334
|
+
let conversation_doc = await db_module.get_app_couch_doc_native(app_id, conversation_id);
|
|
6334
6335
|
|
|
6335
6336
|
const get_transcript = async function (filename) {
|
|
6336
6337
|
async function streamToBuffer(fileStream) {
|
|
@@ -6451,7 +6452,7 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
|
|
|
6451
6452
|
|
|
6452
6453
|
// prompt += await generate_XU_markdown('attachment', file); //`[]`;
|
|
6453
6454
|
|
|
6454
|
-
const items = await client.conversations.items.create(conversation_doc.
|
|
6455
|
+
const items = await client.conversations.items.create(conversation_doc.reference_conversation_id, {
|
|
6455
6456
|
items: [
|
|
6456
6457
|
{
|
|
6457
6458
|
type: 'message',
|
|
@@ -6492,7 +6493,7 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
|
|
|
6492
6493
|
|
|
6493
6494
|
// console.log(items.data);
|
|
6494
6495
|
|
|
6495
|
-
|
|
6496
|
+
conversation_doc = await db_module.get_app_couch_doc_native(app_id, conversation_id);
|
|
6496
6497
|
|
|
6497
6498
|
conversation_doc.ts = Date.now();
|
|
6498
6499
|
conversation_doc.stat = 2;
|