diff --git a/events/lex.go b/events/lex.go index dd635fbd..62b1e6d6 100644 --- a/events/lex.go +++ b/events/lex.go @@ -1,16 +1,17 @@ package events type LexEvent struct { - MessageVersion string `json:"messageVersion,omitempty"` - InvocationSource string `json:"invocationSource,omitempty"` - UserID string `json:"userId,omitempty"` - InputTranscript string `json:"inputTranscript,omitempty"` - SessionAttributes SessionAttributes `json:"sessionAttributes,omitempty"` - RequestAttributes map[string]string `json:"requestAttributes,omitempty"` - Bot *LexBot `json:"bot,omitempty"` - OutputDialogMode string `json:"outputDialogMode,omitempty"` - CurrentIntent *LexCurrentIntent `json:"currentIntent,omitempty"` - DialogAction *LexDialogAction `json:"dialogAction,omitempty"` + MessageVersion string `json:"messageVersion,omitempty"` + InvocationSource string `json:"invocationSource,omitempty"` + UserID string `json:"userId,omitempty"` + InputTranscript string `json:"inputTranscript,omitempty"` + SessionAttributes SessionAttributes `json:"sessionAttributes,omitempty"` + RequestAttributes map[string]string `json:"requestAttributes,omitempty"` + Bot *LexBot `json:"bot,omitempty"` + OutputDialogMode string `json:"outputDialogMode,omitempty"` + CurrentIntent *LexCurrentIntent `json:"currentIntent,omitempty"` + AlternativeIntents []LexAlternativeIntents `json:"alternativeIntents,omitempty"` + DialogAction *LexDialogAction `json:"dialogAction,omitempty"` } type LexBot struct { @@ -20,10 +21,19 @@ type LexBot struct { } type LexCurrentIntent struct { - Name string `json:"name,omitempty"` - Slots Slots `json:"slots,omitempty"` - SlotDetails map[string]SlotDetail `json:"slotDetails,omitempty"` - ConfirmationStatus string `json:"confirmationStatus,omitempty"` + Name string `json:"name,omitempty"` + NLUIntentConfidenceScore float64 `json:"nluIntentConfidenceScore,omitempty"` + Slots Slots `json:"slots,omitempty"` + SlotDetails map[string]SlotDetail `json:"slotDetails,omitempty"` + ConfirmationStatus string `json:"confirmationStatus,omitempty"` +} + +type LexAlternativeIntents struct { + Name string `json:"name,omitempty"` + NLUIntentConfidenceScore float64 `json:"nluIntentConfidenceScore,omitempty"` + Slots Slots `json:"slots,omitempty"` + SlotDetails map[string]SlotDetail `json:"slotDetails,omitempty"` + ConfirmationStatus string `json:"confirmationStatus,omitempty"` } type SlotDetail struct {