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

import typing

import pydantic
from ....core.pydantic_utilities import IS_PYDANTIC_V2
from ....core.unchecked_base_model import UncheckedBaseModel
from .agent_v1settings_agent_think_one_item_context_length import AgentV1SettingsAgentThinkOneItemContextLength
from .agent_v1settings_agent_think_one_item_endpoint import AgentV1SettingsAgentThinkOneItemEndpoint
from .agent_v1settings_agent_think_one_item_functions_item import AgentV1SettingsAgentThinkOneItemFunctionsItem
from .agent_v1settings_agent_think_one_item_provider import AgentV1SettingsAgentThinkOneItemProvider


class AgentV1SettingsAgentThinkOneItem(UncheckedBaseModel):
    provider: AgentV1SettingsAgentThinkOneItemProvider
    endpoint: typing.Optional[AgentV1SettingsAgentThinkOneItemEndpoint] = pydantic.Field(default=None)
    """
    Optional for non-Deepgram LLM providers. When present, must include url field and headers object
    """

    functions: typing.Optional[typing.List[AgentV1SettingsAgentThinkOneItemFunctionsItem]] = None
    prompt: typing.Optional[str] = None
    context_length: typing.Optional[AgentV1SettingsAgentThinkOneItemContextLength] = pydantic.Field(default=None)
    """
    Specifies the number of characters retained in context between user messages, agent responses, and function calls. This setting is only configurable when a custom think endpoint is used
    """

    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
