Skip to content

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": ...,
    }
Definition
class ButtonTypeDef(TypedDict):
    text: str,
    value: str,

ConfidenceScoreTypeDef

Usage Example
from mypy_boto3_lexv2_runtime.type_defs import ConfidenceScoreTypeDef

def get_value() -> ConfidenceScoreTypeDef:
    return {
        "score": ...,
    }
Definition
class ConfidenceScoreTypeDef(TypedDict):
    score: NotRequired[float],

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)
  1. See DialogActionTypeType
  2. See StyleTypeType
  3. 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)
  1. See ElicitSubSlotTypeDef

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)
  1. See SlotTypeDef
  2. See IntentStateType
  3. See ConfirmationStateType

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": ...,
    }
Definition
class RuntimeHintValueTypeDef(TypedDict):
    phrase: str,

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)
  1. See RuntimeHintDetailsTypeDef

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],
  1. See ActiveContextTimeToLiveTypeDef

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)
  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)
  1. See ResponseMetadataTypeDef

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)
  1. See ResponseMetadataTypeDef

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": ...,
        "ResponseMetadata": ...,
    }
Definition
class RecognizeUtteranceResponseTypeDef(TypedDict):
    inputMode: str,
    contentType: str,
    messages: str,
    interpretations: str,
    sessionState: str,
    requestAttributes: str,
    sessionId: str,
    inputTranscript: str,
    audioStream: StreamingBody,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

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)
  1. See RuntimeHintValueTypeDef
  2. See RuntimeHintDetailsTypeDef

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)
  1. See SentimentTypeType
  2. See SentimentScoreTypeDef

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)
  1. See ValueTypeDef
  2. See ShapeType
  3. See SlotTypeDef
  4. 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)
  1. See DialogActionTypeDef
  2. See IntentTypeDef
  3. See ActiveContextTypeDef
  4. 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)
  1. See MessageContentTypeType
  2. See ImageResponseCardTypeDef

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)
  1. See ConfidenceScoreTypeDef
  2. See SentimentResponseTypeDef
  3. See IntentTypeDef

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]],
  1. See SessionStateTypeDef

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],
  1. See SessionStateTypeDef
  2. 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)
  1. See MessageTypeDef
  2. See InterpretationTypeDef
  3. See SessionStateTypeDef
  4. See ResponseMetadataTypeDef

RecognizeTextResponseTypeDef

Usage Example
from mypy_boto3_lexv2_runtime.type_defs import RecognizeTextResponseTypeDef

def get_value() -> RecognizeTextResponseTypeDef:
    return {
        "messages": ...,
        "sessionState": ...,
        "interpretations": ...,
        "requestAttributes": ...,
        "sessionId": ...,
        "ResponseMetadata": ...,
    }
Definition
class RecognizeTextResponseTypeDef(TypedDict):
    messages: List[MessageTypeDef],  # (1)
    sessionState: SessionStateTypeDef,  # (2)
    interpretations: List[InterpretationTypeDef],  # (3)
    requestAttributes: Dict[str, str],
    sessionId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (4)
  1. See MessageTypeDef
  2. See SessionStateTypeDef
  3. See InterpretationTypeDef
  4. See ResponseMetadataTypeDef