@xuda.io/ai_module 1.1.5200 → 1.1.5201
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 +6 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4182,6 +4182,12 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4182
4182
|
await update_job('initiating conversation');
|
|
4183
4183
|
let prompt_suggestions = [];
|
|
4184
4184
|
|
|
4185
|
+
const get_prompt_suggestions = function () {
|
|
4186
|
+
return new Promise(async (resolve, reject) => {
|
|
4187
|
+
const ret = await get_chat_suggestions({ uid, ai_agents, conversation_item_id: out_conversation_item_save_ret.data.id, context: prompt });
|
|
4188
|
+
});
|
|
4189
|
+
};
|
|
4190
|
+
|
|
4185
4191
|
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);
|
|
4186
4192
|
|
|
4187
4193
|
conversation_doc.stat = 2;
|