天天看點

Rasa文檔中英文翻譯版本 6 - User Guide: ArchitectureRasa文檔中英文翻譯版本 6 - User Guide: ArchitectureMessaging and Voice Channels

Rasa文檔中英文翻譯版本 6 - User Guide: Architecture

https://rasa.com/docs/rasa/user-guide/messaging-and-voice-channels/

T by yi 2020.9.15

Messaging and Voice Channels

To make your assistant available on a messaging platform you need to provide credentials in a credentials.yml file. An example file is created when you run rasa init, so it’s easiest to edit that file and add your credentials there. Here is an example with Facebook credentials:

若要使助手在IM消息平台上可用,您需要在credentials.yml檔案中提供憑據。很容易編輯運作 rasa init 時自動建立的示例檔案裡來添加憑據。下面是一個使用 Facebook 憑據的示例:

facebook:

  verify: "rasa-bot"

  secret: "3e34709d01ea89032asdebfe5a74518"

  page-access-token: "EAAbHPa7H9rEBAAuFk4Q3gPKbDedQnx4djJJ1JmQ7CAqO4iJKrQcNT0wtD"

Learn how to make your assistant available on:

可以支援以下平台。

  • Your Own Website
  • Facebook Messenger
  • Slack
  • Telegram
  • Twilio
  • Microsoft Bot Framework
  • Cisco Webex Teams
  • RocketChat
  • Mattermost
  • Google Hangouts Chat
  • Custom Connectors

Testing Channels on Your Local Machine with Ngrok

使用 Ngrok 在本地計算機上測試通道

You can use ngrok to create a connection to your local computer that is publicly available on the internet. You don’t need this when running Rasa on a server because, you can set up a domain name to point to that server’s IP address, or use the IP address itself.

After installing ngrok, run:

您可以使用ngrok 建立釋出到網際網路與本地計算機的連結。在伺服器上運作 Rasa 時不需要此功能,因為可以設定一個域名來指向該伺服器的 IP 位址,或者使用 IP 位址本身。

安裝 ngrok 後,運作:

ngrok http 5005; rasa run

    copy

copied!

Your webhook address will look like the following:

你的webhook 位址如下

https://yyyyyy.ngrok.io/webhooks/<CHANNEL>/webhook, e.g.

https://yyyyyy.ngrok.io/webhooks/facebook/webhook

Warning

With the free-tier of ngrok, you can run into limits on how many connections you can make per minute. As of writing this, it is set to 40 connections / minute.

使用 ngrok 的免費服務,您可以對每分鐘可以建立多少連接配接進行限制。現在其設定為 40 個連接配接/分鐘。

繼續閱讀