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