运行Rasa SDK服务--2.5.0版本

运行操作服务(action server)有两种方法,具体取决于您使用的环境是否安装了rasa
如果安装了rasa,则可以使用rasa命令运行操作服务:

rasa run actions

如果未安装rasa,则可以直接将操作服务作为python模块运行:

python -m rasa_sdk --actions actions

使用上面的命令,rasa_sdk将期望在名为actions.py的文件或名为actions的包目录中找到您的操作。可以使用--actions标志指定不同的actions模块或包。
使用命令运行操作服务的参数列表如下:

usage: __main__.py [-h] [-p PORT] [--cors [CORS [CORS ...]]]
                   [--actions ACTIONS] [--ssl-keyfile SSL_KEYFILE]
                   [--ssl-certificate SSL_CERTIFICATE]
                   [--ssl-password SSL_PASSWORD] [--auto-reload] [-v] [-vv]
                   [--quiet] [--log-file LOG_FILE]

starts the action endpoint

optional arguments:
  -h, --help            show this help message and exit
  -p PORT, --port PORT  port to run the server at
  --cors [CORS [CORS ...]]
                        enable CORS for the passed origin. Use * to whitelist
                        all origins
  --actions ACTIONS     name of action package to be loaded
  --ssl-keyfile SSL_KEYFILE
                        Set the SSL certificate to create a TLS secured
                        server.
  --ssl-certificate SSL_CERTIFICATE
                        Set the SSL certificate to create a TLS secured
                        server.
  --ssl-password SSL_PASSWORD
                        If your ssl-keyfile is protected by a password, you
                        can specify it using this paramer.
  --auto-reload         Enable auto-reloading of modules containing Action
                        subclasses.
  -v, --verbose         Be verbose. Sets logging level to INFO
  -vv, --debug          Print lots of debugging statements. Sets logging level
                        to DEBUG
  --quiet               Be quiet! Sets logging level to WARNING
  --log-file LOG_FILE   Store logs in specified file.

参考

  1. Running a Rasa SDK Action Server
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值