Giter Club home page Giter Club logo

rasa-moqui's Introduction

rasa-moqui

Rasa 版本和项目依赖

python环境准备 安装python3.10

python3 --version
pip3 --version
brew update
brew install python

更新pip

pip3 install -U pip

代码均在 Rasa 3.6.X 版本中完成。

安装并初始化rasa

pip3 install rasa

查看版本

rasa --version

rasa环境启动失败,更新

pip install --upgrade rasa

初始化项目

rasa init

完成项目代码的依赖安装。

安装依赖

pip install MicroTokenizer

这一步骤是可选的,因为在上一步骤中,已经安装了相关的依赖。

自定义组件

自定义组件位于 rasa_custom_tokenizer/tokenizer.py

激活虚拟环境

source ./venv/bin/activate

训练 Rasa 模型

rasa train

使用 API 密钥启动 Rasa 动作服务器

SENIVERSE_KEY=SzmZu0tiBVGGaPB0N rasa run actions

SzmZu0tiBVGGaPB0N 是我们可以从 https://www.seniverse.com/ 获取的 API 密钥.

对于 Windows 用户,可以使用直接修改代码的方式,快速更改 API 密钥。具体操作如下:

  1. 打开 service/weather.py 文件,定位到第 9 行,也就是: KEY = os.getenv("SENIVERSE_KEY", "") # API key 这一行
  2. 将其中的 "" 替换成 API 密钥。代码修改效果如下: KEY = os.getenv("SENIVERSE_KEY", "ThisIsYourKey") # API key

启动 Rasa 服务器

rasa run --cors "*"

启动网页客户端

python -m http.server

使用 API 密钥启动 Rasa 动作服务器

确认moqui API可用
用户列表:api_url = 'https://d.upservce.com/rest/s1/moqui/users'
单个用户:api_url = 'https://d.upservce.com/rest/s1/moqui/users/{userId}'

有用链接

你可以在Rasa指南中找到更多有关Rasa语法的信息。

你可以阅读Chatbots with Rasa 对Rasa关键知识点有个基本认识。

本地测试安装ngrok

rasa-moqui's People

Contributors

heguangyong avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.