fix: maybe this?

This commit is contained in:
2025-08-07 14:23:48 -07:00
parent 4819c3fdd6
commit 06f260faf5
+7 -1
View File
@@ -64,8 +64,12 @@ 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({
aggregate: "Documentation",
cursor: {},
pipeline: [
{
$search: { $search: {
index: "docs", index: "searchProducts",
text: { text: {
path: { path: {
wildcard: "*", wildcard: "*",
@@ -73,6 +77,8 @@ export const ai = async(
query: queryString, query: queryString,
}, },
}, },
},
],
}); });
parsedPrompt = parsedPrompt.replace( parsedPrompt = parsedPrompt.replace(
"{{context}}", "{{context}}",