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

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


class RetrievalStrategyTypedDict(TypedDict):
    r"""Configuration for document retrieval"""

    k: int
    r"""Number of documents to retrieve"""
    alpha: NotRequired[float]
    r"""Between 0 and 1, configures balance between keyword and semantic retrieval"""
    rerank: NotRequired[bool]
    r"""Whether to rerank the results after retrieval"""


class RetrievalStrategy(BaseModel):
    r"""Configuration for document retrieval"""

    k: int
    r"""Number of documents to retrieve"""

    alpha: Optional[float] = None
    r"""Between 0 and 1, configures balance between keyword and semantic retrieval"""

    rerank: Optional[bool] = None
    r"""Whether to rerank the results after retrieval"""
