bug resolutions

This commit is contained in:
Lukian LEIZOUR 2024-03-15 21:48:59 +01:00
parent 414a9734c9
commit cb16fa9239
13 changed files with 78 additions and 81 deletions

View file

@ -1,8 +1,6 @@
import { Events, Message, Collection } from "discord.js";
import { getChatResponse, MistralMessage, Models, InputPrice, OutputPrice, ReturnedValue } from "../libs/mistralai";
import { User, connectToDb, addUser, getUser, incrementQuota } from "../libs/mysql";
const data = require("../../config.json");
import { getChatResponse, MistralMessage, Models, InputPrice, OutputPrice, ReturnedValue, Prompts } from "../libs/mistralai.js";
import { User, connectToDb, addUser, getUser, incrementQuota } from "../libs/mysql.js";
export async function getMessages(message: Message, channelid: string, userid: string): Promise<MistralMessage[]> {
var discordMessages = await message.channel.messages.fetch({ limit: 7 })
@ -12,7 +10,7 @@ export async function getMessages(message: Message, channelid: string, userid: s
var messages: MistralMessage[] = [
{
role: "system",
content: data.defaultPrompt
content: Prompts.default,
}
]