"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from typing import TYPE_CHECKING
from importlib import import_module

if TYPE_CHECKING:
    from .assistantmessage import (
        AssistantMessage,
        AssistantMessageContent,
        AssistantMessageContentTypedDict,
        AssistantMessageRole,
        AssistantMessageTypedDict,
    )
    from .chatcompletionchoice import (
        ChatCompletionChoice,
        ChatCompletionChoiceFinishReason,
        ChatCompletionChoiceTypedDict,
    )
    from .chatcompletionrequest import (
        ChatCompletionRequest,
        ChatCompletionRequestMessages,
        ChatCompletionRequestMessagesTypedDict,
        ChatCompletionRequestStop,
        ChatCompletionRequestStopTypedDict,
        ChatCompletionRequestToolChoice,
        ChatCompletionRequestToolChoiceTypedDict,
        ChatCompletionRequestTypedDict,
    )
    from .chatcompletionresponse import (
        ChatCompletionResponse,
        ChatCompletionResponseTypedDict,
    )
    from .chatcompletionstreamrequest import (
        ChatCompletionStreamRequest,
        ChatCompletionStreamRequestToolChoice,
        ChatCompletionStreamRequestToolChoiceTypedDict,
        ChatCompletionStreamRequestTypedDict,
        Messages,
        MessagesTypedDict,
        Stop,
        StopTypedDict,
    )
    from .completionchunk import CompletionChunk, CompletionChunkTypedDict
    from .completionevent import CompletionEvent, CompletionEventTypedDict
    from .completionresponsestreamchoice import (
        CompletionResponseStreamChoice,
        CompletionResponseStreamChoiceTypedDict,
        FinishReason,
    )
    from .contentchunk import ContentChunk, ContentChunkTypedDict
    from .deltamessage import (
        Content,
        ContentTypedDict,
        DeltaMessage,
        DeltaMessageTypedDict,
    )
    from .documenturlchunk import (
        DocumentURLChunk,
        DocumentURLChunkType,
        DocumentURLChunkTypedDict,
    )
    from .filechunk import FileChunk, FileChunkTypedDict
    from .function import Function, FunctionTypedDict
    from .functioncall import (
        Arguments,
        ArgumentsTypedDict,
        FunctionCall,
        FunctionCallTypedDict,
    )
    from .functionname import FunctionName, FunctionNameTypedDict
    from .httpvalidationerror import HTTPValidationError, HTTPValidationErrorData
    from .imageurl import ImageURL, ImageURLTypedDict
    from .imageurlchunk import (
        ImageURLChunk,
        ImageURLChunkImageURL,
        ImageURLChunkImageURLTypedDict,
        ImageURLChunkType,
        ImageURLChunkTypedDict,
    )
    from .jsonschema import JSONSchema, JSONSchemaTypedDict
    from .mistralpromptmode import MistralPromptMode
    from .ocrimageobject import OCRImageObject, OCRImageObjectTypedDict
    from .ocrpagedimensions import OCRPageDimensions, OCRPageDimensionsTypedDict
    from .ocrpageobject import OCRPageObject, OCRPageObjectTypedDict
    from .ocrrequest import Document, DocumentTypedDict, OCRRequest, OCRRequestTypedDict
    from .ocrresponse import OCRResponse, OCRResponseTypedDict
    from .ocrusageinfo import OCRUsageInfo, OCRUsageInfoTypedDict
    from .prediction import Prediction, PredictionTypedDict
    from .referencechunk import (
        ReferenceChunk,
        ReferenceChunkType,
        ReferenceChunkTypedDict,
    )
    from .responseformat import ResponseFormat, ResponseFormatTypedDict
    from .responseformats import ResponseFormats
    from .sdkerror import SDKError
    from .security import Security, SecurityTypedDict
    from .systemmessage import (
        Role,
        SystemMessage,
        SystemMessageContent,
        SystemMessageContentTypedDict,
        SystemMessageTypedDict,
    )
    from .textchunk import TextChunk, TextChunkTypedDict, Type
    from .tool import Tool, ToolTypedDict
    from .toolcall import ToolCall, ToolCallTypedDict
    from .toolchoice import ToolChoice, ToolChoiceTypedDict
    from .toolchoiceenum import ToolChoiceEnum
    from .toolmessage import (
        ToolMessage,
        ToolMessageContent,
        ToolMessageContentTypedDict,
        ToolMessageRole,
        ToolMessageTypedDict,
    )
    from .tooltypes import ToolTypes
    from .usageinfo import UsageInfo, UsageInfoTypedDict
    from .usermessage import (
        UserMessage,
        UserMessageContent,
        UserMessageContentTypedDict,
        UserMessageRole,
        UserMessageTypedDict,
    )
    from .validationerror import (
        Loc,
        LocTypedDict,
        ValidationError,
        ValidationErrorTypedDict,
    )

