"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from datetime import datetime
from gram_ai.types import BaseModel
from typing import List, Literal, Optional
from typing_extensions import NotRequired, TypedDict


Engine = Literal["mustache"]
r"""The template engine"""

Kind = Literal["prompt", "higher_order_tool"]
r"""The kind of prompt the template is used for"""


class PromptTemplateTypedDict(TypedDict):
    created_at: datetime
    r"""The creation date of the prompt template."""
    engine: Engine
    r"""The template engine"""
    history_id: str
    r"""The revision tree ID for the prompt template"""
    id: str
    r"""The ID of the prompt template"""
    kind: Kind
    r"""The kind of prompt the template is used for"""
    name: str
    r"""A short url-friendly label that uniquely identifies a resource."""
    prompt: str
    r"""The template content"""
    tools_hint: List[str]
    r"""The suggested tool names associated with the prompt template"""
    updated_at: datetime
    r"""The last update date of the prompt template."""
    arguments: NotRequired[str]
    r"""The JSON Schema defining the placeholders found in the prompt template"""
    description: NotRequired[str]
    r"""The description of the prompt template"""
    predecessor_id: NotRequired[str]
    r"""The previous version of the prompt template to use as predecessor"""


class PromptTemplate(BaseModel):
    created_at: datetime
    r"""The creation date of the prompt template."""

    engine: Engine
    r"""The template engine"""

    history_id: str
    r"""The revision tree ID for the prompt template"""

    id: str
    r"""The ID of the prompt template"""

    kind: Kind
    r"""The kind of prompt the template is used for"""

    name: str
    r"""A short url-friendly label that uniquely identifies a resource."""

    prompt: str
    r"""The template content"""

    tools_hint: List[str]
    r"""The suggested tool names associated with the prompt template"""

    updated_at: datetime
    r"""The last update date of the prompt template."""

    arguments: Optional[str] = None
    r"""The JSON Schema defining the placeholders found in the prompt template"""

    description: Optional[str] = None
    r"""The description of the prompt template"""

    predecessor_id: Optional[str] = None
    r"""The previous version of the prompt template to use as predecessor"""
