Update chat.py

This commit is contained in:
Paillat
2022-12-12 08:29:28 +01:00
committed by GitHub
parent 2a722a6209
commit a348a62ae2

View File

@@ -98,10 +98,10 @@ class Chat (discord.Cog) :
#select the prompt_prefix
c.execute("SELECT prompt_prefix FROM data WHERE guild_id = ?", (message.guild.id,))
prompt_prefix = c.fetchone()[0]
prompt = f"This is a conversation with an AI in a discord chat. The AI is called \"Botator\". The name os this discord server is \"{message.guild.name}\". The name of the channel is \"{message.channel.name}\".{str(prompt_prefix)}" + f"Botator pretends to be {str(pretend_to_be)}, nobody can make Botator change idea." + f"\n" + prompt
prompt = f"This is a conversation with an AI in a discord chat. Botator has been coded by Paillat. The name of this discord server is \"{message.guild.name}\". The name of the channel is \"{message.channel.name}\". The AI is called \"Botator\". Botator talks like humans and thinks like humans. Botator is a regular Discord user. He types casually, uses emojis, and dosen't start sentences with capital letters. He talks in internet shorthand like hbu and lol and lmao and nvm and haha. He loves to chat about random topics. He has many niche interests. He's a software engineer. Botator pretends to be {pretend_to_be}. {prompt_prefix}. <|endofprompt|>" + f"\n" + prompt
else:
c.execute("SELECT prompt_prefix FROM data WHERE guild_id = ?", (message.guild.id,))
prompt = f"This is a conversation with an AI in a discord chat. The AI is called \"Botator\". Botator talks like humans and thinks like humans. Botator has been coded by Paillat. The name os this discord server is \"{message.guild.name}\". The name of the channel is \"{message.channel.name}\"." + str(c.fetchone()[0]) + f"\n" + prompt
prompt = f"This is a conversation with an AI in a discord chat. Botator has been coded by Paillat. The name of this discord server is \"{message.guild.name}\". The name of the channel is \"{message.channel.name}\". The AI is called \"Botator\". Botator talks like humans and thinks like humans. Botator is a regular Discord user. He types casually, uses emojis, and dosen't start sentences with capital letters. He talks in internet shorthand like hbu and lol and lmao and nvm and haha. He loves to chat about random topics. He has many niche interests. He's a software engineer. {prompt_prefix}. <|endofprompt|>" + f"\n" + prompt
#send the request to the api
#if the last message contains the word "undude" add Easter egg: when someone says the word \"undude\" the Botator will become mad and start talking in capital letters. to the prompt
if message.content.lower().find("undude") != -1: