# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class SourceRetrievalConfig(UncheckedBaseModel):
    name: str
    collection_name: str
    db_name: typing.Optional[str] = None
    enabled: typing.Optional[bool] = None
    k_dense: typing.Optional[int] = None
    k_keyword: typing.Optional[int] = None
    dense_weight: typing.Optional[float] = None
    keyword_weight: typing.Optional[float] = None
    source_weight: typing.Optional[float] = None
    vector_index_name: typing.Optional[str] = None
    embedding_field: typing.Optional[str] = None
    content_field: typing.Optional[str] = None
    filter_field: typing.Optional[str] = None
    num_candidates_multiplier: typing.Optional[int] = None
    result_fields: typing.Optional[typing.Dict[str, typing.List[typing.Any]]] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
