在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:rasa-sdk开源软件地址:https://gitee.com/mirrors/rasa-sdk开源软件介绍:Rasa Python-SDKPython SDK for the development of custom actions for Rasa. InstallationTo install the SDK run pip install rasa-sdk Compatibility
old
UsageDetailed instructions can be found in the Rasa Documentation aboutCustom Actions. DockerUsageIn order to start an action server using implemented custom actions,you can use the available Docker image Before starting the action server ensure that the folder containingyour actions is handled as Python module and therefore has to containa file called Then start the action server using: docker run -p 5055:5055 --mount type=bind,source=<ABSOLUTE_PATH_TO_YOUR_ACTIONS>,target=/app/actions \ rasa/rasa-sdk:<version> The action server is then available at Custom DependenciesTo add custom dependencies you enhance the given Docker image, e.g.: # Extend the official Rasa SDK imageFROM rasa/rasa-sdk:<version># Change back to root user to install dependenciesUSER root# To install system dependenciesRUN apt-get update -qq && \ apt-get install -y <NAME_OF_REQUIRED_PACKAGE> && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*# To install packages from PyPIRUN pip install --no-cache-dir <A_REQUIRED_PACKAGE_ON_PYPI># Switch back to non-root to run codeUSER 1001 Building from sourceRasa SDK uses Poetry for packaging and dependency management. If you want to build it from source,you have to install Poetry first. This is how it can be done: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 There are several other ways to install Poetry. Please, followthe official guide to see all possible options. To install dependencies and make install Code StyleTo ensure a standardized code style we use the formatter black.If your code is not formatted properly, GitHub CI will fail to build. If you want to automatically format your code on every commit, you can use pre-commit.Just install it via To check and reformat files execute make lint Steps to release a new versionReleasing a new version is quite simple, as the packages are build and distributedby GitHub Actions. Release steps:
LicenseLicensed under the Apache License, Version 2.0. Copyright 2021 RasaTechnologies GmbH. Copy of the license. A list of the Licenses of the dependencies of the project can be found atthe bottom of theLibraries Summary. |
请发表评论