types

package
v1.25.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessDeniedException

type AccessDeniedException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

func (*AccessDeniedException) Error

func (e *AccessDeniedException) Error() string

func (*AccessDeniedException) ErrorCode

func (e *AccessDeniedException) ErrorCode() string

func (*AccessDeniedException) ErrorFault

func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault

func (*AccessDeniedException) ErrorMessage

func (e *AccessDeniedException) ErrorMessage() string

type ActiveContext

type ActiveContext struct {

	// A list of contexts active for the request. A context can be activated when a
	// previous intent is fulfilled, or by including the context in the request.
	//
	// If you don't specify a list of contexts, Amazon Lex V2 will use the current
	// list of contexts for the session. If you specify an empty list, all contexts for
	// the session are cleared.
	//
	// This member is required.
	ContextAttributes map[string]string

	// The name of the context.
	//
	// This member is required.
	Name *string

	// Indicates the number of turns or seconds that the context is active. Once the
	// time to live expires, the context is no longer returned in a response.
	//
	// This member is required.
	TimeToLive *ActiveContextTimeToLive
	// contains filtered or unexported fields
}

Contains information about the contexts that a user is using in a session. You can configure Amazon Lex V2 to set a context when an intent is fulfilled, or you can set a context using the , , or operations.

Use a context to indicate to Amazon Lex V2 intents that should be used as follow-up intents. For example, if the active context is order-fulfilled , only intents that have order-fulfilled configured as a trigger are considered for follow up.

type ActiveContextTimeToLive

type ActiveContextTimeToLive struct {

	// The number of seconds that the context is active. You can specify between 5 and
	// 86400 seconds (24 hours).
	//
	// This member is required.
	TimeToLiveInSeconds *int32

	// The number of turns that the context is active. You can specify up to 20 turns.
	// Each request and response from the bot is a turn.
	//
	// This member is required.
	TurnsToLive *int32
	// contains filtered or unexported fields
}

The time that a context is active. You can specify the time to live in seconds or in conversation turns.

type AudioInputEvent added in v1.10.0

type AudioInputEvent struct {

	// The encoding used for the audio chunk. You must use 8 KHz PCM 16-bit
	// mono-channel little-endian format. The value of the field should be:
	//
	//     audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1;
	//     is-big-endian=false
	//
	// This member is required.
	ContentType *string

	// An encoded stream of audio.
	AudioChunk []byte

	// A timestamp set by the client of the date and time that the event was sent to
	// Amazon Lex V2.
	ClientTimestampMillis int64

	// A unique identifier that your application assigns to the event. You can use
	// this to identify events in logs.
	EventId *string
	// contains filtered or unexported fields
}

Represents a chunk of audio sent from the client application to Amazon Lex V2. The audio is all or part of an utterance from the user.

Amazon Lex V2 accumulates audio chunks until it recognizes a natural pause in speech before processing the input.

type AudioResponseEvent added in v1.10.0

type AudioResponseEvent struct {

	// A chunk of the audio to play.
	AudioChunk []byte

	// The encoding of the audio chunk. This is the same as the encoding configure in
	// the contentType field of the ConfigurationEvent .
	ContentType *string

	// A unique identifier of the event sent by Amazon Lex V2. The identifier is in
	// the form RESPONSE-N , where N is a number starting with one and incremented for
	// each event sent by Amazon Lex V2 in the current session.
	EventId *string
	// contains filtered or unexported fields
}

An event sent from Amazon Lex V2 to your client application containing audio to play to the user.

type BadGatewayException

type BadGatewayException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

func (*BadGatewayException) Error

func (e *BadGatewayException) Error() string

func (*BadGatewayException) ErrorCode

func (e *BadGatewayException) ErrorCode() string

func (*BadGatewayException) ErrorFault

func (e *BadGatewayException) ErrorFault() smithy.ErrorFault

func (*BadGatewayException) ErrorMessage

func (e *BadGatewayException) ErrorMessage() string

type Button

type Button struct {

	// The text that is displayed on the button.
	//
	// This member is required.
	Text *string

	// The value returned to Amazon Lex V2 when a user chooses the button.
	//
	// This member is required.
	Value *string
	// contains filtered or unexported fields
}

A button that appears on a response card show to the user.

type ConfidenceScore

type ConfidenceScore struct {

	// A score that indicates how confident Amazon Lex V2 is that an intent satisfies
	// the user's intent. Ranges between 0.00 and 1.00. Higher scores indicate higher
	// confidence.
	Score float64
	// contains filtered or unexported fields
}

Provides a score that indicates the confidence that Amazon Lex V2 has that an intent is the one that satisfies the user's intent.

type ConfigurationEvent added in v1.10.0

