Skip to content

Type definitions#

Index > LexRuntimeService > Type definitions

Auto-generated documentation for LexRuntimeService type annotations stubs module mypy-boto3-lex-runtime.

BlobTypeDef#

# BlobTypeDef definition

BlobTypeDef = Union[
    str,
    bytes,
    IO[Any],
    StreamingBody,
]

DialogActionUnionTypeDef#

# DialogActionUnionTypeDef definition

DialogActionUnionTypeDef = Union[
    DialogActionTypeDef,  # (1)
    DialogActionOutputTypeDef,  # (2)
]
  1. See DialogActionTypeDef
  2. See DialogActionOutputTypeDef

IntentSummaryUnionTypeDef#

# IntentSummaryUnionTypeDef definition

IntentSummaryUnionTypeDef = Union[
    IntentSummaryTypeDef,  # (1)
    IntentSummaryOutputTypeDef,  # (2)
]
  1. See IntentSummaryTypeDef
  2. See IntentSummaryOutputTypeDef

ActiveContextUnionTypeDef#

# ActiveContextUnionTypeDef definition

ActiveContextUnionTypeDef = Union[
    ActiveContextTypeDef,  # (1)
    ActiveContextOutputTypeDef,  # (2)
]
  1. See ActiveContextTypeDef
  2. See ActiveContextOutputTypeDef

ActiveContextTimeToLiveTypeDef#

# ActiveContextTimeToLiveTypeDef definition

class ActiveContextTimeToLiveTypeDef(TypedDict):
    timeToLiveInSeconds: NotRequired[int],
    turnsToLive: NotRequired[int],

ButtonTypeDef#

# ButtonTypeDef definition

class ButtonTypeDef(TypedDict):
    text: str,
    value: str,

DeleteSessionRequestRequestTypeDef#

# DeleteSessionRequestRequestTypeDef definition

class DeleteSessionRequestRequestTypeDef(TypedDict):
    botName: str,
    botAlias: str,
    userId: str,

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef definition

class ResponseMetadataTypeDef(TypedDict):
    RequestId: str,
    HTTPStatusCode: int,
    HTTPHeaders: Dict[str, str],
    RetryAttempts: int,
    HostId: NotRequired[str],

DialogActionOutputTypeDef#

# DialogActionOutputTypeDef definition

class DialogActionOutputTypeDef(TypedDict):
    type: DialogActionTypeType,  # (1)
    intentName: NotRequired[str],
    slots: NotRequired[Dict[str, str]],
    slotToElicit: NotRequired[str],
    fulfillmentState: NotRequired[FulfillmentStateType],  # (2)
    message: NotRequired[str],
    messageFormat: NotRequired[MessageFormatTypeType],  # (3)
  1. See DialogActionTypeType
  2. See FulfillmentStateType
  3. See MessageFormatTypeType

DialogActionTypeDef#

# DialogActionTypeDef definition

class DialogActionTypeDef(TypedDict):
    type: DialogActionTypeType,  # (1)
    intentName: NotRequired[str],
    slots: NotRequired[Mapping[str, str]],
    slotToElicit: NotRequired[str],
    fulfillmentState: NotRequired[FulfillmentStateType],  # (2)
    message: NotRequired[str],
    messageFormat: NotRequired[MessageFormatTypeType],  # (3)
  1. See DialogActionTypeType
  2. See FulfillmentStateType
  3. See MessageFormatTypeType

GetSessionRequestRequestTypeDef#

# GetSessionRequestRequestTypeDef definition

class GetSessionRequestRequestTypeDef(TypedDict):
    botName: str,
    botAlias: str,
    userId: str,
    checkpointLabelFilter: NotRequired[str],

IntentSummaryOutputTypeDef#

# IntentSummaryOutputTypeDef definition

class IntentSummaryOutputTypeDef(TypedDict):
    dialogActionType: DialogActionTypeType,  # (2)
    intentName: NotRequired[str],
    checkpointLabel: NotRequired[str],
    slots: NotRequired[Dict[str, str]],
    confirmationStatus: NotRequired[ConfirmationStatusType],  # (1)
    fulfillmentState: NotRequired[FulfillmentStateType],  # (3)
    slotToElicit: NotRequired[str],
  1. See ConfirmationStatusType
  2. See DialogActionTypeType
  3. See FulfillmentStateType

