Typed dictionaries#
Index > LexRuntimeService > Typed dictionaries
Auto-generated documentation for LexRuntimeService type annotations stubs module mypy-boto3-lex-runtime.
ActiveContextTimeToLiveTypeDef#
# ActiveContextTimeToLiveTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import ActiveContextTimeToLiveTypeDef
def get_value() -> ActiveContextTimeToLiveTypeDef:
return {
"timeToLiveInSeconds": ...,
}
# ActiveContextTimeToLiveTypeDef definition
class ActiveContextTimeToLiveTypeDef(TypedDict):
timeToLiveInSeconds: NotRequired[int],
turnsToLive: NotRequired[int],
ButtonTypeDef#
# ButtonTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import ButtonTypeDef
def get_value() -> ButtonTypeDef:
return {
"text": ...,
"value": ...,
}
# ButtonTypeDef definition
class ButtonTypeDef(TypedDict):
text: str,
value: str,
DeleteSessionRequestRequestTypeDef#
# DeleteSessionRequestRequestTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import DeleteSessionRequestRequestTypeDef
def get_value() -> DeleteSessionRequestRequestTypeDef:
return {
"botName": ...,
"botAlias": ...,
"userId": ...,
}
# DeleteSessionRequestRequestTypeDef definition
class DeleteSessionRequestRequestTypeDef(TypedDict):
botName: str,
botAlias: str,
userId: str,
DeleteSessionResponseTypeDef#
# DeleteSessionResponseTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import DeleteSessionResponseTypeDef
def get_value() -> DeleteSessionResponseTypeDef:
return {
"botName": ...,
"botAlias": ...,
"userId": ...,
"sessionId": ...,
"ResponseMetadata": ...,
}
# DeleteSessionResponseTypeDef definition
class DeleteSessionResponseTypeDef(TypedDict):
botName: str,
botAlias: str,
userId: str,
sessionId: str,
ResponseMetadata: ResponseMetadataTypeDef, # (1)
DialogActionTypeDef#
# DialogActionTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import DialogActionTypeDef
def get_value() -> DialogActionTypeDef:
return {
"type": ...,
}
# 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)
GetSessionRequestRequestTypeDef#
# GetSessionRequestRequestTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import GetSessionRequestRequestTypeDef
def get_value() -> GetSessionRequestRequestTypeDef:
return {
"botName": ...,
"botAlias": ...,
"userId": ...,
}
# GetSessionRequestRequestTypeDef definition
class GetSessionRequestRequestTypeDef(TypedDict):
botName: str,
botAlias: str,
userId: str,
checkpointLabelFilter: NotRequired[str],
IntentSummaryTypeDef#
# IntentSummaryTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import IntentSummaryTypeDef
def get_value() -> IntentSummaryTypeDef:
return {
"dialogActionType": ...,
}
# 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],
IntentConfidenceTypeDef#
# IntentConfidenceTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import IntentConfidenceTypeDef
def get_value() -> IntentConfidenceTypeDef:
return {
"score": ...,
}
# IntentConfidenceTypeDef definition
class IntentConfidenceTypeDef(TypedDict):
score: NotRequired[float],
PostContentRequestRequestTypeDef#
# PostContentRequestRequestTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import PostContentRequestRequestTypeDef
def get_value() -> PostContentRequestRequestTypeDef:
return {
"botName": ...,
"botAlias": ...,
"userId": ...,
"contentType": ...,
"inputStream": ...,
}
# 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],
PostContentResponseTypeDef#
# PostContentResponseTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import PostContentResponseTypeDef
def get_value() -> PostContentResponseTypeDef:
return {
"contentType": ...,
"intentName": ...,
"nluIntentConfidence": ...,
"alternativeIntents": ...,
"slots": ...,
"sessionAttributes": ...,
"sentimentResponse": ...,
"message": ...,
"encodedMessage": ...,
"messageFormat": ...,
"dialogState": ...,
"slotToElicit": ...,
"inputTranscript": ...,
"encodedInputTranscript": ...,
"audioStream": ...,
"botVersion": ...,
"sessionId": ...,
"activeContexts": ...,
"ResponseMetadata": ...,
}
# 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)
SentimentResponseTypeDef#
# SentimentResponseTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import SentimentResponseTypeDef
def get_value() -> SentimentResponseTypeDef:
return {
"sentimentLabel": ...,
}
# SentimentResponseTypeDef definition
class SentimentResponseTypeDef(TypedDict):
sentimentLabel: NotRequired[str],
sentimentScore: NotRequired[str],
PutSessionResponseTypeDef#
# PutSessionResponseTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import PutSessionResponseTypeDef
def get_value() -> PutSessionResponseTypeDef:
return {
"contentType": ...,
"intentName": ...,
"slots": ...,
"sessionAttributes": ...,
"message": ...,
"encodedMessage": ...,
"messageFormat": ...,
"dialogState": ...,
"slotToElicit": ...,
"audioStream": ...,
"sessionId": ...,
"activeContexts": ...,
"ResponseMetadata": ...,
}
# 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)
ResponseMetadataTypeDef#
# ResponseMetadataTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import ResponseMetadataTypeDef
def get_value() -> ResponseMetadataTypeDef:
return {
"RequestId": ...,
"HostId": ...,
"HTTPStatusCode": ...,
"HTTPHeaders": ...,
"RetryAttempts": ...,
}
# ResponseMetadataTypeDef definition
class ResponseMetadataTypeDef(TypedDict):
RequestId: str,
HostId: str,
HTTPStatusCode: int,
HTTPHeaders: Dict[str, str],
RetryAttempts: int,
ActiveContextTypeDef#
# ActiveContextTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import ActiveContextTypeDef
def get_value() -> ActiveContextTypeDef:
return {
"name": ...,
"timeToLive": ...,
"parameters": ...,
}
# ActiveContextTypeDef definition
class ActiveContextTypeDef(TypedDict):
name: str,
timeToLive: ActiveContextTimeToLiveTypeDef, # (1)
parameters: Dict[str, str],
GenericAttachmentTypeDef#
# GenericAttachmentTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import GenericAttachmentTypeDef
def get_value() -> GenericAttachmentTypeDef:
return {
"title": ...,
}
# GenericAttachmentTypeDef definition
class GenericAttachmentTypeDef(TypedDict):
title: NotRequired[str],
subTitle: NotRequired[str],
attachmentLinkUrl: NotRequired[str],
imageUrl: NotRequired[str],
buttons: NotRequired[List[ButtonTypeDef]], # (1)
- See ButtonTypeDef
PredictedIntentTypeDef#
# PredictedIntentTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import PredictedIntentTypeDef
def get_value() -> PredictedIntentTypeDef:
return {
"intentName": ...,
}
# PredictedIntentTypeDef definition
class PredictedIntentTypeDef(TypedDict):
intentName: NotRequired[str],
nluIntentConfidence: NotRequired[IntentConfidenceTypeDef], # (1)
slots: NotRequired[Dict[str, str]],
GetSessionResponseTypeDef#
# GetSessionResponseTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import GetSessionResponseTypeDef
def get_value() -> GetSessionResponseTypeDef:
return {
"recentIntentSummaryView": ...,
"sessionAttributes": ...,
"sessionId": ...,
"dialogAction": ...,
"activeContexts": ...,
"ResponseMetadata": ...,
}
# 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)
- See IntentSummaryTypeDef
- See DialogActionTypeDef
- See ActiveContextTypeDef
- See ResponseMetadataTypeDef
PostTextRequestRequestTypeDef#
# PostTextRequestRequestTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import PostTextRequestRequestTypeDef
def get_value() -> PostTextRequestRequestTypeDef:
return {
"botName": ...,
"botAlias": ...,
"userId": ...,
"inputText": ...,
}
# 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)
PutSessionRequestRequestTypeDef#
# PutSessionRequestRequestTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import PutSessionRequestRequestTypeDef
def get_value() -> PutSessionRequestRequestTypeDef:
return {
"botName": ...,
"botAlias": ...,
"userId": ...,
}
# 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)
ResponseCardTypeDef#
# ResponseCardTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import ResponseCardTypeDef
def get_value() -> ResponseCardTypeDef:
return {
"version": ...,
}
# ResponseCardTypeDef definition
class ResponseCardTypeDef(TypedDict):
version: NotRequired[str],
contentType: NotRequired[ContentTypeType], # (1)
genericAttachments: NotRequired[List[GenericAttachmentTypeDef]], # (2)
PostTextResponseTypeDef#
# PostTextResponseTypeDef usage example
from mypy_boto3_lex_runtime.type_defs import PostTextResponseTypeDef
def get_value() -> PostTextResponseTypeDef:
return {
"intentName": ...,
"nluIntentConfidence": ...,
"alternativeIntents": ...,
"slots": ...,
"sessionAttributes": ...,
"message": ...,
"sentimentResponse": ...,
"messageFormat": ...,
"dialogState": ...,
"slotToElicit": ...,
"responseCard": ...,
"sessionId": ...,
"botVersion": ...,
"activeContexts": ...,
"ResponseMetadata": ...,
}
# 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)