@xuda.io/ai_module 1.1.5240 → 1.1.5242
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 +3 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4204,8 +4204,8 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4204
4204
|
|
|
4205
4205
|
const render_output_suggestions = async function (response_conversation_item_id) {
|
|
4206
4206
|
console.log('prompt_suggestions', prompt_suggestions);
|
|
4207
|
-
|
|
4208
|
-
const ret = await get_chat_suggestions({ uid, ai_agents, conversation_item_id: response_conversation_item_id });
|
|
4207
|
+
const agentIds = prompt_suggestions.map((agent) => agent.agent_id);
|
|
4208
|
+
const ret = await get_chat_suggestions({ uid, ai_agents, conversation_item_id: response_conversation_item_id, exclude_agents: agentIds });
|
|
4209
4209
|
|
|
4210
4210
|
if (ret && ret.code > -1) {
|
|
4211
4211
|
emitToDashboard('suggestions', JSON.stringify(ret.data));
|
|
@@ -11102,7 +11102,7 @@ export const get_chat_suggestions = async function (req) {
|
|
|
11102
11102
|
|
|
11103
11103
|
// Define the response format as a fixed-length array of 5
|
|
11104
11104
|
const AgentResponseSchema = z.object({
|
|
11105
|
-
agents: z.array(
|
|
11105
|
+
agents: z.array(AgentItemSchema).max(no_of_suggestions),
|
|
11106
11106
|
});
|
|
11107
11107
|
//${conversation_item_doc.text}
|
|
11108
11108
|
const chat_ret = await submit_chat_gpt_prompt({
|