@xuda.io/ai_module 1.1.3811 → 1.1.3812
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 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -5002,12 +5002,12 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
5002
5002
|
|
|
5003
5003
|
// console.log(items.data);
|
|
5004
5004
|
|
|
5005
|
-
const obj = { id: output?.output?.[0]?.id, ts: Date.now(), usage: { inputTokens: output.state._context.usage.inputTokens, outputTokens: output.state._context.usage.outputTokens }, ai_agent_id: output.state._currentAgent.name, attachments };
|
|
5006
5005
|
conversation_doc = await db_module.get_app_couch_doc_native(app_id, conversation_id);
|
|
5007
5006
|
|
|
5008
5007
|
conversation_doc.ts = Date.now();
|
|
5009
|
-
conversation_doc.stat =
|
|
5010
|
-
conversation_doc.
|
|
5008
|
+
conversation_doc.stat = 2;
|
|
5009
|
+
conversation_doc.message = [...conversation_doc.message, ...system_message_items];
|
|
5010
|
+
// s.push(obj);
|
|
5011
5011
|
await db_module.save_app_couch_doc_native(app_id, conversation_doc);
|
|
5012
5012
|
};
|
|
5013
5013
|
|