@xuda.io/ai_module 1.1.5260 → 1.1.5262
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 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4207,8 +4207,8 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4207
4207
|
const render_output_suggestions = async function (response_conversation_item_id) {
|
|
4208
4208
|
debugger;
|
|
4209
4209
|
console.log('prompt_suggestions', prompt_suggestions);
|
|
4210
|
-
const
|
|
4211
|
-
const ret = await get_chat_suggestions({ uid, type: 'chat response', ai_agents, conversation_item_id: response_conversation_item_id, exclude_agents
|
|
4210
|
+
const exclude_agents = prompt_suggestions.map((agent) => agent.agent_id);
|
|
4211
|
+
const ret = await get_chat_suggestions({ uid, type: 'chat response', ai_agents, conversation_item_id: response_conversation_item_id, exclude_agents });
|
|
4212
4212
|
|
|
4213
4213
|
if (ret && ret.code > -1) {
|
|
4214
4214
|
emitToDashboard('suggestions', JSON.stringify(ret.data));
|
|
@@ -11047,6 +11047,10 @@ export const get_chat_suggestions = async function (req) {
|
|
|
11047
11047
|
const conversation_item_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_item_id);
|
|
11048
11048
|
const conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_item_doc.conversation_id);
|
|
11049
11049
|
|
|
11050
|
+
if (conversation_item_doc.prompt_selected_suggestion) {
|
|
11051
|
+
exclude_agents = conversation_item_doc.prompt_selected_suggestion.map((agent) => agent.agent_id);
|
|
11052
|
+
}
|
|
11053
|
+
|
|
11050
11054
|
const get_agents = async function () {
|
|
11051
11055
|
if (typeof ai_agents === 'undefined') {
|
|
11052
11056
|
// no agents
|