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

from __future__ import annotations
from neuralseek.types import BaseModel
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class CategorizeRequestBodyTypedDict(TypedDict):
    r"""The request object."""

    question: NotRequired[str]
    r"""The text to categorize"""


class CategorizeRequestBody(BaseModel):
    r"""The request object."""

    question: Optional[str] = ""
    r"""The text to categorize"""


class TopIntentsTypedDict(TypedDict):
    r"""If Vector Similarity is set as the Intent Match type, this will provide the top 3 matches"""

    score: NotRequired[float]
    r"""The score of the intent"""
    intent: NotRequired[str]
    r"""The intent name"""


class TopIntents(BaseModel):
    r"""If Vector Similarity is set as the Intent Match type, this will provide the top 3 matches"""

    score: Optional[float] = None
    r"""The score of the intent"""

    intent: Optional[str] = ""
    r"""The intent name"""


class CategorizeResponseBodyTypedDict(TypedDict):
    r"""Success"""

    intent: NotRequired[str]
    r"""The matched Intent"""
    category: NotRequired[str]
    r"""The matched Category"""
    category_id: NotRequired[int]
    r"""The Category id"""
    top_intents: NotRequired[TopIntentsTypedDict]
    r"""If Vector Similarity is set as the Intent Match type, this will provide the top 3 matches"""


class CategorizeResponseBody(BaseModel):
    r"""Success"""

    intent: Optional[str] = ""
    r"""The matched Intent"""

    category: Optional[str] = ""
    r"""The matched Category"""

    category_id: Annotated[Optional[int], pydantic.Field(alias="categoryId")] = None
    r"""The Category id"""

    top_intents: Annotated[Optional[TopIntents], pydantic.Field(alias="topIntents")] = (
        None
    )
    r"""If Vector Similarity is set as the Intent Match type, this will provide the top 3 matches"""
