@xuda.io/ai_module 1.1.4572 → 1.1.4573

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 +6 -6
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -5181,9 +5181,9 @@ const ai_chat_conversation = async function (req, job_id, headers) {
5181
5181
  // };
5182
5182
  // await db_module.save_app_couch_doc_native(account_profile_info.app_id, conversation_item_obj);
5183
5183
 
5184
- let out_conversation_item_obj = {
5184
+ let in_conversation_item_obj = {
5185
5185
  _id: await _common.xuda_get_uuid('chat_conversation_item'),
5186
- stat: 1,
5186
+ stat: 3,
5187
5187
  docType: 'chat_conversation_item',
5188
5188
  uid,
5189
5189
  conversation_type: 'ai_chat',
@@ -5191,10 +5191,10 @@ const ai_chat_conversation = async function (req, job_id, headers) {
5191
5191
  date_created_ts: Date.now(),
5192
5192
  ts: Date.now(),
5193
5193
  conversation_id,
5194
- text: prompt,
5195
- reference_id: conversation_doc.reference_id,
5196
- direction: 'out',
5197
- role: 'user',
5194
+ text: output.state._currentStep.output,
5195
+ reference_id: output.state._lastTurnResponse.responseId,
5196
+ direction: 'in',
5197
+ role: 'assistant',
5198
5198
  };
5199
5199
  await db_module.save_app_couch_doc_native(account_profile_info.app_id, out_conversation_item_obj);
5200
5200
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4572",
3
+ "version": "1.1.4573",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",