Closed hasinaxp closed 3 months ago
The recent updates introduce a comprehensive callback management system in the Kairon framework. Key enhancements include the implementation of the ActionCallback
class for managing callback actions, new API endpoints for callback management, and an expanded infrastructure for asynchronous handling. These changes significantly enhance the bot's interactivity by enabling dynamic interactions, robust logging, and improved user experiences.
Files & Directories | Summary of Changes |
---|---|
kairon/actions/definitions/callback_action.py , kairon/actions/definitions/factory.py , kairon/api/app/routers/bot/action.py |
Introduced ActionCallback class for managing callback actions, added API endpoints for retrieving, adding, editing, and deleting callbacks, and integrated callback handling into the action factory. |
kairon/api/models.py , kairon/async_callback/channel_message_dispacher.py , kairon/async_callback/main.py , kairon/async_callback/processor.py |
Added models for callback configuration requests, implemented a central message dispatcher for handling multiple messaging platforms, and established an asynchronous FastAPI application framework. |
kairon/async_callback/router/pyscript_callback.py |
Introduced a new router for handling asynchronous callback requests, defining multiple endpoints with structured response handling. |
tests/integration_test/callback_service_test.py , tests/unit_test/callback_test.py |
Added integration and unit tests for new callback functionalities, covering the addition, editing, retrieval, and deletion of callbacks and associated actions, including error handling scenarios. |
sequenceDiagram
participant User
participant API
participant CallbackManager
participant Dispatcher
User->>API: Request to trigger callback
API->>CallbackManager: Validate and retrieve callback config
CallbackManager-->>API: Callback config
API->>Dispatcher: Dispatch callback action
Dispatcher-->>API: Execution status
API-->>User: Return response
π In the warren where code does hop,
New callbacks spring, they never stop!
With actions fine and messages clear,
Our bots now dance, so full of cheer!
Let's celebrate with a joyful cheer,
For coding rabbits, the time is here! π₯β¨
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?
Added callback action and its related components and basic test cases related to the same.
Summary by CodeRabbit
New Features
Bug Fixes
Tests