__all__ = [
    "Arguments",
    "ArgumentsTypedDict",
    "AssistantMessage",
    "AssistantMessageContent",
    "AssistantMessageContentTypedDict",
    "AssistantMessageRole",
    "AssistantMessageTypedDict",
    "ChatCompletionChoice",
    "ChatCompletionChoiceFinishReason",
    "ChatCompletionChoiceTypedDict",
    "ChatCompletionRequest",
    "ChatCompletionRequestMessages",
    "ChatCompletionRequestMessagesTypedDict",
    "ChatCompletionRequestStop",
    "ChatCompletionRequestStopTypedDict",
    "ChatCompletionRequestToolChoice",
    "ChatCompletionRequestToolChoiceTypedDict",
    "ChatCompletionRequestTypedDict",
    "ChatCompletionResponse",
    "ChatCompletionResponseTypedDict",
    "ChatCompletionStreamRequest",
    "ChatCompletionStreamRequestToolChoice",
    "ChatCompletionStreamRequestToolChoiceTypedDict",
    "ChatCompletionStreamRequestTypedDict",
    "CompletionChunk",
    "CompletionChunkTypedDict",
    "CompletionEvent",
    "CompletionEventTypedDict",
    "CompletionResponseStreamChoice",
    "CompletionResponseStreamChoiceTypedDict",
    "Content",
    "ContentChunk",
    "ContentChunkTypedDict",
    "ContentTypedDict",
    "DeltaMessage",
    "DeltaMessageTypedDict",
    "Document",
    "DocumentTypedDict",
    "DocumentURLChunk",
    "DocumentURLChunkType",
    "DocumentURLChunkTypedDict",
    "FileChunk",
    "FileChunkTypedDict",
    "FinishReason",
    "Function",
    "FunctionCall",
    "FunctionCallTypedDict",
    "FunctionName",
    "FunctionNameTypedDict",
    "FunctionTypedDict",
    "HTTPValidationError",
    "HTTPValidationErrorData",
    "ImageURL",
    "ImageURLChunk",
    "ImageURLChunkImageURL",
    "ImageURLChunkImageURLTypedDict",
    "ImageURLChunkType",
    "ImageURLChunkTypedDict",
    "ImageURLTypedDict",
    "JSONSchema",
    "JSONSchemaTypedDict",
    "Loc",
    "LocTypedDict",
    "Messages",
    "MessagesTypedDict",
    "MistralPromptMode",
    "OCRImageObject",
    "OCRImageObjectTypedDict",
    "OCRPageDimensions",
    "OCRPageDimensionsTypedDict",
    "OCRPageObject",
    "OCRPageObjectTypedDict",
    "OCRRequest",
    "OCRRequestTypedDict",
    "OCRResponse",
    "OCRResponseTypedDict",
    "OCRUsageInfo",
    "OCRUsageInfoTypedDict",
    "Prediction",
    "PredictionTypedDict",
    "ReferenceChunk",
    "ReferenceChunkType",
    "ReferenceChunkTypedDict",
    "ResponseFormat",
    "ResponseFormatTypedDict",
    "ResponseFormats",
    "Role",
    "SDKError",
    "Security",
    "SecurityTypedDict",
    "Stop",
    "StopTypedDict",
    "SystemMessage",
    "SystemMessageContent",
    "SystemMessageContentTypedDict",
    "SystemMessageTypedDict",
    "TextChunk",
    "TextChunkTypedDict",
    "Tool",
    "ToolCall",
    "ToolCallTypedDict",
    "ToolChoice",
    "ToolChoiceEnum",
    "ToolChoiceTypedDict",
    "ToolMessage",
    "ToolMessageContent",
    "ToolMessageContentTypedDict",
    "ToolMessageRole",
    "ToolMessageTypedDict",
    "ToolTypedDict",
    "ToolTypes",
    "Type",
    "UsageInfo",
    "UsageInfoTypedDict",
    "UserMessage",
    "UserMessageContent",
    "UserMessageContentTypedDict",
    "UserMessageRole",
    "UserMessageTypedDict",
    "ValidationError",
    "ValidationErrorTypedDict",
]

