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

from __future__ import annotations

import pydantic
from typing_extensions import Annotated, TypedDict

from friendli.types import BaseModel


class KnowledgeRetrievedChunkTypedDict(TypedDict):
    r"""Knowledge retrieved chunk."""

    content_chunk_id: str
    r"""ID of specific text segment."""
    content_id: str
    r"""ID of content in knowledge-base."""
    score: float
    r"""Numerical relevance score of the retrieved result."""
    text: str
    r"""Retrieved text matching the search query."""


class KnowledgeRetrievedChunk(BaseModel):
    r"""Knowledge retrieved chunk."""

    content_chunk_id: Annotated[str, pydantic.Field(alias="contentChunkId")]
    r"""ID of specific text segment."""

    content_id: Annotated[str, pydantic.Field(alias="contentId")]
    r"""ID of content in knowledge-base."""

    score: float
    r"""Numerical relevance score of the retrieved result."""

    text: str
    r"""Retrieved text matching the search query."""
