yml file inside directory, for example, custom_action_server.yml, and specifying the parameters of the workflow we want to automate: To automate the process of building an image and pushing it to a Docker Registry every time someone makes changes to the custom action code we have to add a new workflow to the. yml configuration files for Github Actions github/workflows - a directory to store the. Dockerfile - a Dockerfile which can be used to build Docker images for custom actions.actions/requirements-actions.txt - a file containing the dependencies needed to run custom actions actions - a directory which contains the custom actions code Here are the directories and files of the repository that we will be using: It will automatically build and and push Docker images for custom action server every time there is a change introduced to any custom action. What we will do is we will add a Github Action to a forked repository of Helpdesk Assistant. Let's continue this example by applying it to one of the Rasa's starterpacks - Helpdesk Assistant. What we'll do next is show you how you can customise it. We've now gotten started with the custom action. Find the Rasa Github Action on Github Actions Marketplace and click on button "Use the Latest Version" (or select a different version of your preference):ĭocker_registry : my_registry Setting up input parameters.Here's a quickstart on how to add Rasa Github Action to your repository: Using the Rasa Github action for building action server images High Level Overview Rasa Github Action can be found on Github Actions Marketplace alongside a number of examples of how to use and customize it. All you have to do is configure the necessary parameters to fit your use case. The action handles the tasks of creating Dockerfile, building the docker image and pushing it to the docker registry for you. These steps can be automated with Github Actions and we've created a custom action that should make this easy. This means that every time you make changes to your custom actions you will have to repeat steps 3 and 4 in order to be able to test those changes. Add the custom action server image to your assistant by configuring your Rasa X deploymentĪs you work on improving your assistant, you will find yourself constantly making changes to your custom actions code.Push the image to the Docker registry (for example Docker Hub).Create a Dockerfile for your custom action (specifying the requirements and the process of building a docker image).Write the custom action code inside the actions.py file.When it comes to Rasa custom actions, the usual workflow of adding them to the assistant deployed with Rasa X looks as follows: In this tutorial we would like to show you how you can use this Github Action to automate your Rasa custom action development workflow. To simplify and automate this process we've built a Github Action which we hope will make it easier to build Docker images for custom actions. The Docker that contains the actions needs to be built, pushed and referenced. If you're using Rasa X you might be doing a lot of manual work when working with these actions. Implementing custom actions is a great way to enable your Rasa assistant to perform specific tasks - send an email, add items to your calendar, retrieve data from a database, and do pretty much anything else you can imagine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |