2024-06-20 16:24:10 +08:00
|
|
|
from typing import Optional
|
|
|
|
|
2024-07-07 12:18:15 +08:00
|
|
|
from pydantic import Field, PositiveInt
|
|
|
|
from pydantic_settings import BaseSettings
|
2024-06-20 16:24:10 +08:00
|
|
|
|
|
|
|
|
2024-07-07 12:18:15 +08:00
|
|
|
class WeaviateConfig(BaseSettings):
|
2024-06-20 16:24:10 +08:00
|
|
|
"""
|
2024-09-22 13:38:41 +08:00
|
|
|
Configuration settings for Weaviate vector database
|
2024-06-20 16:24:10 +08:00
|
|
|
"""
|
|
|
|
|
|
|
|
WEAVIATE_ENDPOINT: Optional[str] = Field(
|
2024-09-22 13:38:41 +08:00
|
|
|
description="URL of the Weaviate server (e.g., 'http://localhost:8080' or 'https://weaviate.example.com')",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
WEAVIATE_API_KEY: Optional[str] = Field(
|
2024-09-22 13:38:41 +08:00
|
|
|
description="API key for authenticating with the Weaviate server",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
WEAVIATE_GRPC_ENABLED: bool = Field(
|
2024-09-22 13:38:41 +08:00
|
|
|
description="Whether to enable gRPC for Weaviate connection (True for gRPC, False for HTTP)",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=True,
|
|
|
|
)
|
|
|
|
|
|
|
|
WEAVIATE_BATCH_SIZE: PositiveInt = Field(
|
2024-09-22 13:38:41 +08:00
|
|
|
description="Number of objects to be processed in a single batch operation (default is 100)",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=100,
|
|
|
|
)
|