@xuda.io/ai_module 1.1.5197 → 1.1.5199

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 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3076,6 +3076,9 @@ const get_drive_file_response = async function (drive_type, app_id, uid, file_pa
3076
3076
  const doc = check_existing_file_ret.duplicates[0];
3077
3077
  const _region = process.env.XUDA_HOSTNAME; // "eu.xuda.io"; //
3078
3078
  let file_location = doc?.bucket?.[_region]?.Location;
3079
+ if (!file_location) {
3080
+ file_location = doc?.bucket?.[process.env.XUDA_HOSTNAME_ALT]?.Location;
3081
+ }
3079
3082
 
3080
3083
  try {
3081
3084
  // const res = await fetch(file_location);
@@ -4179,7 +4182,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4179
4182
  await update_job('initiating conversation');
4180
4183
  let prompt_suggestions = [];
4181
4184
 
4182
- const suggestionsPromise = activate_prompt_suggestions ? get_chat_suggestions({ uid, ai_agents, conversation_item_id: out_conversation_item_save_ret.data.id }) : Promise.resolve(null);
4185
+ const suggestionsPromise = activate_prompt_suggestions ? get_chat_suggestions({ uid, ai_agents, conversation_item_id: out_conversation_item_save_ret.data.id, context: prompt }) : Promise.resolve(null);
4183
4186
 
4184
4187
  conversation_doc.stat = 2;
4185
4188
  conversation_doc.ts = Date.now();
@@ -10932,7 +10935,7 @@ export const open_ai_alive_check = async function () {};
10932
10935
  // };
10933
10936
 
10934
10937
  export const get_chat_suggestions = async function (req) {
10935
- const { uid, conversation_item_id, no_of_suggestions = 3, ai_model = _conf.default_ai_model } = req;
10938
+ const { uid, conversation_item_id, no_of_suggestions = 3, ai_model = _conf.default_ai_model, context } = req;
10936
10939
  let { ai_agents } = req;
10937
10940
 
10938
10941
  try {
@@ -11023,7 +11026,7 @@ export const get_chat_suggestions = async function (req) {
11023
11026
 
11024
11027
  Input: ${conversation_item_doc.prompt || conversation_doc.prompt}
11025
11028
 
11026
- Output to Process: Use the previous response output as the content to analyze for next agents.
11029
+ Output to Process: ${context ? context : 'Use the previous response output as the content to analyze for next agents.'}
11027
11030
 
11028
11031
  Agent Source: ${JSON.stringify(agents_docs)}
11029
11032
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5197",
3
+ "version": "1.1.5199",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",