2024-06-20 16:24:10 +08:00
|
|
|
from typing import Optional
|
|
|
|
|
|
|
|
from pydantic import BaseModel, Field, PositiveInt
|
|
|
|
|
|
|
|
|
2024-06-22 18:26:38 +08:00
|
|
|
class WeaviateConfig(BaseModel):
|
2024-06-20 16:24:10 +08:00
|
|
|
"""
|
|
|
|
Weaviate configs
|
|
|
|
"""
|
|
|
|
|
|
|
|
WEAVIATE_ENDPOINT: Optional[str] = Field(
|
|
|
|
description='Weaviate endpoint URL',
|
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
WEAVIATE_API_KEY: Optional[str] = Field(
|
|
|
|
description='Weaviate API key',
|
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
WEAVIATE_GRPC_ENABLED: bool = Field(
|
|
|
|
description='whether to enable gRPC for Weaviate connection',
|
|
|
|
default=True,
|
|
|
|
)
|
|
|
|
|
|
|
|
WEAVIATE_BATCH_SIZE: PositiveInt = Field(
|
|
|
|
description='Weaviate batch size',
|
|
|
|
default=100,
|
|
|
|
)
|