type ConfigurationEvent struct {

	// The message that Amazon Lex V2 returns in the response can be either text or
	// speech based on the responseContentType value.
	//
	//   - If the value is text/plain;charset=utf-8 , Amazon Lex V2 returns text in the
	//   response.
	//
	//   - If the value begins with audio/ , Amazon Lex V2 returns speech in the
	//   response. Amazon Lex V2 uses Amazon Polly to generate the speech using the
	//   configuration that you specified in the requestContentType parameter. For
	//   example, if you specify audio/mpeg as the value, Amazon Lex V2 returns speech
	//   in the MPEG format.
	//
	//   - If the value is audio/pcm , the speech returned is audio/pcm in 16-bit,
	//   little-endian format.
	//
	//   - The following are the accepted values:
	//
	//   - audio/mpeg
	//
	//   - audio/ogg
	//
	//   - audio/pcm
	//
	//   - audio/* (defaults to mpeg)
	//
	//   - text/plain; charset=utf-8
	//
	// This member is required.
	ResponseContentType *string

	// A timestamp set by the client of the date and time that the event was sent to
	// Amazon Lex V2.
	ClientTimestampMillis int64

	// Determines whether Amazon Lex V2 should send audio responses to the client
	// application.
	//
	// Set this field to false when the client is operating in a playback mode where
	// audio responses are played to the user. If the client isn't operating in
	// playback mode, such as a text chat application, set this to true so that Amazon
	// Lex V2 doesn't wait for the prompt to finish playing on the client.
	DisablePlayback bool

	// A unique identifier that your application assigns to the event. You can use
	// this to identify events in logs.
	EventId *string

	// Request-specific information passed between the client application and Amazon
	// Lex V2.
	//
	// The namespace x-amz-lex: is reserved for special attributes. Don't create any
	// request attributes for prefix x-amz-lex: .
	RequestAttributes map[string]string

	// The state of the user's session with Amazon Lex V2.
	SessionState *SessionState

	// A list of messages to send to the user.
	//
	// If you set the welcomeMessage field, you must also set the [DialogAction]DialogAction
	// structure's [type]type field.
	//
	// [DialogAction]: https://docs.aws.amazon.com/lexv2/latest/dg/API_runtime_DialogAction.html
	// [type]: https://docs.aws.amazon.com/lexv2/latest/dg/API_runtime_DialogAction.html#lexv2-Type-runtime_DialogAction-type
	WelcomeMessages []Message
	// contains filtered or unexported fields
}

The initial event sent from the application to Amazon Lex V2 to configure the conversation, including session and request attributes and the response content type.

type ConfirmationState

type ConfirmationState string
const (
	ConfirmationStateConfirmed ConfirmationState = "Confirmed"
	ConfirmationStateDenied    ConfirmationState = "Denied"
	ConfirmationStateNone      ConfirmationState = "None"
)

Enum values for ConfirmationState

func (ConfirmationState) Values

Values returns all known values for ConfirmationState. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type ConflictException

type ConflictException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

func (*ConflictException) Error

func (e *ConflictException) Error() string

func (*ConflictException) ErrorCode

func (e *ConflictException) ErrorCode() string

func (*ConflictException) ErrorFault

func (e *ConflictException) ErrorFault() smithy.ErrorFault

func (*ConflictException) ErrorMessage

func (e *ConflictException) ErrorMessage() string

type ConversationMode added in v1.10.0

type ConversationMode string
const (
	ConversationModeAudio ConversationMode = "AUDIO"
	ConversationModeText  ConversationMode = "TEXT"
)

Enum values for ConversationMode

func (ConversationMode) Values added in v1.10.0

Values returns all known values for ConversationMode. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type DTMFInputEvent added in v1.10.0

type DTMFInputEvent struct {

	// The DTMF character that the user pressed. The allowed characters are A - D, 0 -
	// 9, # and *.
	//
	// This member is required.
	InputCharacter *string

	// A timestamp set by the client of the date and time that the event was sent to
	// Amazon Lex V2.
	ClientTimestampMillis int64

	// A unique identifier that your application assigns to the event. You can use
	// this to identify events in logs.
	EventId *string
	// contains filtered or unexported fields
}

A DTMF character sent from the client application. DTMF characters are typically sent from a phone keypad to represent numbers. For example, you can have Amazon Lex V2 process a credit card number input from a phone.

type DependencyFailedException

type DependencyFailedException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

func (*DependencyFailedException) Error

func (e *DependencyFailedException) Error() string

func (*DependencyFailedException) ErrorCode

func (e *DependencyFailedException) ErrorCode() string

func (*DependencyFailedException) ErrorFault

func (*DependencyFailedException) ErrorMessage

func (e *DependencyFailedException) ErrorMessage() string

type DialogAction

