🔒 chore(chat.py): add moderation check for message content in call_function() to prevent sending blocked messages
🔒 chore(chat.py): add moderation check for query in call_function() to prevent sending blocked queries
🔒 chore(makeprompt.py): add moderation check for content in chatgpt_process() to prevent sending blocked content
🔒 chore(makeprompt.py): add depth check to prevent recursive answering in chatgpt_process()
🐛 fix(chat.py): fix import statement for banusr module
✨ feat(chat.py): add functionality to ban and unban users with botator!ban and botator!unban commands
✨ feat(chat.py): add functionality to send messages from banned users after a delay
✨ feat(banusr.py): create banusr module to handle banning and unbanning of users
✨ feat(banusr.py): add functionality to ban a user by appending their ID to banend_users list
✨ feat(banusr.py): add functionality to unban a user by removing their ID from banend_users list
🔧 chore(functionscalls.py): add 'evaluate_math' function to evaluate math expressions
🔧 chore(makeprompt.py): refactor 'chatgpt_process' to use 'prepare_messages' function for message preparation
✨ feat(functionscalls.py): add call_function function to handle function calls with name and arguments
🔧 fix(makeprompt.py): remove individual function imports from functionscalls and use call_function instead
✨ feat(functionscalls.py): add error handling for missing arguments in function calls
🐛 fix(makeprompt.py): fix typo in function_call variable name
🔀 chore(gpt-3.5-turbo.txt): update instructions to only use provided functions
✨ 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