Closed himanshugt16 closed 1 month ago
The recent changes enhance the bot framework's support for Large Language Models (LLMs) by introducing a new management system for LLM secrets. Key updates include the addition of the LLMSecret
class, improved validation mechanisms, and streamlined APIs for retrieving and managing LLM configurations. These modifications aim to increase flexibility, robustness, and integration capabilities, allowing for better handling of diverse LLMs and their secrets.
Files | Change Summary |
---|---|
kairon/actions/definitions/bot_response.py , kairon/shared/actions/utils.py |
Added DEFAULT_LLM parameter for flexibility in response generation and rephrasing. |
kairon/actions/definitions/prompt.py , kairon/api/app/routers/bot/action.py |
Introduced validations for LLM model existence before predictions, enhancing robustness. |
kairon/api/app/routers/bot/bot.py , kairon/api/models.py |
Added new API endpoint for listing provider models and updated PromptActionConfigRequest to include bot field for validation. |
kairon/importer/validator/file_validator.py , kairon/shared/admin/processor.py |
Updated validation methods to accept bot parameter for context-specific checks and introduced new methods for LLM secret management. |
kairon/shared/admin/data_objects.py |
Introduced LLMSecret class for managing LLM-related secrets with enhanced validation. |
tests/integration_test/action_service_test.py , tests/unit_test/admin/admin_processor_test.py |
Refactored tests to use LLMSecret , ensuring comprehensive coverage of new functionalities. |
sequenceDiagram
participant User
participant API
participant LLMSecret
participant Sysadmin
participant BotResponse
User->>API: Request LLM model list
API->>LLMSecret: Fetch model details
LLMSecret->>Sysadmin: Retrieve LLM secrets
Sysadmin-->>LLMSecret: Return secrets
LLMSecret-->>API: Respond with model list
API-->>User: Return list of available models
πβ¨ In the meadow bright and fair,
A botβs secrets fill the air.
With LLMs dancing, oh what glee!
New paths for wisdom, wild and free.
Letβs hop along, our joy to share,
In fields of code, we craft with care! πβ¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Tests