type DialogAction struct {

	// The next action that the bot should take in its interaction with the user. The
	// following values are possible:
	//
	//   - Close – Indicates that there will not be a response from the user. For
	//   example, the statement "Your order has been placed" does not require a response.
	//
	//   - ConfirmIntent – The next action is asking the user if the intent is complete
	//   and ready to be fulfilled. This is a yes/no question such as "Place the order?"
	//
	//   - Delegate – The next action is determined by Amazon Lex V2.
	//
	//   - ElicitIntent – The next action is to elicit an intent from the user.
	//
	//   - ElicitSlot – The next action is to elicit a slot value from the user.
	//
	// This member is required.
	Type DialogActionType

	// Configures the slot to use spell-by-letter or spell-by-word style. When you use
	// a style on a slot, users can spell out their input to make it clear to your bot.
	//
	//   - Spell by letter - "b" "o" "b"
	//
	//   - Spell by word - "b as in boy" "o as in oscar" "b as in boy"
	//
	// For more information, see [Using spelling to enter slot values].
	//
	// [Using spelling to enter slot values]: https://docs.aws.amazon.com/lexv2/latest/dg/spelling-styles.html
	SlotElicitationStyle StyleType

	// The name of the slot that should be elicited from the user.
	SlotToElicit *string

	// The name of the constituent sub slot of the composite slot specified in
	// slotToElicit that should be elicited from the user.
	SubSlotToElicit *ElicitSubSlot
	// contains filtered or unexported fields
}

The next action that Amazon Lex V2 should take.

type DialogActionType

type DialogActionType string
const (
	DialogActionTypeClose         DialogActionType = "Close"
	DialogActionTypeConfirmIntent DialogActionType = "ConfirmIntent"
	DialogActionTypeDelegate      DialogActionType = "Delegate"
	DialogActionTypeElicitIntent  DialogActionType = "ElicitIntent"
	DialogActionTypeElicitSlot    DialogActionType = "ElicitSlot"
	DialogActionTypeNone          DialogActionType = "None"
)

Enum values for DialogActionType

func (DialogActionType) Values

Values returns all known values for DialogActionType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type DisconnectionEvent added in v1.10.0

type DisconnectionEvent struct {

	// A timestamp set by the client of the date and time that the event was sent to
	// Amazon Lex V2.
	ClientTimestampMillis int64

	// A unique identifier that your application assigns to the event. You can use
	// this to identify events in logs.
	EventId *string
	// contains filtered or unexported fields
}

A notification from the client that it is disconnecting from Amazon Lex V2. Sending a DisconnectionEvent event is optional, but can help identify a conversation in logs.

type ElicitSubSlot added in v1.15.0

type ElicitSubSlot struct {

	// The name of the slot that should be elicited from the user.
	//
	// This member is required.
	Name *string

	// The field is not supported.
	SubSlotToElicit *ElicitSubSlot
	// contains filtered or unexported fields
}

The specific constituent sub slot of the composite slot to elicit in dialog action.

type HeartbeatEvent added in v1.10.0

type HeartbeatEvent struct {

	// A unique identifier of the event sent by Amazon Lex V2. The identifier is in
	// the form RESPONSE-N , where N is a number starting with one and incremented for
	// each event sent by Amazon Lex V2 in the current session.
	EventId *string
	// contains filtered or unexported fields
}

Event that Amazon Lex V2 sends to indicate that the stream is still open between the client application and Amazon Lex V2

type ImageResponseCard

type ImageResponseCard struct {

	// The title to display on the response card. The format of the title is
	// determined by the platform displaying the response card.
	//
	// This member is required.
	Title *string

	// A list of buttons that should be displayed on the response card. The
	// arrangement of the buttons is determined by the platform that displays the
	// button.
	Buttons []Button

	// The URL of an image to display on the response card. The image URL must be
	// publicly available so that the platform displaying the response card has access
	// to the image.
	ImageUrl *string

	// The subtitle to display on the response card. The format of the subtitle is
	// determined by the platform displaying the response card.
	Subtitle *string
	// contains filtered or unexported fields
}

A card that is shown to the user by a messaging platform. You define the contents of the card, the card is displayed by the platform.

When you use a response card, the response from the user is constrained to the text associated with a button on the card.

type InputMode added in v1.10.0

type InputMode string
const (
	InputModeText   InputMode = "Text"
	InputModeSpeech InputMode = "Speech"
	InputModeDtmf   InputMode = "DTMF"
)

Enum values for InputMode

func (InputMode) Values added in v1.10.0

func (InputMode) Values() []InputMode

Values returns all known values for InputMode. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type Intent

type Intent struct {

	// The name of the intent.
	//
	// This member is required.
	Name *string

	// Indicates whether the intent has been Confirmed , Denied , or None if the
	// confirmation stage has not yet been reached.
	ConfirmationState ConfirmationState

	// A map of all of the slots for the intent. The name of the slot maps to the
	// value of the slot. If a slot has not been filled, the value is null.
	Slots map[string]Slot

	// Indicates the fulfillment state for the intent. The meanings of each value are
	// as follows:
	//
	//   - Failed – The bot failed to fulfill the intent.
	//
	//   - Fulfilled – The bot has completed fulfillment of the intent.
	//
	//   - FulfillmentInProgress – The bot is in the middle of fulfilling the intent.
	//
	//   - InProgress – The bot is in the middle of eliciting the slot values that are
	//   necessary to fulfill the intent.
	//
	//   - ReadyForFulfillment – The bot has elicited all the slot values for the
	//   intent and is ready to fulfill the intent.
	//
	//   - Waiting – The bot is waiting for a response from the user (limited to
	//   streaming conversations).
	State IntentState
	// contains filtered or unexported fields
}

