Lex 中记录的意图状态与实际可用值有何不同?这些状态中的每一个之间有什么区别?

How is it that the documented intent states in Lex are different from the actual available values?What is the difference between each of these states?

我目前正在将 aws Lex 与用 TypeScript 编写的 lambda 函数集成,我正面临需要帮助的情况。

阅读 LexV2 的 aws 文档后,以下值可用于意图状态:

但是当我使用 'Waiting' 值时,出现以下错误消息:

Invalid Lambda Response: Received invalid response from Lambda: Can not deserialize value of type Intent$IntentState from String "Waiting": value not one of declared Enum instance names: [ReadyForFulfillment, InProgress, Failed, Fulfilled]

为此我需要帮助:

  1. 了解为什么会有无法识别的值。
  2. 了解每个值之间的区别(注意:文档中并未解释所有可接受的值

在联系 aws 支持后得到答案:

LexV2 不接受“FulfillmentInProgress”或“Waiting”作为有效的意向状态。

每个有效值之间的差异:

ReadyForFulfillment - The bot is ready to fulfillment. Passing this state via lambda output will make the bot jump to fulfillment state

InProgress - The default state

Fulfilled - The bot will jump to closed state and will play back both the fulfillment success message and closing response

Failed - Mark the intent as failed; will result in bot playing the fulfillment failure message