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
|
|
|
"""
|
|
|
|
Weaviate configs
|
|
|
|
"""
|
|
|
|
|
|
|
|
WEAVIATE_ENDPOINT: Optional[str] = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="Weaviate endpoint URL",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
WEAVIATE_API_KEY: Optional[str] = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="Weaviate API key",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
WEAVIATE_GRPC_ENABLED: bool = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="whether to enable gRPC for Weaviate connection",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=True,
|
|
|
|
)
|
|
|
|
|
|
|
|
WEAVIATE_BATCH_SIZE: PositiveInt = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="Weaviate batch size",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=100,
|
|
|
|
)
|