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

import typing

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


class TableGenerationSpec(UniversalBaseModel):
    """
    Specification for which generation to use during table summarization. If not specified, the platform uses the default summarizer. All parameters are optional and overrides the default values.
    """

    llm_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The name of the LLM to use.
    """

    prompt_template: typing.Optional[str] = pydantic.Field(default=None)
    """
    The prompt template to use when generating the table summary. 
    Vectara manages both system and user roles and prompts for the generative
    LLM out of the box by default. However, users can override the
    `prompt_template` via this variable. The `prompt_template` is in the form of an
    Apache Velocity template. For more details on how to configure the
    `prompt_template`, see the [long-form documentation](https://docs.vectara.com/docs/prompts/vectara-prompt-engine).
    """

    model_parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    Optional parameters for the specified model used when generating the table summary.
    """

    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
