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,
]

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],

DialogActionTypeDef#

# DialogActionTypeDef definition

class DialogActionTypeDef(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

GetSessionRequestRequestTypeDef#

# GetSessionRequestRequestTypeDef definition

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

IntentSummaryTypeDef#

# IntentSummaryTypeDef definition

class IntentSummaryTypeDef(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],

SentimentResponseTypeDef#

# SentimentResponseTypeDef definition

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

ActiveContextTypeDef#

# ActiveContextTypeDef definition

class ActiveContextTypeDef(TypedDict):
    name: str,
    timeToLive: ActiveContextTimeToLiveTypeDef,  # (1)
    parameters: Dict[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[IntentSummaryTypeDef],  # (1)
    sessionAttributes: Dict[str, str],
    sessionId: str,
    dialogAction: DialogActionTypeDef,  # (2)
    activeContexts: List[ActiveContextTypeDef],  # (3)
    ResponseMetadata: ResponseMetadataTypeDef,  # (4)
  1. See IntentSummaryTypeDef
  2. See DialogActionTypeDef
  3. See ActiveContextTypeDef
  4. See ResponseMetadataTypeDef

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[ActiveContextTypeDef]],  # (1)
  1. See ActiveContextTypeDef

PutSessionRequestRequestTypeDef#

# PutSessionRequestRequestTypeDef definition

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

ResponseCardTypeDef#

# ResponseCardTypeDef definition

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

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[ActiveContextTypeDef],  # (7)
    ResponseMetadata: ResponseMetadataTypeDef,  # (8)
  1. See IntentConfidenceTypeDef
  2. See PredictedIntentTypeDef
  3. See SentimentResponseTypeDef
  4. See MessageFormatTypeType
  5. See DialogStateType
  6. See ResponseCardTypeDef
  7. See ActiveContextTypeDef
  8. See ResponseMetadataTypeDef