Use this method to detect the language in which a user intent is expressed.
Name | Type | Description |
---|---|---|
query | string | The user query for which the language needs to be detected |
This method has no optional parameters.
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.
chatbot.api.languageDetector(lastUserInput);