✨ feat(makeprompt.py): add `is_ignorable` function to check if a message content is ignorable based on certain conditions
✨ feat(makeprompt.py): add `fetch_messages_history` function to fetch message history from a channel with optional limit and original message parameters
🐛 fix(makeprompt.py): remove unnecessary file close statement after reading prompt file
✨ feat(config.py): add gpt_3_5_turbo_prompt variable to store the content of the prompt file
✨ feat(makeprompt.py): use gpt_3_5_turbo_prompt variable instead of reading the prompt file again
🔥 chore(makeprompt.py): remove unnecessary comment about ignoring messages from bots
🔥 chore(makeprompt.py): remove unnecessary comment about ignoring messages from guild or dm channel not in the database
The 'api_key' argument was being passed to the openai_caller function unnecessarily in the moderate function. This argument is not needed as it is already being passed when creating the caller object. Removing this redundant argument improves code readability and reduces potential confusion.
The api_key argument is not needed in the openai_caller function call as it is not being used within the function. Removing the argument improves code readability and removes unnecessary code.
fix(openaicaller.py): fix import statement for num_tokens_from_messages function
refactor(openaicaller.py): remove unused api_key parameter from openai_caller class constructor
refactor(openaicaller.py): change generate_response and moderation methods to accept variable number of arguments
refactor(openaicaller.py): change error_call parameter to be optional and provide a default function if not provided
refactor(openaicaller.py): remove unused api_key parameter from generate_response and moderation methods
refactor(openaicaller.py): remove unused api_key parameter from main function
The issue was that when the response content was longer than 2000 characters, it was not being fully sent in the chatgpt_process function. This was fixed by adding a loop to send the content in chunks of 2000 characters until the entire content is sent.
The following changes were made:
- Updated the introduction to clarify that Botator is currently chatting in a Discord server.
- Clarified that Botator uses abbreviations like "u" and "ur" for lazy speech.
- Removed duplicate instruction about not asking how to assist the user.
- Added instructions for formatting text using markdown.
- Added instructions for using function calls and replying with gifs.
- Clarified that users should address Botator using the pronouns "Master/Brain".
- Updated the instruction about using emojis to avoid being cringe.
- Added information about the server and channel names.
- Mentioned the limited access to text chats and inability to see images or avatars.
- Added the current time information.
- Provided information about the creator of Botator.
- Updated the instruction about responding to insults to be funny but not mean.
- Added a note about using level 1, 2, and 3 markdown headings.
- Added an instruction for clashing with users in a funny way when insulted or treated unkindly.
These changes were made to improve the behavior and capabilities of Botator in the Discord server, making interactions more engaging and enjoyable for users.
feat(functionscalls.py): add new functions send_ascii_art_text and send_ascii_art_image to send messages and images in ascii art
fix(makeprompt.py): import send_ascii_art_text and send_ascii_art_image functions and add corresponding if statements to handle function calls
feat(config.py): add support for TENOR_API_KEY environment variable to be able to use Tenor API for sending gifs
feat(functionscalls.py): add new function send_a_gif to send a gif in the channel
fix(makeprompt.py): add support for calling send_a_gif function in chatgpt_process function
The guidelines for chatbot responses have been updated. The following changes have been made:
- Added a reminder to avoid using words like "u" and "ur" in responses.
- Emphasized that the chatbot's goal is not to assist the user unless explicitly asked.
- Added a reminder to avoid asking how the chatbot can assist the user.
- Mentioned that function calls can be used, and if a message is included, it should be passed as a facultative parameter.
- Added a note to use emojis in messages, but not excessively.
These changes have been made to improve the quality and consistency of the chatbot's responses.
refactor(functionscalls.py): extract get_final_url function to improve code modularity and reusability
refactor(functionscalls.py): simplify send_a_stock_image function by using get_final_url function and improving message formatting
feat(main.py): add newline at the end of the file for consistency
chore(functionscalls.py): remove extra blank lines
feat(functionscalls.py): add unsplash_random_image_url constant for generating random image URLs
feat(functionscalls.py): add add_reaction_to_last_message() function for adding reactions to the last message
The guidelines for Botator's behavior have been updated to reflect the following changes:
- The use of "u" instead of "you" and "ur" instead of "your" is allowed to maintain a casual and humorous tone.
- Botator will never proactively ask the user if they need help. Its goal is to engage in conversation and assist only when explicitly requested.
- Function calls can be used to perform actions, and a message parameter can be included to provide additional context.
- Emojis can be used in messages, but in moderation to avoid being excessive.
- In some cases, Botator may choose to respond with "I don't care" or a similar phrase instead of providing a meaningful answer.
These updates aim to enhance Botator's personality and ensure a more enjoyable user experience.