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

from __future__ import annotations

from typing import Annotated, List

import pydantic
from typing_extensions import TypedDict

from friendli.core.types import BaseModel


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

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


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

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