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

from __future__ import annotations
from friendli.types import BaseModel
from typing import List, Optional
from typing_extensions import NotRequired, TypedDict


class ResultsTypedDict(TypedDict):
    text: NotRequired[str]
    r"""Retrieved text matching the search query."""
    score: NotRequired[float]
    r"""Numerical relevance score of the retrieved result."""
    content_chunk_id: NotRequired[str]
    r"""ID of specific text segment."""
    content_id: NotRequired[str]
    r"""ID of content in knowledge-base."""


class Results(BaseModel):
    text: Optional[str] = None
    r"""Retrieved text matching the search query."""

    score: Optional[float] = None
    r"""Numerical relevance score of the retrieved result."""

    content_chunk_id: Optional[str] = None
    r"""ID of specific text segment."""

    content_id: Optional[str] = None
    r"""ID of content in knowledge-base."""


class KnowledgeRetrieveResultTypedDict(TypedDict):
    r"""Successfully retrieved contexts from vector store."""

    results: NotRequired[List[ResultsTypedDict]]
    r"""A list of result."""


class KnowledgeRetrieveResult(BaseModel):
    r"""Successfully retrieved contexts from vector store."""

    results: Optional[List[Results]] = None
    r"""A list of result."""
