@xuda.io/ai_module 1.1.5521 → 1.1.5523

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 +3 -13
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3855,19 +3855,9 @@ const contact_chat_conversation = async function (req, job_id, headers) {
3855
3855
  const sender_app_id = account_profile_info.app_id;
3856
3856
  let sender_conversation_doc = await db_module.get_app_couch_doc_native(sender_app_id, conversation_id);
3857
3857
 
3858
- add_conversation_item(uid, profile_id, conversation_id, prompt, 'chat', conversation_doc.reference_id);
3859
-
3860
- let item;
3861
3858
  try {
3862
- item = await client.conversations.items.create(conversation_doc.reference_conversation_id, {
3863
- items: [
3864
- {
3865
- type: 'message',
3866
- role: 'user',
3867
- content: [{ type: 'input_text', text: prompt }],
3868
- },
3869
- ],
3870
- });
3859
+ add_conversation_item(uid, profile_id, conversation_id, prompt, 'chat', conversation_doc.reference_id);
3860
+
3871
3861
  report_ai_status('conversations');
3872
3862
  } catch (err) {
3873
3863
  report_ai_status('conversations', err);
@@ -5108,7 +5098,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
5108
5098
  }
5109
5099
  };
5110
5100
 
5111
- const add_conversation_item = async function (uid, profile_id, conversation_id, body, conversation_type, contact_id, metadata = {}) {
5101
+ const add_conversation_item = async function (uid, profile_id, conversation_id, body = '', conversation_type, contact_id, metadata = {}) {
5112
5102
  const account_profile_info = await get_active_account_profile_info(uid, profile_id);
5113
5103
 
5114
5104
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5521",
3
+ "version": "1.1.5523",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",