Language AI Playbook
  • 1. Introduction
    • 1.1 How to use the partner playbook
    • 1.2 Chapter overviews
    • 1.3 Acknowledgements
  • 2. Overview of Language Technology
    • 2.1 Definition and uses of language technology
    • 2.2 How language technology helps with communication
    • 2.3 Areas where language technology can be used
    • 2.4 Key terminology and concepts
  • 3. Partner Opportunities
    • 3.1 Enabling Organizations with Language Technology
    • 3.2 Bridging the Technical Gap
    • 3.3 Dealing with language technology providers
  • 4. Identifying Impactful Use Cases
    • 4.1 Setting criteria to help choose the use case
    • 4.2 Conducting A Needs Assessment
    • 4.3 Evaluating What Can Be Done and What Works
  • 5 Communication and working together
    • 5.1 Communicating with Communities
    • 5.2 Communicating and working well with partners
  • 6. Language Technology Implementation
    • 6.1 Navigating the Language Technology Landscape
    • 6.2 Creating a Language-Specific Peculiarities (LSP) Document
    • 6.3 Open source data and models
    • 6.4 Assessing data and model maturity
      • 6.4.1 Assessing NLP Data Maturity
      • 6.4.2 Assessing NLP Model Maturity:
    • 6.5 Key Metrics for Evaluating Language Solutions
  • 7 Development and Deployment Guidelines
    • 7.1 Serving models through an API
    • 7.2 Machine translation
      • 7.2.1 Building your own MT models
      • 7.2.2 Deploying your own scalable Machine Translation API
      • 7.2.3 Evaluation and continuous improvement of machine translation
    • 7.3 Chatbots
      • 7.3.1 Overview of chatbot technologies and RASA framework
      • 7.3.2 Building data for a climate change resilience chatbot
      • 7.3.3 How to obtain multilinguality
      • 7.3.4 Components of a chatbot in deployment
      • 7.3.5 Deploying a RASA chatbot
      • 7.3.6 Channel integrations
        • 7.3.6.1 Facebook Messenger
        • 7.3.6.2 WhatsApp
        • 7.3.6.3 Telegram
      • 7.3.7 How to create effective NLU training data
      • 7.3.8 Evaluation and continuous improvement of chatbots
  • 8 Sources and further bibliography
Powered by GitBook
On this page
  1. 7 Development and Deployment Guidelines
  2. 7.3 Chatbots
  3. 7.3.6 Channel integrations

7.3.6.3 Telegram

Previous7.3.6.2 WhatsAppNext7.3.7 How to create effective NLU training data

Last updated 1 year ago

You first have to create a Telegram bot to get credentials. Once you have them you can add these to your credentials.yml.

How to get the Telegram credentials

You need to set up a Telegram bot.

  1. To create the bot, go to , enter /newbot, and follow the instructions. The URL that Telegram should send messages to will look like http://<host>:<port>/webhooks/telegram/webhook, replacing the host and port with the appropriate values from your running Rasa X or Rasa Open Source server.

  2. At the end you should get your access_token and the username you set will be your verify.

  3. If you want to use your bot in a group setting, it's advisable to turn on group privacy mode by entering /setprivacy. Then the bot will only listen when a user's message starts with /bot.

For more information, check out the .

Running on Telegram

Add the Telegram credentials to your credentials.yml:

telegram:
access_token: "<token>"
verify: "your_bot"
webhook_url: "https://your_url.com/webhooks/telegram/webhook"

Restart your Rasa X or Rasa Open Source server to make the new channel endpoint available for Telegram to send messages to.

Also check:

Supported Response Attachments

In addition to standard text: responses, this channel also supports the following components from the :

  • button arguments:

    • button_type: inline | vertical | reply

  • custom arguments:

    • photo

    • audio

    • document

    • sticker

    • video

    • video_note

    • animation

    • voice

    • media

    • latitude, longitude (location)

    • latitude, longitude, title, address (venue)

    • phone_number

    • game_short_name

    • action

Examples:

utter_ask_transfer_form_confirm:
- buttons:
- payload: /affirm
title: Yes
- payload: /deny
title: No, cancel the transaction
button_type: vertical
text: Would you like to transfer {currency}{amount_of_money} to {PERSON}?
image: "https://i.imgur.com/nGF1K8f.jpg"
Copy
utter_giraffe_sticker:
- text: Here's my giraffe sticker!
custom:
sticker: "https://github.com/TelegramBots/book/raw/master/src/docs/sticker-fred.webp"

Bot Father
Telegram HTTP API
Setup HTTPS on localhost for testing the API/Channels
Telegram API