Commit graph

16 commits

Author SHA1 Message Date
c7c2cbc95f
feat: support password-based Matrix login
Some checks failed
Docker CI/CD / Docker Build and Push to Docker Hub (push) Has been cancelled
This update introduces the ability for the bot to use a Matrix UserID and password for authentication, in addition to the existing Access Token method. Upon the first run with UserID and password, the bot automatically converts these credentials into an Access Token, updates the configuration with this token, and removes the password for security purposes. This enhancement simplifies the initial setup process for new users by directly utilizing Matrix login credentials, aligning with common user authentication workflows and enhancing security by not storing passwords long-term.

Refactored the bot initialization process in `GPTBot.from_config` to support dynamic login method selection based on provided credentials, and implemented automatic configuration updating to reflect the newly obtained Access Token and cleaned credentials.

Minor adjustments include formatting and comment clarification for better readability and maintenance.

This change addresses the need for a more straightforward and secure authentication process for bot deployment and user experience improvement.
2024-04-23 18:05:50 +02:00
0acc1456f9
Enable tool emulation and improved error logging
Introduced a configuration option to emulate tool usage in models that do not natively support tools, facilitating the use of such functionality without direct model support. This should benefit users aiming to leverage tool-based features without relying on specific AI models. Additionally, enhanced error logging in the GPTBot class by including traceback details, aiding in debugging and incident resolution.

- Added `EmulateTools` option in the `config.dist.ini` for flexible tool handling.
- Enriched error logging with stack traces in `bot.py` for better insight during failures.
2023-12-29 22:46:19 +01:00
57b68ef3e3
Enhance Pantalaimon integration and config
Integrated Pantalaimon support with updated configuration instructions and examples, facilitating secure communication when using the Matrix homeserver. The .gitignore is now extended to exclude a Pantalaimon configuration file, preventing sensitive information from accidental commits. Removed encryption callbacks and related functions as the application leverages Pantalaimon for E2EE, simplifying the codebase and shifting encryption responsibilities externally. Streamlined dependency management by removing the requirements.txt in favor of pyproject.toml, aligning with modern Python practices. This change overall improves security handling and eases future maintenance.
2023-12-05 10:09:14 +01:00
54dd80ed50
feat: Enable calling tools in chat completion
This commit adds functionality to call tools within the chat completion model. By introducing the `call_tool()` method in the `GPTBot` class, tools can now be invoked with the appropriate tool call. The commit also includes the necessary changes in the `OpenAI` class to handle tool calls during response generation. Additionally, new tool classes for geocoding and dice rolling have been implemented. This enhancement aims to expand the capabilities of the bot by allowing users to leverage various tools directly within the chat conversation.
2023-11-28 18:15:21 +01:00
5a1a3733c5
Update OpenAI configuration with ImageModel and related changes
Previously, there was no option to specify the model for image generation in the OpenAI configuration. This commit adds a new option called "ImageModel" where you can specify the desired model. The default value for this option is "dall-e-2".

In the `GPTBot` class, the OpenAI object is now initialized with the `ImageModel` option if it is provided in the configuration. This allows the bot to use the specified image generation model in addition to the chat model.

Furthermore, in the `OpenAI` class, the `image_api` attribute has been renamed to `image_model` to reflect its purpose more accurately. The default value has also been updated to "dall-e-2" to align with the new configuration option.

This commit ensures that the OpenAI configuration is up-to-date and allows users to specify the desired image generation model.
2023-11-07 14:02:10 +01:00
b1b274be57
Allow setting BaseURL for OpenAI API 2023-05-31 18:21:07 +00:00
cce082ef67
Bump version to 0.1.0
Improve logging
Black formatting
2023-05-25 12:41:32 +00:00
55809a9a39
Make it an importable module
Abandon DuckDB in favor of sqlite3
2023-05-25 07:28:28 +00:00
50f4a11f00
Implement simple permission system 2023-05-09 12:32:35 +00:00
cfeaae3fac
Add an AI generated logo
Set logo as room/space avatar
Stay admin when creating a room
Add a settings table to the database
2023-05-09 11:30:51 +00:00
7fbeff9d9c
TrackingMore integration
Fix newroom command
2023-05-05 11:58:57 +00:00
2fb607310d
Preparation for automatic message classification 2023-05-01 06:11:43 +00:00
bf23771989
Added support for DALL-E and WolframAlpha
New "imagine" and "calculate" commands
Implemented image sending
Moved OpenAI specific code to OpenAI class
Abstracted away OpenAI API in bot class
Minor fixes
2023-04-28 10:01:27 +00:00
2bbc6a33ca
Moving migrations to subdirectory
Add option for custom system messages per room
Fixing some methods in store
2023-04-24 08:48:59 +00:00
60dc6094e8
A bunch of changes
Switched from sqlite3 to DuckDB
Added comments to config template
Added more options to configuration
Added systemd service file
Added migration logging to database
Added command handling for help, room creation, stats, bot info
Improved context handling
Added some config checks
Added auto-detection of bot's Matrix user ID
Added more info to README
2023-04-17 20:28:29 +00:00
67779b8335
Initial working version 2023-04-16 14:08:57 +00:00