# This file was auto-generated by Fern from our API Definition.

from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class BedrockEmbedding(UniversalBaseModel):
    model_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The modelId of the Bedrock model to use.
    """

    embed_batch_size: typing.Optional[int] = pydantic.Field(default=None)
    """
    The batch size for embedding calls.
    """

    num_workers: typing.Optional[int] = pydantic.Field(default=None)
    """
    The number of workers to use for async embedding calls.
    """

    profile_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The name of aws profile to use. If not given, then the default profile is used.
    """

    aws_access_key_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    AWS Access Key ID to use
    """

    aws_secret_access_key: typing.Optional[str] = pydantic.Field(default=None)
    """
    AWS Secret Access Key to use
    """

    aws_session_token: typing.Optional[str] = pydantic.Field(default=None)
    """
    AWS Session Token to use
    """

    region_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    AWS region name to use. Uses region configured in AWS CLI if not passed
    """

    max_retries: typing.Optional[int] = pydantic.Field(default=None)
    """
    The maximum number of API retries.
    """

    timeout: typing.Optional[float] = pydantic.Field(default=None)
    """
    The timeout for the Bedrock API request in seconds. It will be used for both connect and read timeouts.
    """

    additional_kwargs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    Additional kwargs for the bedrock client.
    """

    class_name: typing.Optional[str] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
