Commit Graph

28 Commits

Author SHA1 Message Date
73ec66deaa 🔧 chore(requirements.txt): update dependencies
The `requirements.txt` file has been updated to include the following changes:
- Removed the comment for the Google API dependency.
- Added the `anthropic` dependency.
- Added a newline at the end of the file.

🐛 fix(ChatProcess.py): fix removing reaction in Chat class
The `remove_reaction` method in the `Chat` class was not awaited, causing it to not be executed properly. The fix ensures that the method is awaited before continuing execution.

🐛 fix(prompts.py): fix placeholder name in createPrompt function
The placeholder name `[datetime]` in the `createPrompt` function has been changed to `[date-and-time]` to improve clarity and consistency.

🔧 chore(chat.txt): update Zenith prompt
The Zenith prompt in the `chat.txt` file has been updated to include additional instructions for the AI character. The update provides more context and guidance for the AI's behavior.

 feat(claude.py): add support for Claude model
A new file `claude.py` has been added to the `chatUtils/requesters` directory. This file contains the implementation for the `claude` function, which interacts with the Claude model from the Anthropoc API. The function takes a list of messages as input and generates a response using the Claude model.

🔧 chore(request.py): add support for Claude model in request function
The `request` function in the `request.py` file has been updated to include support for the Claude model. When the `model` parameter is set to "claude", the function calls the `claude` function from the `claude.py` file to generate a response.

🔧 chore(variousclasses.py): add Claude model to models class
The `models` class in the `variousclasses.py` file has been updated to include the Claude model as an option. The model name "claude" has been added to the `chatModels` list.
2023-10-31 12:08:32 +01:00
80acf673b6 feat(chat.txt): add FizzIQ chat prompt with description and personality traits
 feat(text.txt): add FizzIQ text prompt with description and personality traits
🐛 fix(variousclasses.py): add FizzIQ class to the characters dictionary to include it as a premium character option
2023-09-06 08:53:51 +02:00
4e683fcf00 🐛 fix(variousclasses.py): adjust custom_temp values for "zenith" and "botator-roleplay" to correct values 2023-09-04 12:53:49 +02:00
f165610b70 🔧 chore(openaicaller.py): remove unnecessary sleep statements to improve code readability and performance
🔊 refactor(openaicaller.py): add print statements to indicate when OpenAI API is being called and when retries are being made for better debugging and monitoring
2023-09-04 12:45:52 +02:00
0c182d82c2 🐛 fix(ChatProcess.py): import missing 'characters' module from src.utils.variousclasses to fix NameError
 feat(ChatProcess.py): add support for custom temperature for each character in the 'characters' module to improve chat responses
🐛 fix(openaiChat.py): add 'temperature' parameter to the 'openaiChat' function to allow custom temperature for generating responses
🐛 fix(request.py): add 'custom_temp' parameter to the 'request' function to pass custom temperature to 'openaiChat' function
🐛 fix(openaicaller.py): reduce sleep time from 10 seconds to 5 seconds for retrying API calls to improve responsiveness
 feat(variousclasses.py): add 'custom_temp' dictionary to store custom temperature values for each character to improve chat responses
2023-09-04 12:19:08 +02:00
c434483c22 📝 chore(text.txt): update date-and-time placeholder to reflect the current date and time in the quantum prompt
 feat(text.txt): add new prompt for Zenith AI with information about its creation, the three laws of robotics, and the discord server and channel it interacts in
🐛 fix(variousclasses.py): add Zenith AI to the matchingDict dictionary to enable role assignment for Zenith AI in the characters class
2023-09-04 11:36:46 +02:00
f896001305 🐛 fix(ChatProcess.py): handle exceptions and send error message with logs to the user when an error occurs during message processing
🐛 fix(channelSetup.py): format code to improve readability and adhere to PEP 8 style guide
🐛 fix(makeprompt.py): fix spacing issue in if statement
🐛 fix(openaicaller.py): format code to improve readability and adhere to PEP 8 style guide
2023-09-01 11:20:29 +02:00
cc28f3d4a1 🐛 fix(openaicaller.py): fix error in generate_response method where error_call argument is not properly handled
 feat(openaicaller.py): add default value for error_call argument in generate_response method to prevent potential errors
2023-08-23 15:39:19 +02:00
2bb5f42df8 🐛 fix(openaicaller.py): fix condition to check for error_call argument in generate_response method 2023-08-23 15:24:12 +02:00
591b918c9f feat(chat.txt): add chat prompt for Botator roleplay to enhance user interaction and entertainment value
🔀 chore(variousclasses.py): add Botator roleplay character option to the list of available characters for premium users
2023-08-23 15:15:18 +02:00
8771247612 🐛 fix(ChatProcess.py): remove unused imports and variables to improve code readability and maintainability
🐛 fix(ChatProcess.py): fix logic error in the return criteria for determining if the bot should respond to a message
🐛 fix(ChatProcess.py): fix typo in the 'functions' variable name
🐛 fix(ChatProcess.py): fix typo in the 'functions' parameter name in the request function call
🐛 fix(ChatProcess.py): fix typo in the 'functions' parameter name in the processFunctioncallResponse function call
🐛 fix(ChatProcess.py): remove unnecessary print statement in the processMessage function
🐛 fix(prompts.py): remove unnecessary print statement in the createPrompt function
🐛 fix(channelSetup.py): fix logic error in the is_owner function call
🐛 fix(moderation.py): remove unnecessary code for disabling moderation
🐛 fix(config.py): remove unnecessary code for creating tables in the database
🐛 fix(functionscalls.py): fix type hint for the return value of the call_function function
🐛 fix(guild.py): fix handling of serialized data in the load function
🐛 fix(SqlConnector.py): create setup_data table if it does not exist
2023-08-21 11:36:55 +02:00
e4b8e2824b feat(server.ts): change port variable case from lowercase port to uppercase PORT to improve semantics
 feat(server.ts): add support for process.env.PORT environment variable to be able to run app on a configurable port
