Developers

LanguageDetector

Usage

Use this method to detect the language in which a user intent is expressed.

Mandatory parameters

Name Type Description
query string The user query for which the language needs to be detected

Optional parameters

This method has no optional parameters.

Response data format

This method calls the Chat API’s POST /language-detector endpoint. It returns a Promise with the API response data. Please refer to the Responses section of the endpoint on the Chat API Routes page for the response format.

Example

chatbot.api.languageDetector(lastUserInput);