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

from ...core.pydantic_utilities import UniversalBaseModel
import typing_extensions
from ...commons.types.entity_id import EntityId
from ...core.serialization import FieldMetadata
import typing
import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class BotActionResponse(UniversalBaseModel):
    """
    A response from an action that was provided to the LLM. Should not be shown to users.
    """

    action_id: typing_extensions.Annotated[EntityId, FieldMetadata(alias="actionId")]
    action_parameters: typing_extensions.Annotated[
        typing.Dict[str, typing.Optional[typing.Any]], FieldMetadata(alias="actionParameters")
    ]
    action_response: typing_extensions.Annotated[str, FieldMetadata(alias="actionResponse")]
    auto_action: typing_extensions.Annotated[bool, FieldMetadata(alias="autoAction")] = pydantic.Field()
    """
    True if the bot automatically took this action. False if the user manually submitted the actionForm.
    """

    action_error: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="actionError")] = 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