The current intent that Amazon Lex V2 is attempting to fulfill.

type IntentResultEvent added in v1.10.0

type IntentResultEvent struct {

	// A unique identifier of the event sent by Amazon Lex V2. The identifier is in
	// the form RESPONSE-N , where N is a number starting with one and incremented for
	// each event sent by Amazon Lex V2 in the current session.
	EventId *string

	// Indicates whether the input to the operation was text, speech, or from a
	// touch-tone keypad.
	InputMode InputMode

	// A list of intents that Amazon Lex V2 determined might satisfy the user's
	// utterance.
	//
	// Each interpretation includes the intent, a score that indicates how confident
	// Amazon Lex V2 is that the interpretation is the correct one, and an optional
	// sentiment response that indicates the sentiment expressed in the utterance.
	Interpretations []Interpretation

	// The bot member that is processing the intent.
	RecognizedBotMember *RecognizedBotMember

	// The attributes sent in the request.
	RequestAttributes map[string]string

	// The identifier of the session in use.
	SessionId *string

	// The state of the user's session with Amazon Lex V2.
	SessionState *SessionState
	// contains filtered or unexported fields
}

Contains the current state of the conversation between the client application and Amazon Lex V2.

type IntentState

type IntentState string
const (
	IntentStateFailed                IntentState = "Failed"
	IntentStateFulfilled             IntentState = "Fulfilled"
	IntentStateInProgress            IntentState = "InProgress"
	IntentStateReadyForFulfillment   IntentState = "ReadyForFulfillment"
	IntentStateWaiting               IntentState = "Waiting"
	IntentStateFulfillmentInProgress IntentState = "FulfillmentInProgress"
)

Enum values for IntentState

func (IntentState) Values

func (IntentState) Values() []IntentState

Values returns all known values for IntentState. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type InternalServerException

type InternalServerException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

func (*InternalServerException) Error

func (e *InternalServerException) Error() string

func (*InternalServerException) ErrorCode

func (e *InternalServerException) ErrorCode() string

func (*InternalServerException) ErrorFault

func (e *InternalServerException) ErrorFault() smithy.ErrorFault

func (*InternalServerException) ErrorMessage

func (e *InternalServerException) ErrorMessage() string

type Interpretation

type Interpretation struct {

	// A list of intents that might satisfy the user's utterance. The intents are
	// ordered by the confidence score.
	Intent *Intent

	// Specifies the service that interpreted the input.
	InterpretationSource InterpretationSource

	// Determines the threshold where Amazon Lex V2 will insert the
	// AMAZON.FallbackIntent , AMAZON.KendraSearchIntent , or both when returning
	// alternative intents in a response. AMAZON.FallbackIntent and
	// AMAZON.KendraSearchIntent are only inserted if they are configured for the bot.
	NluConfidence *ConfidenceScore

	// The sentiment expressed in an utterance.
	//
	// When the bot is configured to send utterances to Amazon Comprehend for
	// sentiment analysis, this field contains the result of the analysis.
	SentimentResponse *SentimentResponse
	// contains filtered or unexported fields
}

An object containing information about an intent that Amazon Lex V2 determined might satisfy the user's utterance. The intents are ordered by the confidence score.

type InterpretationSource added in v1.22.0

type InterpretationSource string
const (
	InterpretationSourceBedrock InterpretationSource = "Bedrock"
	InterpretationSourceLex     InterpretationSource = "Lex"
)

Enum values for InterpretationSource

func (InterpretationSource) Values added in v1.22.0

Values returns all known values for InterpretationSource. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type Message

type Message struct {

	// Indicates the type of response.
	//
	// This member is required.
	ContentType MessageContentType

	// The text of the message.
	Content *string

	// A card that is shown to the user by a messaging platform. You define the
	// contents of the card, the card is displayed by the platform.
	//
	// When you use a response card, the response from the user is constrained to the
	// text associated with a button on the card.
	ImageResponseCard *ImageResponseCard
	// contains filtered or unexported fields
}

Container for text that is returned to the customer..

type MessageContentType

type MessageContentType string
const (
	MessageContentTypeCustomPayload     MessageContentType = "CustomPayload"
	MessageContentTypeImageResponseCard MessageContentType = "ImageResponseCard"
	MessageContentTypePlainText         MessageContentType = "PlainText"
	MessageContentTypeSsml              MessageContentType = "SSML"
)

Enum values for MessageContentType

func (MessageContentType) Values

Values returns all known values for MessageContentType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type PlaybackCompletionEvent added in v1.10.0

type PlaybackCompletionEvent struct {

	// A timestamp set by the client of the date and time that the event was sent to
	// Amazon Lex V2.
	ClientTimestampMillis int64

	// A unique identifier that your application assigns to the event. You can use
	// this to identify events in logs.
	EventId *string
	// contains filtered or unexported fields
}