IntentConfidenceTypeDef#

# IntentConfidenceTypeDef definition

class IntentConfidenceTypeDef(TypedDict):
    score: NotRequired[float],

IntentSummaryTypeDef#

# IntentSummaryTypeDef definition

class IntentSummaryTypeDef(TypedDict):
    dialogActionType: DialogActionTypeType,  # (2)
    intentName: NotRequired[str],
    checkpointLabel: NotRequired[str],
    slots: NotRequired[Mapping[str, str]],
    confirmationStatus: NotRequired[ConfirmationStatusType],  # (1)
    fulfillmentState: NotRequired[FulfillmentStateType],  # (3)
    slotToElicit: NotRequired[str],
  1. See ConfirmationStatusType
  2. See DialogActionTypeType
  3. See FulfillmentStateType

SentimentResponseTypeDef#

# SentimentResponseTypeDef definition

class SentimentResponseTypeDef(TypedDict):
    sentimentLabel: NotRequired[str],
    sentimentScore: NotRequired[str],

ActiveContextOutputTypeDef#

# ActiveContextOutputTypeDef definition

class ActiveContextOutputTypeDef(TypedDict):
    name: str,
    timeToLive: ActiveContextTimeToLiveTypeDef,  # (1)
    parameters: Dict[str, str],
  1. See ActiveContextTimeToLiveTypeDef

ActiveContextTypeDef#

# ActiveContextTypeDef definition

class ActiveContextTypeDef(TypedDict):
    name: str,
    timeToLive: ActiveContextTimeToLiveTypeDef,  # (1)
    parameters: Mapping[str, str],
  1. See ActiveContextTimeToLiveTypeDef

PostContentRequestRequestTypeDef#

# PostContentRequestRequestTypeDef definition

class PostContentRequestRequestTypeDef(TypedDict):
    botName: str,
    botAlias: str,
    userId: str,
    contentType: str,
    inputStream: Union[str, bytes, IO[Any], StreamingBody],
    sessionAttributes: NotRequired[str],
    requestAttributes: NotRequired[str],
    accept: NotRequired[str],
    activeContexts: NotRequired[str],

GenericAttachmentTypeDef#

# GenericAttachmentTypeDef definition

class GenericAttachmentTypeDef(TypedDict):
    title: NotRequired[str],
    subTitle: NotRequired[str],
    attachmentLinkUrl: NotRequired[str],
    imageUrl: NotRequired[str],
    buttons: NotRequired[List[ButtonTypeDef]],  # (1)
  1. See ButtonTypeDef

DeleteSessionResponseTypeDef#

# DeleteSessionResponseTypeDef definition

class DeleteSessionResponseTypeDef(TypedDict):
    botName: str,
    botAlias: str,
    userId: str,
    sessionId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

PostContentResponseTypeDef#

# PostContentResponseTypeDef definition

class PostContentResponseTypeDef(TypedDict):
    contentType: str,
    intentName: str,
    nluIntentConfidence: str,
    alternativeIntents: str,
    slots: str,
    sessionAttributes: str,
    sentimentResponse: str,
    message: str,
    encodedMessage: str,
    messageFormat: MessageFormatTypeType,  # (1)
    dialogState: DialogStateType,  # (2)
    slotToElicit: str,
    inputTranscript: str,
    encodedInputTranscript: str,
    audioStream: StreamingBody,
    botVersion: str,
    sessionId: str,
    activeContexts: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See MessageFormatTypeType
  2. See DialogStateType
  3. See ResponseMetadataTypeDef

PutSessionResponseTypeDef#

# PutSessionResponseTypeDef definition

class PutSessionResponseTypeDef(TypedDict):
    contentType: str,
    intentName: str,
    slots: str,
    sessionAttributes: str,
    message: str,
    encodedMessage: str,
    messageFormat: MessageFormatTypeType,  # (1)
    dialogState: DialogStateType,  # (2)
    slotToElicit: str,
    audioStream: StreamingBody,
    sessionId: str,
    activeContexts: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See MessageFormatTypeType
  2. See DialogStateType
  3. See ResponseMetadataTypeDef

