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

from __future__ import annotations

from typing import List

import pydantic
from typing_extensions import Annotated, TypedDict

from friendli.types import BaseModel


class ServerlessKnowledgeRetrievalBodyTypedDict(TypedDict):
    r"""Knowledge retrieval request."""

    k: int
    r"""Maximum number of top-ranked knowledge-base entries to return in results."""
    knowledge_ids: List[str]
    r"""A List of knowledge-base IDs. For now, only one knowledge-base is supported."""
    query: str
    r"""A text string used to find relevant information within the knowledge-base."""


class ServerlessKnowledgeRetrievalBody(BaseModel):
    r"""Knowledge retrieval request."""

    k: int
    r"""Maximum number of top-ranked knowledge-base entries to return in results."""

    knowledge_ids: Annotated[List[str], pydantic.Field(alias="knowledgeIds")]
    r"""A List of knowledge-base IDs. For now, only one knowledge-base is supported."""

    query: str
    r"""A text string used to find relevant information within the knowledge-base."""
