This commit is contained in:
2025-08-07 14:25:26 -07:00
parent e300aa890f
commit 1653ee5e8a
+2 -2
View File
@@ -11,8 +11,8 @@ import { PrismaClient } from "@prisma/client";
import { prompt } from "../config/prompt.js"; import { prompt } from "../config/prompt.js";
import { calculateCost } from "../utils/calculateCost.js"; import { calculateCost } from "../utils/calculateCost.js";
import { errorHandler } from "../utils/errorHandler.js"; import { errorHandler } from "../utils/errorHandler.js";
import type { Client, Message, SendableChannels } from "discord.js";
import { logger } from "../utils/logger.js"; import { logger } from "../utils/logger.js";
import type { Client, Message, SendableChannels } from "discord.js";
const anthropic = new Anthropic({ const anthropic = new Anthropic({
apiKey: process.env.ANTHROPIC_KEY ?? "", apiKey: process.env.ANTHROPIC_KEY ?? "",
@@ -63,7 +63,7 @@ export const ai = async(
: null; : null;
let parsedPrompt = prompt; let parsedPrompt = prompt;
if (queryString !== null) { if (queryString !== null) {
await logger.log("debug": `AI module: Query string: ${queryString}`); await logger.log("debug", `AI module: Query string: ${queryString}`);
const database = new PrismaClient(); const database = new PrismaClient();
const data = await database.$runCommandRaw({ const data = await database.$runCommandRaw({
aggregate: "Documentation", aggregate: "Documentation",