Closed hasinaxp closed 3 months ago
This update introduces a comprehensive callback system within the Kairon framework, enhancing bot interactions through new asynchronous capabilities. Key features include a robust ActionCallback
class for managing callback actions, updated API endpoints for CRUD operations on callbacks, and improved models for callback configuration and logging. The addition of extensive testing functionalities ensures reliability and efficiency, paving the way for dynamic user interactions across various messaging platforms.
Files | Change Summary |
---|---|
kairon/actions/definitions/callback_action.py , kairon/actions/definitions/factory.py |
Introduced ActionCallback class for managing callback actions; updated ActionFactory to integrate callbacks. |
kairon/api/app/routers/bot/action.py |
Added multiple new API endpoints for managing callback configurations (CRUD operations). |
kairon/api/models.py |
Introduced CallbackConfigRequest and CallbackActionConfigRequest models for structured data validation. |
kairon/async_callback/channel_message_dispacher.py , kairon/async_callback/processor.py |
Added ChannelMessageDispatcher for handling messages across platforms; introduced CallbackProcessor . |
kairon/shared/callback/data_objects.py |
Introduced CallbackConfig and utility functions for managing callback data and validation. |
tests/unit_test/callback_test.py |
Added unit tests for validating callback system functionalities, including encryption and message handling. |
requirements/prod.txt , system.yaml |
Updated dependencies to include fernet for encryption and added configurations for async callback actions. |
sequenceDiagram
participant User
participant API
participant CallbackProcessor
participant Logger
participant Database
User->>API: Request callback action
API->>CallbackProcessor: Validate and execute action
CallbackProcessor->>Database: Retrieve configuration
Database-->>CallbackProcessor: Return configuration
CallbackProcessor->>Logger: Log execution details
Logger-->>CallbackProcessor: Confirm log
CallbackProcessor-->>API: Return success response
API-->>User: Send response with action results
π In the meadow where bunnies play,
New callbacks hop in bright array.
With messages sent, the bots now cheer,
As actions dance, we hold them dear.
Letβs celebrate this joyful code,
With happy hops on this new road! πΌ
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?
Callback Action implementation and test cases
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Chores