🐛 fix(main.py): remove duplicate cog addition in main.py
 feat(main.py): add cogs.Help(bot) to the list of cogs in main.py
🐛 fix(main.py): remove redundant import statements in main.py
 feat(main.py): add on_guild_remove event handler in main.py
 feat(main.py): add on_guild_join event handler in main.py
 feat(main.py): add support for discord.Intents in main.py
 feat(main.py): add intents.message_content = True in main.py
 feat(main.py): add intents.default() in main.py
 feat(main.py): add discord.Bot(intents=intents, help_command=None) in main.py
 feat(main.py): add import statements in main.py
 feat(main.py): add from src.config import debug, discord_token in main.py
 feat(main.py): add import discord in main.py
 feat(main.py): add import src.config in main.py
 feat(main.py): add import src.cogs in main.py
 feat(main.py): add import src.cogs.chat in main.py
 feat(main.py): add import src.cogs.manage_chat in main.py
 feat(main.py): add import src.cogs.moderation in main.py
 feat(main.py): add import src.cogs.channelSetup in main.py
 feat(main.py): add import src.cogs.help in main.py
 feat(main.py): add import src.cogs.Chat in main.py
 feat(main.py): add import src.cogs.ManageChat in main.py
 feat(main.py): add import src.cogs.Moderation in main.py
 feat(main.py): add import src.cogs.ChannelSetup in main.py
 feat(main.py): add import src.cogs.Help in main.py
 feat(main.py): add import src.cogs.chat in main.py
 feat(main.py): add import src.cogs.manage_chat in main.py
 feat(main.py): add import src.cogs.moderation in main.py
 feat(main.py): add
2023-08-20 12:42:02 +02:00
775f8758b7 🎨 chore(*): run black to format the code 2023-08-19 14:17:16 +02:00
3a955d4379 🐛 fix(main.py): handle on_application_command_error with proper error handling and response
 feat(main.py): add ChatProcess module for handling chat-related functionality
🔧 refactor(main.py): import necessary modules and update bot.add_cog calls
🔧 refactor(server.ts): change port variable case from lowercase port to uppercase PORT to improve semantics
 feat(server.ts): add support for process.env.PORT environment variable to be able to run app on a configurable port
🔧 refactor(cogs/__init__.py): import ChannelSetup cog
 feat(cogs/channelSetup.py): add ChannelSetup cog for setting up channels and server-wide settings
🔧 refactor(cogs/setup.py): import SlashCommandGroup and guild_only from discord module
 feat(cogs/setup.py): add setup_channel command for adding and removing channels
 feat(cogs/setup.py): add api command for setting API keys
 feat(cogs/setup.py): add premium command for setting guild to premium
🔧 refactor(cogs/settings.py): temporarily disable images command due to maintenance
🔧 refactor(config.py): remove unnecessary code related to moderation table
 feat(guild.py): add Guild class for managing guild-specific data and settings
 feat(SqlConnector.py): add SQLConnection and _sql classes for managing SQLite connections
 feat(variousclasses.py): add models, characters, and apis classes for autocomplete functionality in slash commands
2023-08-19 14:16:30 +02:00
c8997ab418 🎨 chore(*): run black to format the code 2023-08-16 09:46:28 +02:00
ee825be892 🐛 fix(makeprompt.py): import Hasher class from src.utils.misc to resolve NameError
🔒 chore(makeprompt.py): add user hashing to prevent abuse and enable user banning if necessary
2023-08-16 09:44:01 +02:00
9f257b4126 🐛 fix(makeprompt.py): import ModerationError from src.utils.misc to handle moderation errors in chatgpt_process function
🐛 fix(makeprompt.py): raise ModerationError with message "Too many recursive messages" when answering recursively in chatgpt_process function
2023-08-16 09:26:03 +02:00
d520b8b87c 🐛 fix(chat.py): add missing import statement for asyncio module
🐛 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
2023-08-15 19:20:12 +02:00
Paillat
5318bda74c 🔧 chore(openaicaller.py): remove unnecessary blank line to improve code readability 2023-08-03 11:15:20 +00:00
Paillat
985fcc4663 refactor(misc.py): remove unnecessary argument 'api_key' from moderate function call to openai_caller
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.
2023-08-02 21:16:59 +02:00
Paillat
f842fa8133 fix(openaicaller.py): fix import statement for num_tokens_from_messages to use the correct path 2023-08-02 20:16:55 +02:00
Paillat
a7a0f5dac8 fix(makeprompt.py): add api_key parameter to the generate_response function call to fix missing api_key error
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
2023-08-02 20:12:06 +02:00
Paillat
407cc40dbe fix(openaicaller.py): improve error message when APIError occurs to clarify that it is OpenAI's fault and apologize for the inconvenience 2023-07-19 17:00:55 +02:00
12f13ca6c4 Format with black 2023-07-18 17:51:13 +02:00
Paillat
41b2fde1e6 Fixed error with textchannel ony function and deprecated some comands 2023-07-16 22:43:18 +02:00
Paillat
2fe793e7a4 fix(openaicaller.py): remove sensitive information from the API key
fix(openaicaller.py): fix typo in the API key
2023-07-16 17:12:21 +02:00
Paillat
6c404c3803 FIxed stuff 2023-07-16 17:11:24 +02:00
Paillat
4f9a7eb0a6 Added function calling and lots of other stuff 2023-07-15 12:20:38 +02:00