✨ 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
This commit updates the OpenCommit workflow configuration in the `.github/workflows/opencommit.yml` file. The changes include:
- Ignoring certain branches (`main`, `master`, `dev`, `development`, `release`) for triggering the workflow.
- Setting up the Node.js environment with Node.js version 16.
- Checking out the repository with a fetch depth of 0.
- Using the `di-sukharev/opencommit@github-action-v1.0.4` action for running the OpenCommit process.
- Providing the necessary environment variables, including the GitHub token and OpenAI API key.
- Customizing the OpenCommit behavior with the following options:
- Maximum tokens: 500
- Base path: ''
- Description: false
- Emoji: false
- Model: gpt-3.5-turbo
- Language: en
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