Event sent from the client application to Amazon Lex V2 to indicate that playback of audio is complete and that Amazon Lex V2 should start processing the user's input.

type PlaybackInterruptionEvent added in v1.10.0

type PlaybackInterruptionEvent struct {

	// The identifier of the event that contained the audio, DTMF, or text that caused
	// the interruption.
	CausedByEventId *string

	// A unique identifier of the event sent by Amazon Lex V2. The identifier is in
	// the form RESPONSE-N , where N is a number starting with one and incremented for
	// each event sent by Amazon Lex V2 in the current session.
	EventId *string

	// Indicates the type of user input that Amazon Lex V2 detected.
	EventReason PlaybackInterruptionReason
	// contains filtered or unexported fields
}

Event sent from Amazon Lex V2 to indicate to the client application should stop playback of audio. For example, if the client is playing a prompt that asks for the user's telephone number, the user might start to say the phone number before the prompt is complete. Amazon Lex V2 sends this event to the client application to indicate that the user is responding and that Amazon Lex V2 is processing their input.

type PlaybackInterruptionReason added in v1.10.0

type PlaybackInterruptionReason string
const (
	PlaybackInterruptionReasonDtmfStartDetected  PlaybackInterruptionReason = "DTMF_START_DETECTED"
	PlaybackInterruptionReasonTextDetected       PlaybackInterruptionReason = "TEXT_DETECTED"
	PlaybackInterruptionReasonVoiceStartDetected PlaybackInterruptionReason = "VOICE_START_DETECTED"
)

Enum values for PlaybackInterruptionReason

func (PlaybackInterruptionReason) Values added in v1.10.0

Values returns all known values for PlaybackInterruptionReason. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type RecognizedBotMember added in v1.17.0

type RecognizedBotMember struct {

	// The identifier of the bot member that processes the request.
	//
	// This member is required.
	BotId *string

	// The name of the bot member that processes the request.
	BotName *string
	// contains filtered or unexported fields
}

The bot member that processes the request.

type ResourceNotFoundException

type ResourceNotFoundException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

func (*ResourceNotFoundException) Error

func (e *ResourceNotFoundException) Error() string

func (*ResourceNotFoundException) ErrorCode

func (e *ResourceNotFoundException) ErrorCode() string

func (*ResourceNotFoundException) ErrorFault

func (*ResourceNotFoundException) ErrorMessage

func (e *ResourceNotFoundException) ErrorMessage() string

type RuntimeHintDetails added in v1.12.0

type RuntimeHintDetails struct {

	// One or more strings that Amazon Lex V2 should look for in the input to the bot.
	// Each phrase is given preference when deciding on slot values.
	RuntimeHintValues []RuntimeHintValue

	// A map of constituent sub slot names inside a composite slot in the intent and
	// the phrases that should be added for each sub slot. Inside each composite slot
	// hints, this structure provides a mechanism to add granular sub slot phrases.
	// Only sub slot hints are supported for composite slots. The intent name,
	// composite slot name and the constituent sub slot names must exist.
	SubSlotHints map[string]RuntimeHintDetails
	// contains filtered or unexported fields
}

Provides an array of phrases that should be given preference when resolving values for a slot.

type RuntimeHintValue added in v1.12.0

type RuntimeHintValue struct {

	// The phrase that Amazon Lex V2 should look for in the user's input to the bot.
	//
	// This member is required.
	Phrase *string
	// contains filtered or unexported fields
}

Provides the phrase that Amazon Lex V2 should look for in the user's input to the bot.

type RuntimeHints added in v1.12.0

type RuntimeHints struct {

	// A list of the slots in the intent that should have runtime hints added, and the
	// phrases that should be added for each slot.
	//
	// The first level of the slotHints map is the name of the intent. The second
	// level is the name of the slot within the intent. For more information, see [Using hints to improve accuracy].
	//
	// The intent name and slot name must exist.
	//
	// [Using hints to improve accuracy]: https://docs.aws.amazon.com/lexv2/latest/dg/using-hints.html
	SlotHints map[string]map[string]RuntimeHintDetails
	// contains filtered or unexported fields
}

You can provide Amazon Lex V2 with hints to the phrases that a customer is likely to use for a slot. When a slot with hints is resolved, the phrases in the runtime hints are preferred in the resolution. You can provide hints for a maximum of 100 intents. You can provide a maximum of 100 slots.

Before you can use runtime hints with an existing bot, you must first rebuild the bot.

For more information, see Using runtime hints to improve recognition of slot values.

type SentimentResponse

type SentimentResponse struct {

	// The overall sentiment expressed in the user's response. This is the sentiment
	// most likely expressed by the user based on the analysis by Amazon Comprehend.
	Sentiment SentimentType

	// The individual sentiment responses for the utterance.
	SentimentScore *SentimentScore
	// contains filtered or unexported fields
}

Provides information about the sentiment expressed in a user's response in a conversation. Sentiments are determined using Amazon Comprehend. Sentiments are only returned if they are enabled for the bot.

