Closed snopoke closed 2 weeks ago
@coderabbit review
This pull request introduces significant enhancements to the Django application by adding a new custom_actions
field to both the OpenAiAssistant
and Experiment
models, facilitating a ManyToMany relationship with the CustomAction
model. The OpenAiAssistantForm
is updated to include a ModelMultipleChoiceField
for custom_actions
, which is populated based on the user's team. Additionally, the ExperimentForm
is modified to incorporate the new field, ensuring that it can handle multiple custom actions during form submissions.
A migration file is included to create the necessary database structure for the CustomAction
model, which encompasses various fields such as name
, description
, and api_schema
. The CustomAction
model is further supported by a dedicated form class and validation logic to ensure the integrity of the API schema provided. The changes also extend to the URL routing and views, enabling CRUD operations for custom actions, and enhancing the user interface through updated templates.
Overall, these modifications enhance the application's capability to manage custom actions in conjunction with experiments and assistants, promoting a more flexible interaction model.
custom_actions
field in forms and models.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?
@coderabbit review
@coderabbit review
Attention: Patch coverage is 77.77778%
with 186 lines
in your changes missing coverage. Please review.
:loudspeaker: Thoughts on this report? Let us know!
@coderabbit resolve
Description
This adds a 'custom actions' feature to OCS. A "custom action" represents an external API. When a bot is configured with a custom action the bot will have additional tools which will allow it to make HTTP requests to the external API.
User Impact
Users can configure bots with custom actions.
Demo
Custom Actions Demo 🤖 - Watch Video
Docs
TODO