_dynamic_imports: dict[str, str] = {
    "AssistantMessage": ".assistantmessage",
    "AssistantMessageContent": ".assistantmessage",
    "AssistantMessageContentTypedDict": ".assistantmessage",
    "AssistantMessageRole": ".assistantmessage",
    "AssistantMessageTypedDict": ".assistantmessage",
    "ChatCompletionChoice": ".chatcompletionchoice",
    "ChatCompletionChoiceFinishReason": ".chatcompletionchoice",
    "ChatCompletionChoiceTypedDict": ".chatcompletionchoice",
    "ChatCompletionRequest": ".chatcompletionrequest",
    "ChatCompletionRequestMessages": ".chatcompletionrequest",
    "ChatCompletionRequestMessagesTypedDict": ".chatcompletionrequest",
    "ChatCompletionRequestStop": ".chatcompletionrequest",
    "ChatCompletionRequestStopTypedDict": ".chatcompletionrequest",
    "ChatCompletionRequestToolChoice": ".chatcompletionrequest",
    "ChatCompletionRequestToolChoiceTypedDict": ".chatcompletionrequest",
    "ChatCompletionRequestTypedDict": ".chatcompletionrequest",
    "ChatCompletionResponse": ".chatcompletionresponse",
    "ChatCompletionResponseTypedDict": ".chatcompletionresponse",
    "ChatCompletionStreamRequest": ".chatcompletionstreamrequest",
    "ChatCompletionStreamRequestToolChoice": ".chatcompletionstreamrequest",
    "ChatCompletionStreamRequestToolChoiceTypedDict": ".chatcompletionstreamrequest",
    "ChatCompletionStreamRequestTypedDict": ".chatcompletionstreamrequest",
    "Messages": ".chatcompletionstreamrequest",
    "MessagesTypedDict": ".chatcompletionstreamrequest",
    "Stop": ".chatcompletionstreamrequest",
    "StopTypedDict": ".chatcompletionstreamrequest",
    "CompletionChunk": ".completionchunk",
    "CompletionChunkTypedDict": ".completionchunk",
    "CompletionEvent": ".completionevent",
    "CompletionEventTypedDict": ".completionevent",
    "CompletionResponseStreamChoice": ".completionresponsestreamchoice",
    "CompletionResponseStreamChoiceTypedDict": ".completionresponsestreamchoice",
    "FinishReason": ".completionresponsestreamchoice",
    "ContentChunk": ".contentchunk",
    "ContentChunkTypedDict": ".contentchunk",
    "Content": ".deltamessage",
    "ContentTypedDict": ".deltamessage",
    "DeltaMessage": ".deltamessage",
    "DeltaMessageTypedDict": ".deltamessage",
    "DocumentURLChunk": ".documenturlchunk",
    "DocumentURLChunkType": ".documenturlchunk",
    "DocumentURLChunkTypedDict": ".documenturlchunk",
    "FileChunk": ".filechunk",
    "FileChunkTypedDict": ".filechunk",
    "Function": ".function",
    "FunctionTypedDict": ".function",
    "Arguments": ".functioncall",
    "ArgumentsTypedDict": ".functioncall",
    "FunctionCall": ".functioncall",
    "FunctionCallTypedDict": ".functioncall",
    "FunctionName": ".functionname",
    "FunctionNameTypedDict": ".functionname",
    "HTTPValidationError": ".httpvalidationerror",
    "HTTPValidationErrorData": ".httpvalidationerror",
    "ImageURL": ".imageurl",
    "ImageURLTypedDict": ".imageurl",
    "ImageURLChunk": ".imageurlchunk",
    "ImageURLChunkImageURL": ".imageurlchunk",
    "ImageURLChunkImageURLTypedDict": ".imageurlchunk",
    "ImageURLChunkType": ".imageurlchunk",
    "ImageURLChunkTypedDict": ".imageurlchunk",
    "JSONSchema": ".jsonschema",
    "JSONSchemaTypedDict": ".jsonschema",
    "MistralPromptMode": ".mistralpromptmode",
    "OCRImageObject": ".ocrimageobject",
    "OCRImageObjectTypedDict": ".ocrimageobject",
    "OCRPageDimensions": ".ocrpagedimensions",
    "OCRPageDimensionsTypedDict": ".ocrpagedimensions",
    "OCRPageObject": ".ocrpageobject",
    "OCRPageObjectTypedDict": ".ocrpageobject",
    "Document": ".ocrrequest",
    "DocumentTypedDict": ".ocrrequest",
    "OCRRequest": ".ocrrequest",
    "OCRRequestTypedDict": ".ocrrequest",
    "OCRResponse": ".ocrresponse",
    "OCRResponseTypedDict": ".ocrresponse",
    "OCRUsageInfo": ".ocrusageinfo",
    "OCRUsageInfoTypedDict": ".ocrusageinfo",
    "Prediction": ".prediction",
    "PredictionTypedDict": ".prediction",
    "ReferenceChunk": ".referencechunk",
    "ReferenceChunkType": ".referencechunk",
    "ReferenceChunkTypedDict": ".referencechunk",
    "ResponseFormat": ".responseformat",
    "ResponseFormatTypedDict": ".responseformat",
    "ResponseFormats": ".responseformats",
    "SDKError": ".sdkerror",
    "Security": ".security",
    "SecurityTypedDict": ".security",
    "Role": ".systemmessage",
    "SystemMessage": ".systemmessage",
    "SystemMessageContent": ".systemmessage",
    "SystemMessageContentTypedDict": ".systemmessage",
    "SystemMessageTypedDict": ".systemmessage",
    "TextChunk": ".textchunk",
    "TextChunkTypedDict": ".textchunk",
    "Type": ".textchunk",
    "Tool": ".tool",
    "ToolTypedDict": ".tool",
    "ToolCall": ".toolcall",
    "ToolCallTypedDict": ".toolcall",
    "ToolChoice": ".toolchoice",
    "ToolChoiceTypedDict": ".toolchoice",
    "ToolChoiceEnum": ".toolchoiceenum",
    "ToolMessage": ".toolmessage",
    "ToolMessageContent": ".toolmessage",
    "ToolMessageContentTypedDict": ".toolmessage",
    "ToolMessageRole": ".toolmessage",
    "ToolMessageTypedDict": ".toolmessage",
    "ToolTypes": ".tooltypes",
    "UsageInfo": ".usageinfo",
    "UsageInfoTypedDict": ".usageinfo",
    "UserMessage": ".usermessage",
    "UserMessageContent": ".usermessage",
    "UserMessageContentTypedDict": ".usermessage",
    "UserMessageRole": ".usermessage",
    "UserMessageTypedDict": ".usermessage",
    "Loc": ".validationerror",
    "LocTypedDict": ".validationerror",
    "ValidationError": ".validationerror",
    "ValidationErrorTypedDict": ".validationerror",
}


def __getattr__(attr_name: str) -> object:
    module_name = _dynamic_imports.get(attr_name)
    if module_name is None:
        raise AttributeError(
            f"No {attr_name} found in _dynamic_imports for module name -> {__name__} "
        )

    try:
        module = import_module(module_name, __package__)
        result = getattr(module, attr_name)
        return result
    except ImportError as e:
        raise ImportError(
            f"Failed to import {attr_name} from {module_name}: {e}"
        ) from e
    except AttributeError as e:
        raise AttributeError(
            f"Failed to get {attr_name} from {module_name}: {e}"
        ) from e


def __dir__():
    lazy_attrs = list(_dynamic_imports.keys())
    return sorted(lazy_attrs)