For more information, see Determine Sentiment in the Amazon Comprehend developer guide.

type SentimentScore

type SentimentScore struct {

	// The level of confidence that Amazon Comprehend has in the accuracy of its
	// detection of the MIXED sentiment.
	Mixed float64

	// The level of confidence that Amazon Comprehend has in the accuracy of its
	// detection of the NEGATIVE sentiment.
	Negative float64

	// The level of confidence that Amazon Comprehend has in the accuracy of its
	// detection of the NEUTRAL sentiment.
	Neutral float64

	// The level of confidence that Amazon Comprehend has in the accuracy of its
	// detection of the POSITIVE sentiment.
	Positive float64
	// contains filtered or unexported fields
}

The individual sentiment responses for the utterance.

type SentimentType

type SentimentType string
const (
	SentimentTypeMixed    SentimentType = "MIXED"
	SentimentTypeNegative SentimentType = "NEGATIVE"
	SentimentTypeNeutral  SentimentType = "NEUTRAL"
	SentimentTypePositive SentimentType = "POSITIVE"
)

Enum values for SentimentType

func (SentimentType) Values

func (SentimentType) Values() []SentimentType

Values returns all known values for SentimentType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type SessionState

type SessionState struct {

	// One or more contexts that indicate to Amazon Lex V2 the context of a request.
	// When a context is active, Amazon Lex V2 considers intents with the matching
	// context as a trigger as the next intent in a session.
	ActiveContexts []ActiveContext

	// The next step that Amazon Lex V2 should take in the conversation with a user.
	DialogAction *DialogAction

	// The active intent that Amazon Lex V2 is processing.
	Intent *Intent

	// A unique identifier for a specific request.
	OriginatingRequestId *string

	// Hints for phrases that a customer is likely to use for a slot. Amazon Lex V2
	// uses the hints to help determine the correct value of a slot.
	RuntimeHints *RuntimeHints

	// Map of key/value pairs representing session-specific context information. It
	// contains application information passed between Amazon Lex V2 and a client
	// application.
	SessionAttributes map[string]string
	// contains filtered or unexported fields
}

The state of the user's session with Amazon Lex V2.

type Shape added in v1.2.0

type Shape string
const (
	ShapeScalar    Shape = "Scalar"
	ShapeList      Shape = "List"
	ShapeComposite Shape = "Composite"
)

Enum values for Shape

func (Shape) Values added in v1.2.0

func (Shape) Values() []Shape

Values returns all known values for Shape. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type Slot

type Slot struct {

	// When the shape value is List , it indicates that the values field contains a
	// list of slot values. When the value is Scalar , it indicates that the value
	// field contains a single value.
	Shape Shape

	// The constituent sub slots of a composite slot.
	SubSlots map[string]Slot

	// The current value of the slot.
	Value *Value

	// A list of one or more values that the user provided for the slot. For example,
	// if a for a slot that elicits pizza toppings, the values might be "pepperoni" and
	// "pineapple."
	Values []Slot
	// contains filtered or unexported fields
}

A value that Amazon Lex V2 uses to fulfill an intent.

type StartConversationRequestEventStream added in v1.10.0

type StartConversationRequestEventStream interface {
	// contains filtered or unexported methods
}

Represents a stream of events between your application and Amazon Lex V2.

The following types satisfy this interface:

StartConversationRequestEventStreamMemberAudioInputEvent
StartConversationRequestEventStreamMemberConfigurationEvent
StartConversationRequestEventStreamMemberDisconnectionEvent
StartConversationRequestEventStreamMemberDTMFInputEvent
StartConversationRequestEventStreamMemberPlaybackCompletionEvent
StartConversationRequestEventStreamMemberTextInputEvent
Example (OutputUsage)
package main

import (
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/lexruntimev2/types"
)

func main() {
	var union types.StartConversationRequestEventStream
	// type switches can be used to check the union value
	switch v := union.(type) {
	case *types.StartConversationRequestEventStreamMemberAudioInputEvent:
		_ = v.Value // Value is types.AudioInputEvent

	case *types.StartConversationRequestEventStreamMemberConfigurationEvent:
		_ = v.Value // Value is types.ConfigurationEvent

	case *types.StartConversationRequestEventStreamMemberDisconnectionEvent:
		_ = v.Value // Value is types.DisconnectionEvent

	case *types.StartConversationRequestEventStreamMemberDTMFInputEvent:
		_ = v.Value // Value is types.DTMFInputEvent

	case *types.StartConversationRequestEventStreamMemberPlaybackCompletionEvent:
		_ = v.Value // Value is types.PlaybackCompletionEvent

	case *types.StartConversationRequestEventStreamMemberTextInputEvent:
		_ = v.Value // Value is types.TextInputEvent

	case *types.UnknownUnionMember:
		fmt.Println("unknown tag:", v.Tag)

	default:
		fmt.Println("union is nil or unknown type")

	}
}
Output:

type StartConversationRequestEventStreamMemberAudioInputEvent added in v1.10.0

