mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
31 lines
910 B
Python
31 lines
910 B
Python
from typing import Optional
|
|
|
|
from pydantic import Field, PositiveInt
|
|
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class WeaviateConfig(BaseSettings):
|
|
"""
|
|
Configuration settings for Weaviate vector database
|
|
"""
|
|
|
|
WEAVIATE_ENDPOINT: Optional[str] = Field(
|
|
description="URL of the Weaviate server (e.g., 'http://localhost:8080' or 'https://weaviate.example.com')",
|
|
default=None,
|
|
)
|
|
|
|
WEAVIATE_API_KEY: Optional[str] = Field(
|
|
description="API key for authenticating with the Weaviate server",
|
|
default=None,
|
|
)
|
|
|
|
WEAVIATE_GRPC_ENABLED: bool = Field(
|
|
description="Whether to enable gRPC for Weaviate connection (True for gRPC, False for HTTP)",
|
|
default=True,
|
|
)
|
|
|
|
WEAVIATE_BATCH_SIZE: PositiveInt = Field(
|
|
description="Number of objects to be processed in a single batch operation (default is 100)",
|
|
default=100,
|
|
)
|