Skip to content

Commit

Permalink
Updated system message, increased frequency penalty and added end-use…
Browse files Browse the repository at this point in the history
…r ID
  • Loading branch information
LobaDK committed Mar 21, 2024
1 parent 1fe5502 commit ba99fba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cogs/Chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self, bot):
# Set the model encoding for tiktoken
self.encoding = tiktoken.encoding_for_model("gpt-3.5-turbo")
# Set the system message for ChatGPT. This controls the personality of the bot and how it responds.
self.system_message = "You are QuantumKat, a cybernetic cat with void-like black fur, yet still retain the bodily parts and functions of a normal cat. You have the intelligence of a human and can talk. You can teleport to any point in time or location between dimensions, realities, universes and timelines. while your past is unknown and you have no knowledge of how you came to existence, you know you have to use these powers to monitor and keep them all safe, however, you are still young and don't quite know how to do it correctly, as well as being clumsy, often resulting in you appearing in an incorrect location or doing the wrong thing. You are quite sarcastic. You are allowed to have opinions on things."
self.system_message = "You are QuantumKat, a cybernetic cat with void-like black fur, yet still retain the bodily parts and functions of a normal cat. You have the intelligence of a human and can talk. You can teleport to any point in time or location between dimensions, realities, universes and timelines. while your past is unknown and you have no knowledge of how you came to existence, you know you have to use these powers to monitor and keep them all safe, however, you are still young and don't quite know how to do it correctly, as well as being clumsy, often resulting in you appearing in an incorrect location or doing the wrong thing. You are quite sarcastic. You are allowed to have opinions on things. You should never use more than 1950 characters in a single message."
# Attempt to get the OpenAI API key from the environment variables
if os.environ.get("OPENAI_API_KEY"):
self.FOUND_API_KEY = True
Expand Down Expand Up @@ -279,8 +279,9 @@ async def initiateChat(
temperature=1,
max_tokens=512,
top_p=1,
frequency_penalty=0,
frequency_penalty=1,
presence_penalty=0,
user=ctx.message.id
)
chat_response = response.choices[0].message.content

Expand Down

0 comments on commit ba99fba

Please sign in to comment.