Typed dictionaries
Index > LexRuntimeV2 > Typed dictionaries
Auto-generated documentation for LexRuntimeV2 type annotations stubs module mypy-boto3-lexv2-runtime.
ActiveContextTimeToLiveTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import ActiveContextTimeToLiveTypeDef
def get_value() -> ActiveContextTimeToLiveTypeDef:
return {
"timeToLiveInSeconds": ...,
"turnsToLive": ...,
}
Definition
class ActiveContextTimeToLiveTypeDef(TypedDict):
timeToLiveInSeconds: int,
turnsToLive: int,
ButtonTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import ButtonTypeDef
def get_value() -> ButtonTypeDef:
return {
"text": ...,
"value": ...,
}
ConfidenceScoreTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import ConfidenceScoreTypeDef
def get_value() -> ConfidenceScoreTypeDef:
return {
"score": ...,
}
DeleteSessionRequestRequestTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import DeleteSessionRequestRequestTypeDef
def get_value() -> DeleteSessionRequestRequestTypeDef:
return {
"botId": ...,
"botAliasId": ...,
"localeId": ...,
"sessionId": ...,
}
Definition
class DeleteSessionRequestRequestTypeDef(TypedDict):
botId: str,
botAliasId: str,
localeId: str,
sessionId: str,
ResponseMetadataTypeDef
Usage Example
from mypy_boto3_lexv2_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_lexv2_runtime.type_defs import DialogActionTypeDef
def get_value() -> DialogActionTypeDef:
return {
"type": ...,
}
Definition
class DialogActionTypeDef(TypedDict):
type: DialogActionTypeType, # (1)
slotToElicit: NotRequired[str],
slotElicitationStyle: NotRequired[StyleTypeType], # (2)
subSlotToElicit: NotRequired[ElicitSubSlotTypeDef], # (3)
- See DialogActionTypeType
- See StyleTypeType
- See ElicitSubSlotTypeDef
ElicitSubSlotTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import ElicitSubSlotTypeDef
def get_value() -> ElicitSubSlotTypeDef:
return {
"name": ...,
}
Definition
class ElicitSubSlotTypeDef(TypedDict):
name: str,
subSlotToElicit: NotRequired[ElicitSubSlotTypeDef], # (1)
GetSessionRequestRequestTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import GetSessionRequestRequestTypeDef
def get_value() -> GetSessionRequestRequestTypeDef:
return {
"botId": ...,
"botAliasId": ...,
"localeId": ...,
"sessionId": ...,
}
Definition
class GetSessionRequestRequestTypeDef(TypedDict):
botId: str,
botAliasId: str,
localeId: str,
sessionId: str,
IntentTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import IntentTypeDef
def get_value() -> IntentTypeDef:
return {
"name": ...,
}
Definition
class IntentTypeDef(TypedDict):
name: str,
slots: NotRequired[Dict[str, SlotTypeDef]], # (1)
state: NotRequired[IntentStateType], # (2)
confirmationState: NotRequired[ConfirmationStateType], # (3)
- See SlotTypeDef
- See IntentStateType
- See ConfirmationStateType
RecognizedBotMemberTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import RecognizedBotMemberTypeDef
def get_value() -> RecognizedBotMemberTypeDef:
return {
"botId": ...,
}
RecognizeUtteranceRequestRequestTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import RecognizeUtteranceRequestRequestTypeDef
def get_value() -> RecognizeUtteranceRequestRequestTypeDef:
return {
"botId": ...,
"botAliasId": ...,
"localeId": ...,
"sessionId": ...,
"requestContentType": ...,
}
Definition
class RecognizeUtteranceRequestRequestTypeDef(TypedDict):
botId: str,
botAliasId: str,
localeId: str,
sessionId: str,
requestContentType: str,
sessionState: NotRequired[str],
requestAttributes: NotRequired[str],
responseContentType: NotRequired[str],
inputStream: NotRequired[Union[str, bytes, IO[Any], StreamingBody]],
RuntimeHintValueTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import RuntimeHintValueTypeDef
def get_value() -> RuntimeHintValueTypeDef:
return {
"phrase": ...,
}
RuntimeHintsTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import RuntimeHintsTypeDef
def get_value() -> RuntimeHintsTypeDef:
return {
"slotHints": ...,
}
Definition
class RuntimeHintsTypeDef(TypedDict):
slotHints: NotRequired[Dict[str, Dict[str, RuntimeHintDetailsTypeDef]]], # (1)
SentimentScoreTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import SentimentScoreTypeDef
def get_value() -> SentimentScoreTypeDef:
return {
"positive": ...,
}
Definition
class SentimentScoreTypeDef(TypedDict):
positive: NotRequired[float],
negative: NotRequired[float],
neutral: NotRequired[float],
mixed: NotRequired[float],
ValueTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import ValueTypeDef
def get_value() -> ValueTypeDef:
return {
"interpretedValue": ...,
}
Definition
class ValueTypeDef(TypedDict):
interpretedValue: str,
originalValue: NotRequired[str],
resolvedValues: NotRequired[List[str]],
ActiveContextTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import ActiveContextTypeDef
def get_value() -> ActiveContextTypeDef:
return {
"name": ...,
"timeToLive": ...,
"contextAttributes": ...,
}
Definition
class ActiveContextTypeDef(TypedDict):
name: str,
timeToLive: ActiveContextTimeToLiveTypeDef, # (1)
contextAttributes: Dict[str, str],
ImageResponseCardTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import ImageResponseCardTypeDef
def get_value() -> ImageResponseCardTypeDef:
return {
"title": ...,
}
Definition
class ImageResponseCardTypeDef(TypedDict):
title: str,
subtitle: NotRequired[str],
imageUrl: NotRequired[str],
buttons: NotRequired[List[ButtonTypeDef]], # (1)
- See ButtonTypeDef
DeleteSessionResponseTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import DeleteSessionResponseTypeDef
def get_value() -> DeleteSessionResponseTypeDef:
return {
"botId": ...,
"botAliasId": ...,
"localeId": ...,
"sessionId": ...,
"ResponseMetadata": ...,
}
Definition
class DeleteSessionResponseTypeDef(TypedDict):
botId: str,
botAliasId: str,
localeId: str,
sessionId: str,
ResponseMetadata: ResponseMetadataTypeDef, # (1)
PutSessionResponseTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import PutSessionResponseTypeDef
def get_value() -> PutSessionResponseTypeDef:
return {
"contentType": ...,
"messages": ...,
"sessionState": ...,
"requestAttributes": ...,
"sessionId": ...,
"audioStream": ...,
"ResponseMetadata": ...,
}
Definition
class PutSessionResponseTypeDef(TypedDict):
contentType: str,
messages: str,
sessionState: str,
requestAttributes: str,
sessionId: str,
audioStream: StreamingBody,
ResponseMetadata: ResponseMetadataTypeDef, # (1)
RecognizeUtteranceResponseTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import RecognizeUtteranceResponseTypeDef
def get_value() -> RecognizeUtteranceResponseTypeDef:
return {
"inputMode": ...,
"contentType": ...,
"messages": ...,
"interpretations": ...,
"sessionState": ...,
"requestAttributes": ...,
"sessionId": ...,
"inputTranscript": ...,
"audioStream": ...,
"recognizedBotMember": ...,
"ResponseMetadata": ...,
}
Definition
class RecognizeUtteranceResponseTypeDef(TypedDict):
inputMode: str,
contentType: str,
messages: str,
interpretations: str,
sessionState: str,
requestAttributes: str,
sessionId: str,
inputTranscript: str,
audioStream: StreamingBody,
recognizedBotMember: str,
ResponseMetadata: ResponseMetadataTypeDef, # (1)
RuntimeHintDetailsTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import RuntimeHintDetailsTypeDef
def get_value() -> RuntimeHintDetailsTypeDef:
return {
"runtimeHintValues": ...,
}
Definition
class RuntimeHintDetailsTypeDef(TypedDict):
runtimeHintValues: NotRequired[List[RuntimeHintValueTypeDef]], # (1)
subSlotHints: NotRequired[Dict[str, RuntimeHintDetailsTypeDef]], # (2)
SentimentResponseTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import SentimentResponseTypeDef
def get_value() -> SentimentResponseTypeDef:
return {
"sentiment": ...,
}
Definition
class SentimentResponseTypeDef(TypedDict):
sentiment: NotRequired[SentimentTypeType], # (1)
sentimentScore: NotRequired[SentimentScoreTypeDef], # (2)
SlotTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import SlotTypeDef
def get_value() -> SlotTypeDef:
return {
"value": ...,
}
Definition
class SlotTypeDef(TypedDict):
value: NotRequired[ValueTypeDef], # (1)
shape: NotRequired[ShapeType], # (2)
values: NotRequired[List[SlotTypeDef]], # (3)
subSlots: NotRequired[Dict[str, SlotTypeDef]], # (4)
- See ValueTypeDef
- See ShapeType
- See SlotTypeDef
- See SlotTypeDef
SessionStateTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import SessionStateTypeDef
def get_value() -> SessionStateTypeDef:
return {
"dialogAction": ...,
}
Definition
class SessionStateTypeDef(TypedDict):
dialogAction: NotRequired[DialogActionTypeDef], # (1)
intent: NotRequired[IntentTypeDef], # (2)
activeContexts: NotRequired[List[ActiveContextTypeDef]], # (3)
sessionAttributes: NotRequired[Dict[str, str]],
originatingRequestId: NotRequired[str],
runtimeHints: NotRequired[RuntimeHintsTypeDef], # (4)
- See DialogActionTypeDef
- See IntentTypeDef
- See ActiveContextTypeDef
- See RuntimeHintsTypeDef
MessageTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import MessageTypeDef
def get_value() -> MessageTypeDef:
return {
"contentType": ...,
}
Definition
class MessageTypeDef(TypedDict):
contentType: MessageContentTypeType, # (1)
content: NotRequired[str],
imageResponseCard: NotRequired[ImageResponseCardTypeDef], # (2)
InterpretationTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import InterpretationTypeDef
def get_value() -> InterpretationTypeDef:
return {
"nluConfidence": ...,
}
Definition
class InterpretationTypeDef(TypedDict):
nluConfidence: NotRequired[ConfidenceScoreTypeDef], # (1)
sentimentResponse: NotRequired[SentimentResponseTypeDef], # (2)
intent: NotRequired[IntentTypeDef], # (3)
RecognizeTextRequestRequestTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import RecognizeTextRequestRequestTypeDef
def get_value() -> RecognizeTextRequestRequestTypeDef:
return {
"botId": ...,
"botAliasId": ...,
"localeId": ...,
"sessionId": ...,
"text": ...,
}
Definition
class RecognizeTextRequestRequestTypeDef(TypedDict):
botId: str,
botAliasId: str,
localeId: str,
sessionId: str,
text: str,
sessionState: NotRequired[SessionStateTypeDef], # (1)
requestAttributes: NotRequired[Mapping[str, str]],
PutSessionRequestRequestTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import PutSessionRequestRequestTypeDef
def get_value() -> PutSessionRequestRequestTypeDef:
return {
"botId": ...,
"botAliasId": ...,
"localeId": ...,
"sessionId": ...,
"sessionState": ...,
}
Definition
class PutSessionRequestRequestTypeDef(TypedDict):
botId: str,
botAliasId: str,
localeId: str,
sessionId: str,
sessionState: SessionStateTypeDef, # (1)
messages: NotRequired[Sequence[MessageTypeDef]], # (2)
requestAttributes: NotRequired[Mapping[str, str]],
responseContentType: NotRequired[str],
- See SessionStateTypeDef
- See MessageTypeDef
GetSessionResponseTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import GetSessionResponseTypeDef
def get_value() -> GetSessionResponseTypeDef:
return {
"sessionId": ...,
"messages": ...,
"interpretations": ...,
"sessionState": ...,
"ResponseMetadata": ...,
}
Definition
class GetSessionResponseTypeDef(TypedDict):
sessionId: str,
messages: List[MessageTypeDef], # (1)
interpretations: List[InterpretationTypeDef], # (2)
sessionState: SessionStateTypeDef, # (3)
ResponseMetadata: ResponseMetadataTypeDef, # (4)
RecognizeTextResponseTypeDef
Usage Example
from mypy_boto3_lexv2_runtime.type_defs import RecognizeTextResponseTypeDef
def get_value() -> RecognizeTextResponseTypeDef:
return {
"messages": ...,
"sessionState": ...,
"interpretations": ...,
"requestAttributes": ...,
"sessionId": ...,
"recognizedBotMember": ...,
"ResponseMetadata": ...,
}
Definition
class RecognizeTextResponseTypeDef(TypedDict):
messages: List[MessageTypeDef], # (1)
sessionState: SessionStateTypeDef, # (2)
interpretations: List[InterpretationTypeDef], # (3)
requestAttributes: Dict[str, str],
sessionId: str,
recognizedBotMember: RecognizedBotMemberTypeDef, # (4)
ResponseMetadata: ResponseMetadataTypeDef, # (5)