Repository: imartinez/privateGPT
File: private_gpt/settings/settings.py (Python)

Code before:
            "Prefix to add to the REST URL path."
            "Example: `service/v1` will result in "
            "'http://localhost:6333/service/v1/{qdrant-endpoint}' for REST API."
        ),
    )
    timeout: float | None = Field(
        None,
        description="Timeout for REST and gRPC API requests.",
    )
    host: str | None = Field(
        None,
        description="Host name of Qdrant service. If url and host are None, set to 'localhost'.",
    )
    path: str | None = Field(None, description="Persistence path for QdrantLocal.")
    force_disable_check_same_thread: bool | None = Field(
        True,
        description=(
            "For QdrantLocal, force disable check_same_thread. Default: `True`"
            "Only use this if you can guarantee that you can resolve the thread safety outside QdrantClient."
        ),
    )


class MilvusSettings(BaseModel):
    uri: str = Field(
        "local_data/private_gpt/milvus_local.db",
        description="The URI of the Milvus instance. For example: 'local_data/private_gpt/milvus_local.db' for Milvus Lite.",
    )
    token: str = Field(
        "",
        description=(
            "A valid access token to access the specified Milvus instance. "
            "This can be used as a recommended alternative to setting user and password separately. "
            "For example: 'root:Milvus', which is the default credential of the root user."
        ),
    )
    collection_name: str = Field(
        "make_this_parameterizable_per_api_call",
        description="The name of the collection in Milvus. Default is 'make_this_parameterizable_per_api_call'.",
    )
    overwrite: bool = Field(
        True, description="Overwrite the previous collection schema if it exists."
    )


class Settings(BaseModel):
    server: ServerSettings
    data: DataSettings
    ui: UISettings
    llm: LLMSettings
    embedding: EmbeddingSettings

Review comment (suggestion):
Probably, I don't explain me well. The idea is having a folder inside `local_data/private_gpt` with each provider. In this case, it would be: `local_data/private_gpt/milvus/milvus_loca.db`

Code after:
            "Prefix to add to the REST URL path."
            "Example: `service/v1` will result in "
            "'http://localhost:6333/service/v1/{qdrant-endpoint}' for REST API."
        ),
    )
    timeout: float | None = Field(
        None,
        description="Timeout for REST and gRPC API requests.",
    )
    host: str | None = Field(
        None,
        description="Host name of Qdrant service. If url and host are None, set to 'localhost'.",
    )
    path: str | None = Field(None, description="Persistence path for QdrantLocal.")
    force_disable_check_same_thread: bool | None = Field(
        True,
        description=(
            "For QdrantLocal, force disable check_same_thread. Default: `True`"
            "Only use this if you can guarantee that you can resolve the thread safety outside QdrantClient."
        ),
    )


class MilvusSettings(BaseModel):
    uri: str = Field(
        "local_data/private_gpt/milvus/milvus_local.db",
        description="The URI of the Milvus instance. For example: 'local_data/private_gpt/milvus/milvus_local.db' for Milvus Lite.",
    )
    token: str = Field(
        "",
        description=(
            "A valid access token to access the specified Milvus instance. "
            "This can be used as a recommended alternative to setting user and password separately. "
        ),
    )
    collection_name: str = Field(
        "make_this_parameterizable_per_api_call",
        description="The name of the collection in Milvus. Default is 'make_this_parameterizable_per_api_call'.",
    )
    overwrite: bool = Field(
        True, description="Overwrite the previous collection schema if it exists."
    )


class Settings(BaseModel):
    server: ServerSettings
    data: DataSettings
    ui: UISettings
    llm: LLMSettings
    embedding: EmbeddingSettings
    llamacpp: LlamaCPPSettings