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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from .refined_prompt_response_refinement_status import RefinedPromptResponseRefinementStatus
from .prompt_version import PromptVersion
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class RefinedPromptResponse(UniversalBaseModel):
    title: typing.Optional[str] = pydantic.Field(default=None)
    """
    Title of the refined prompt
    """

    reasoning: typing.Optional[str] = pydantic.Field(default=None)
    """
    Reasoning behind the refinement
    """

    prompt: str = pydantic.Field()
    """
    The refined prompt text
    """

    refinement_job_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Unique identifier for the refinement job
    """

    refinement_status: typing.Optional[RefinedPromptResponseRefinementStatus] = pydantic.Field(default=None)
    """
    Status of the refinement job
    """

    total_cost: typing.Optional[str] = pydantic.Field(default=None)
    """
    Total cost of the refinement job (in USD)
    """

    previous_version: typing.Optional[PromptVersion] = pydantic.Field(default=None)
    """
    Previous version of the prompt
    """

    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
