chatbot

Get Smart Replies

Changed on

Smart reply endpoint.

Use it to get possible user responses for the current dialog context. They can be served as a help for the user on how to continue the conversation.

post/chatbot/v2/get_smart_replies

Request

  • Base URL
    https://api.exh.ai
  • URL
    https://api.exh.ai/chatbot/v2/get_smart_replies
  • Auth
    HTTP bearer

Headers

X-Request-Idstring

Request body

user_idstring nullable

Unique user identifier. Used for AB tests.

candidates_numinteger

The number of smart replies to return

Example request

{
  "context": [
    {
      "message": "Hi, how are you?",
      "turn": "bot"
    },
    {
      "message": "I'm fine, thanks. How is it going with you?",
      "turn": "user"
    }
  ],
  "user_id": "AD17F119-FC27-6400-566C",
  "candidates_num": 2
}

Response

Successful Response

smart_repliesstring[] required

The smart replies of the chatbot

Example response

{
  "smart_replies": [
    "Super! I'm fine too.",
    "Great!"
  ]
}

Changes

    • breaking

      for the header request parameter X-Request-Id, default value was changed from 557b091c-d24e-44e6-935f-ae4ba3980e2e to e22b3999-1d73-4633-8550-6c543a48f3e6

    • breaking

      for the header request parameter X-Request-Id, default value was changed from 4c65b3eb-b297-4cfc-939e-ae4b9037f847 to 557b091c-d24e-44e6-935f-ae4ba3980e2e