fix: maybe this?

This commit is contained in:
2025-08-07 14:23:48 -07:00
parent 4819c3fdd6
commit 06f260faf5
+13 -7
View File
@@ -64,15 +64,21 @@ export const ai = async(
if (queryString !== null) { if (queryString !== null) {
const database = new PrismaClient(); const database = new PrismaClient();
const data = await database.$runCommandRaw({ const data = await database.$runCommandRaw({
$search: { aggregate: "Documentation",
index: "docs", cursor: {},
text: { pipeline: [
path: { {
wildcard: "*", $search: {
index: "searchProducts",
text: {
path: {
wildcard: "*",
},
query: queryString,
},
}, },
query: queryString,
}, },
}, ],
}); });
parsedPrompt = parsedPrompt.replace( parsedPrompt = parsedPrompt.replace(
"{{context}}", "{{context}}",