type StartConversationRequestEventStreamMemberAudioInputEvent struct {
	Value AudioInputEvent
	// contains filtered or unexported fields
}

Speech audio sent from your client application to Amazon Lex V2. Audio starts accumulating when Amazon Lex V2 identifies a voice and continues until a natural pause in the speech is found before processing.

type StartConversationRequestEventStreamMemberConfigurationEvent added in v1.10.0

type StartConversationRequestEventStreamMemberConfigurationEvent struct {
	Value ConfigurationEvent
	// contains filtered or unexported fields
}

Configuration information sent from your client application to Amazon Lex V2

type StartConversationRequestEventStreamMemberDTMFInputEvent added in v1.10.0

type StartConversationRequestEventStreamMemberDTMFInputEvent struct {
	Value DTMFInputEvent
	// contains filtered or unexported fields
}

DTMF information sent to Amazon Lex V2 by your application. Amazon Lex V2 accumulates the DMTF information from when the user sends the first character and ends

  • when there's a pause longer that the value configured for the end timeout.

  • when there's a digit that is the configured end character.

  • when Amazon Lex V2 accumulates characters equal to the maximum DTMF character configuration.

type StartConversationRequestEventStreamMemberDisconnectionEvent added in v1.10.0

type StartConversationRequestEventStreamMemberDisconnectionEvent struct {
	Value DisconnectionEvent
	// contains filtered or unexported fields
}

Event sent from the client application to indicate to Amazon Lex V2 that the conversation is over.

type StartConversationRequestEventStreamMemberPlaybackCompletionEvent added in v1.10.0

type StartConversationRequestEventStreamMemberPlaybackCompletionEvent struct {
	Value PlaybackCompletionEvent
	// contains filtered or unexported fields
}

Event sent from the client application to Amazon Lex V2 to indicate that it has finished playing audio and that Amazon Lex V2 should start listening for user input.

type StartConversationRequestEventStreamMemberTextInputEvent added in v1.10.0

type StartConversationRequestEventStreamMemberTextInputEvent struct {
	Value TextInputEvent
	// contains filtered or unexported fields
}

Text sent from your client application to Amazon Lex V2. Each TextInputEvent is processed individually.

type StartConversationResponseEventStream added in v1.10.0

type StartConversationResponseEventStream interface {
	// contains filtered or unexported methods
}

Represents a stream of events between Amazon Lex V2 and your application.

The following types satisfy this interface:

StartConversationResponseEventStreamMemberAudioResponseEvent
StartConversationResponseEventStreamMemberHeartbeatEvent
StartConversationResponseEventStreamMemberIntentResultEvent
StartConversationResponseEventStreamMemberPlaybackInterruptionEvent
StartConversationResponseEventStreamMemberTextResponseEvent
StartConversationResponseEventStreamMemberTranscriptEvent
Example (OutputUsage)
package main

import (
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/lexruntimev2/types"
)

func main() {
	var union types.StartConversationResponseEventStream
	// type switches can be used to check the union value
	switch v := union.(type) {
	case *types.StartConversationResponseEventStreamMemberAudioResponseEvent:
		_ = v.Value // Value is types.AudioResponseEvent

	case *types.StartConversationResponseEventStreamMemberHeartbeatEvent:
		_ = v.Value // Value is types.HeartbeatEvent

	case *types.StartConversationResponseEventStreamMemberIntentResultEvent:
		_ = v.Value // Value is types.IntentResultEvent

	case *types.StartConversationResponseEventStreamMemberPlaybackInterruptionEvent:
		_ = v.Value // Value is types.PlaybackInterruptionEvent

	case *types.StartConversationResponseEventStreamMemberTextResponseEvent:
		_ = v.Value // Value is types.TextResponseEvent

	case *types.StartConversationResponseEventStreamMemberTranscriptEvent:
		_ = v.Value // Value is types.TranscriptEvent

	case *types.UnknownUnionMember:
		fmt.Println("unknown tag:", v.Tag)

	default:
		fmt.Println("union is nil or unknown type")

	}
}
Output:

type StartConversationResponseEventStreamMemberAudioResponseEvent added in v1.10.0

type StartConversationResponseEventStreamMemberAudioResponseEvent struct {
	Value AudioResponseEvent
	// contains filtered or unexported fields
}

An event sent from Amazon Lex V2 to your client application containing audio to play to the user.

type StartConversationResponseEventStreamMemberHeartbeatEvent added in v1.10.0

type StartConversationResponseEventStreamMemberHeartbeatEvent struct {
	Value HeartbeatEvent
	// contains filtered or unexported fields
}

Event that Amazon Lex V2 sends to indicate that the stream is still open between the client application and Amazon Lex V2

type StartConversationResponseEventStreamMemberIntentResultEvent added in v1.10.0

type StartConversationResponseEventStreamMemberIntentResultEvent struct {
	Value IntentResultEvent
	// contains filtered or unexported fields
}

Event sent from Amazon Lex V2 to the client application containing the current state of the conversation between the user and Amazon Lex V2.

