From 06f260faf5bd08e94e167ecedb04a4dab949b5ff Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Thu, 7 Aug 2025 14:23:48 -0700 Subject: [PATCH] fix: maybe this? --- bot/src/modules/ai.ts | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/bot/src/modules/ai.ts b/bot/src/modules/ai.ts index 6100e9d..3dab592 100644 --- a/bot/src/modules/ai.ts +++ b/bot/src/modules/ai.ts @@ -64,15 +64,21 @@ export const ai = async( if (queryString !== null) { const database = new PrismaClient(); const data = await database.$runCommandRaw({ - $search: { - index: "docs", - text: { - path: { - wildcard: "*", + aggregate: "Documentation", + cursor: {}, + pipeline: [ + { + $search: { + index: "searchProducts", + text: { + path: { + wildcard: "*", + }, + query: queryString, + }, }, - query: queryString, }, - }, + ], }); parsedPrompt = parsedPrompt.replace( "{{context}}",