GenaiBots is a comprehensive framework designed for automating and managing interactions across various digital platforms. It is primarily an enterprise tool for integrating generative AI into operational processes through mediums such as instant messaging, emails, ticketing tools, or internal tools. Utilizing advanced AI and a modular plugin system, it enables the creation of sophisticated operational flows and interaction models tailored for both businesses and developers.
More details in the wiki https://github.com/YounitedCredit/younited-genaibots/wiki You can use also chat with the dedicated GPT here for any question related to the installtion, configuration and development of GenaiBots: https://chatgpt.com/g/g-HGEDT9hA2-genaibots-assistant
- AI Enhancements: Integrate generative AI at the core of interactions. This enables not only custom AI generation through prompts but also the ability to trigger actions and manage processes with a rapid feedback loop.
- Custom Action Handlers: Easily create custom actions based on specific triggers and conditions, and invoke them directly through prompts.
- Extensible Plugin Architecture: Expand functionality or integrate third-party services through plugins, ensuring flexibility and extensibility.
- Integration with Enterprise Systems: Interface generative AI seamlessly within the core IT infrastructure via a web server or Docker container. This allows processing and tracking tasks performed by bots across various contexts (messaging, ticketing tools, emails, custom applications).
- Dynamic Backend Services: Integrates with various backend services for data processing and storage, allowing the system to adapt to specific enterprise use cases and requirements.
- Operating System: Compatible with Windows, MacOS, and Linux.
- Python Version: 3.8 or later.
- Additional Libraries and Dependencies: Listed in the
requirements.txt
file.
- Clone the Repository
git clone https://github.com/YounitedCredit/younited-genaibots cd genaibots
- Setup Virtual Environment (Recommended)
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Install Dependencies
pip install -r requirements.txt
Configure the application settings by editing the config.yaml
file in the config
directory. Ensure all necessary API keys and database configurations are set correctly.
The config.yaml
file centralizes the configuration settings for the GenaiBots application. Here are some key sections and their purposes:
-
BOT_CONFIG: Contains settings related to bot behavior and debugging levels.
LOG_DEBUG_LEVEL
: Defines the debug level for logging.PROMPTS_FOLDER
,CORE_PROMPT
,MAIN_PROMPT
,SUBPROMPTS_FOLDER
: Specify the directories and files for prompts.SHOW_COST_IN_THREAD
: Toggle to show cost information in threads.- Various plugin default names and behaviors are also configured here.
-
UTILS: Contains utility configurations, such as logging settings.
LOGGING
: Configures logging, including file system paths and Azure settings.
-
PLUGINS: Defines available plugins and their configurations.
- Categories include
ACTION_INTERACTIONS
,BACKEND
,USER_INTERACTIONS
,GENAI_INTERACTIONS
, andUSER_INTERACTIONS_BEHAVIORS
.
- Categories include
The environment variables are loaded via python-dotenv
, typically from a .env
file. This allows the application to securely load sensitive data like API keys and database URLs. Here's a basic overview of how environment setup works in GenaiBots:
- Loading Environment Variables:
load_dotenv()
function is called to load environment variables from a.env
file into the application. - Accessing Environment Variables: The configuration settings in
config.yaml
can reference these environment variables using the$(ENV_VAR_NAME)
syntax.
Execute the following command in the project root directory:
python app.py
This will start the server and begin handling requests based on configured actions and triggers.
To debug the application in Visual Studio Code, use the following command:
c:; cd 'c:\repos\Yuc.GenaiBots'; & 'C:\Users\<your profile>\miniconda3\python.exe' 'c:\Users\<your profile>\.vscode\extensions\ms-python.debugpy-2024.6.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher' '64580' '--' '-m' 'uvicorn' 'app:app' '--host' 'localhost' '--port' '7071' '--workers' '1'
GenaiBots employs a modular plugin architecture categorized into several families:
-
Action Interactions:
- Default Plugins: Predefined actions for common tasks.
- Custom Plugins: User-defined actions tailored to specific needs.
-
Backend:
- Handles internal data processing and interactions with backend services.
-
User Interactions:
- Instant Messaging: Plugins for handling messaging platforms like Slack and Teams.
- Custom API: Plugins to interact with custom APIs.
-
GenAI Interactions:
- Text: Plugins for generating and handling text interactions using AI.
- Image: Plugins for generating and handling image interactions using AI.
- Vector Search: Plugins for handling vector search functionalities.
-
User Interactions Behaviors:
- Defines the behavior of user interactions across different messaging platforms and custom APIs.
This project is licensed under the MIT License - see the LICENSE.md
file for more details.
For any support queries or to report issues, please visit our GitHub Issues page at: https://github.com/YounitedCredit/younited-genaibots/issues