type StartConversationResponseEventStreamMemberPlaybackInterruptionEvent added in v1.10.0

type StartConversationResponseEventStreamMemberPlaybackInterruptionEvent struct {
	Value PlaybackInterruptionEvent
	// contains filtered or unexported fields
}

Event sent from Amazon Lex V2 to indicate to the client application should stop playback of audio. For example, if the client is playing a prompt that asks for the user's telephone number, the user might start to say the phone number before the prompt is complete. Amazon Lex V2 sends this event to the client application to indicate that the user is responding and that Amazon Lex V2 is processing their input.

type StartConversationResponseEventStreamMemberTextResponseEvent added in v1.10.0

type StartConversationResponseEventStreamMemberTextResponseEvent struct {
	Value TextResponseEvent
	// contains filtered or unexported fields
}

The event sent from Amazon Lex V2 to your application with text to present to the user.

type StartConversationResponseEventStreamMemberTranscriptEvent added in v1.10.0

type StartConversationResponseEventStreamMemberTranscriptEvent struct {
	Value TranscriptEvent
	// contains filtered or unexported fields
}

Event sent from Amazon Lex V2 to your client application that contains a transcript of voice audio.

type StyleType added in v1.9.0

type StyleType string
const (
	StyleTypeDefault       StyleType = "Default"
	StyleTypeSpellByLetter StyleType = "SpellByLetter"
	StyleTypeSpellByWord   StyleType = "SpellByWord"
)

Enum values for StyleType

func (StyleType) Values added in v1.9.0

func (StyleType) Values() []StyleType

Values returns all known values for StyleType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type TextInputEvent added in v1.10.0

type TextInputEvent struct {

	// The text from the user. Amazon Lex V2 processes this as a complete statement.
	//
	// This member is required.
	Text *string

	// A timestamp set by the client of the date and time that the event was sent to
	// Amazon Lex V2.
	ClientTimestampMillis int64

	// A unique identifier that your application assigns to the event. You can use
	// this to identify events in logs.
	EventId *string
	// contains filtered or unexported fields
}

The event sent from your client application to Amazon Lex V2 with text input from the user.

type TextResponseEvent added in v1.10.0

type TextResponseEvent struct {

	// A unique identifier of the event sent by Amazon Lex V2. The identifier is in
	// the form RESPONSE-N , where N is a number starting with one and incremented for
	// each event sent by Amazon Lex V2 in the current session.
	EventId *string

	// A list of messages to send to the user. Messages are ordered based on the order
	// that you returned the messages from your Lambda function or the order that the
	// messages are defined in the bot.
	Messages []Message
	// contains filtered or unexported fields
}

The event sent from Amazon Lex V2 to your application with text to present to the user.

type ThrottlingException

type ThrottlingException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

func (*ThrottlingException) Error

func (e *ThrottlingException) Error() string

func (*ThrottlingException) ErrorCode

func (e *ThrottlingException) ErrorCode() string

func (*ThrottlingException) ErrorFault

func (e *ThrottlingException) ErrorFault() smithy.ErrorFault

func (*ThrottlingException) ErrorMessage

func (e *ThrottlingException) ErrorMessage() string

type TranscriptEvent added in v1.10.0

type TranscriptEvent struct {

	// A unique identifier of the event sent by Amazon Lex V2. The identifier is in
	// the form RESPONSE-N , where N is a number starting with one and incremented for
	// each event sent by Amazon Lex V2 in the current session.
	EventId *string

	// The transcript of the voice audio from the user.
	Transcript *string
	// contains filtered or unexported fields
}

Event sent from Amazon Lex V2 to your client application that contains a transcript of voice audio.

type UnknownUnionMember added in v1.10.0

type UnknownUnionMember struct {
	Tag   string
	Value []byte
	// contains filtered or unexported fields
}

UnknownUnionMember is returned when a union member is returned over the wire, but has an unknown tag.

type ValidationException

type ValidationException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

func (*ValidationException) Error

func (e *ValidationException) Error() string

func (*ValidationException) ErrorCode

func (e *ValidationException) ErrorCode() string

func (*ValidationException) ErrorFault

func (e *ValidationException) ErrorFault() smithy.ErrorFault

func (*ValidationException) ErrorMessage

func (e *ValidationException) ErrorMessage() string

type Value

type Value struct {

	// The value that Amazon Lex V2 determines for the slot, given the user input. The
	// actual value depends on the setting of the value selection strategy for the bot.
	// You can choose to use the value entered by the user, or you can have Amazon Lex
	// V2 choose the first value in the resolvedValues list.
	//
	// This member is required.
	InterpretedValue *string

	// The part of the user's response to the slot elicitation that Amazon Lex V2
	// determines is relevant to the slot value.
	OriginalValue *string

	// A list of values that Amazon Lex V2 determines are possible resolutions for the
	// user input. The first value matches the interpretedValue .
	ResolvedValues []string
	// contains filtered or unexported fields
}

Information about the value provided for a slot and Amazon Lex V2's interpretation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL