Search code examples
javascriptamazon-web-servicesamazon-lex

Amazon Lex PostText operation not returning confidence scores


I am using the AWS SDK for JavaScript in Node.js.

Calling the PostText operation does not seem to return the confidence scores even though I have configured the bot to enable accuracy improvements, set the confidence threshold and published it on the AWS console.

Additionally calling the PutBot operation with the enableModelImprovements and nluIntentConfidenceThreshold parameters will throw the following errors:

UnexpectedParameter: Unexpected key 'enableModelImprovements' found in params
UnexpectedParameter: Unexpected key 'nluIntentConfidenceThreshold' found in params

On the AWS console itself, the confidence scores are returned. However, this is not the case when using the sdk for JavaScript.

Has anyone encountered this problem?


Solution

  • Please update your aws-sdk to the latest version then you will be able get confidence scores as well. Please run this command

    npm install aws-sdk@2.780.0