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

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


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


class ServerlessKnowledgeRetrieveBody(BaseModel):
    query: Optional[str] = None
    r"""A text string used to find relevant information within the knowledge-base."""

    k: Optional[int] = None
    r"""Maximum number of top-ranked knowledge-base entries to return in results."""

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