PredictedIntentTypeDef#

# PredictedIntentTypeDef definition

class PredictedIntentTypeDef(TypedDict):
    intentName: NotRequired[str],
    nluIntentConfidence: NotRequired[IntentConfidenceTypeDef],  # (1)
    slots: NotRequired[Dict[str, str]],
  1. See IntentConfidenceTypeDef

GetSessionResponseTypeDef#

# GetSessionResponseTypeDef definition

class GetSessionResponseTypeDef(TypedDict):
    recentIntentSummaryView: List[IntentSummaryOutputTypeDef],  # (1)
    sessionAttributes: Dict[str, str],
    sessionId: str,
    dialogAction: DialogActionOutputTypeDef,  # (2)
    activeContexts: List[ActiveContextOutputTypeDef],  # (3)
    ResponseMetadata: ResponseMetadataTypeDef,  # (4)
  1. See IntentSummaryOutputTypeDef
  2. See DialogActionOutputTypeDef
  3. See ActiveContextOutputTypeDef
  4. See ResponseMetadataTypeDef

ResponseCardTypeDef#

# ResponseCardTypeDef definition

class ResponseCardTypeDef(TypedDict):
    version: NotRequired[str],
    contentType: NotRequired[ContentTypeType],  # (1)
    genericAttachments: NotRequired[List[GenericAttachmentTypeDef]],  # (2)
  1. See ContentTypeType
  2. See GenericAttachmentTypeDef

PostTextRequestRequestTypeDef#

# PostTextRequestRequestTypeDef definition

class PostTextRequestRequestTypeDef(TypedDict):
    botName: str,
    botAlias: str,
    userId: str,
    inputText: str,
    sessionAttributes: NotRequired[Mapping[str, str]],
    requestAttributes: NotRequired[Mapping[str, str]],
    activeContexts: NotRequired[Sequence[Union[ActiveContextTypeDef, ActiveContextOutputTypeDef]]],  # (1)
  1. See ActiveContextTypeDef ActiveContextOutputTypeDef

PutSessionRequestRequestTypeDef#

# PutSessionRequestRequestTypeDef definition

class PutSessionRequestRequestTypeDef(TypedDict):
    botName: str,
    botAlias: str,
    userId: str,
    sessionAttributes: NotRequired[Mapping[str, str]],
    dialogAction: NotRequired[DialogActionTypeDef],  # (1)
    recentIntentSummaryView: NotRequired[Sequence[Union[IntentSummaryTypeDef, IntentSummaryOutputTypeDef]]],  # (2)
    accept: NotRequired[str],
    activeContexts: NotRequired[Sequence[Union[ActiveContextTypeDef, ActiveContextOutputTypeDef]]],  # (3)
  1. See DialogActionTypeDef
  2. See IntentSummaryTypeDef IntentSummaryOutputTypeDef
  3. See ActiveContextTypeDef ActiveContextOutputTypeDef

PostTextResponseTypeDef#

# PostTextResponseTypeDef definition

class PostTextResponseTypeDef(TypedDict):
    intentName: str,
    nluIntentConfidence: IntentConfidenceTypeDef,  # (1)
    alternativeIntents: List[PredictedIntentTypeDef],  # (2)
    slots: Dict[str, str],
    sessionAttributes: Dict[str, str],
    message: str,
    sentimentResponse: SentimentResponseTypeDef,  # (3)
    messageFormat: MessageFormatTypeType,  # (4)
    dialogState: DialogStateType,  # (5)
    slotToElicit: str,
    responseCard: ResponseCardTypeDef,  # (6)
    sessionId: str,
    botVersion: str,
    activeContexts: List[ActiveContextOutputTypeDef],  # (7)
    ResponseMetadata: ResponseMetadataTypeDef,  # (8)
  1. See IntentConfidenceTypeDef
  2. See PredictedIntentTypeDef
  3. See SentimentResponseTypeDef
  4. See MessageFormatTypeType
  5. See DialogStateType
  6. See ResponseCardTypeDef
  7. See ActiveContextOutputTypeDef
  8. See ResponseMetadataTypeDef