Fix AI
This commit is contained in:
parent
dbe4014421
commit
130013f1e1
1 changed files with 5 additions and 1 deletions
|
@ -20,6 +20,7 @@ aibot = AIBot(config.get("mistral_api_key"), model="open-mixtral-8x7b")
|
|||
|
||||
intents = discord.Intents.default()
|
||||
intents.members = True
|
||||
intents.message_content = True
|
||||
|
||||
bot = discord.Bot(description=description, intents=intents)
|
||||
|
||||
|
@ -41,7 +42,10 @@ async def reply(message):
|
|||
|
||||
async def ai_reply(message):
|
||||
print("Running AI")
|
||||
answer = aibot.answer(message.clean_content)
|
||||
prompt = message.clean_content
|
||||
if prompt == "" and message.embeds:
|
||||
prompt = message.embeds[0].description
|
||||
answer = aibot.answer(prompt)
|
||||
embed = discord.Embed(
|
||||
description=answer,
|
||||
thumbnail="https://mistral.ai/images/favicon/favicon-32x32.png",
|
||||
|
|
Loading…
Reference in a new issue