2024-12-10 02:51:20 +08:00
|
|
|
from pydantic import Field, PositiveInt
|
|
|
|
from pydantic_settings import BaseSettings
|
2024-07-11 15:21:59 +08:00
|
|
|
|
|
|
|
|
2024-12-10 02:51:20 +08:00
|
|
|
class MyScaleConfig(BaseSettings):
|
2024-07-11 15:21:59 +08:00
|
|
|
"""
|
2024-09-22 12:38:41 +07:00
|
|
|
Configuration settings for MyScale vector database
|
2024-07-11 15:21:59 +08:00
|
|
|
"""
|
|
|
|
|
2024-07-19 10:57:45 +08:00
|
|
|
MYSCALE_HOST: str = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Hostname or IP address of the MyScale server (e.g., 'localhost' or 'myscale.example.com')",
|
2024-08-23 23:46:01 +08:00
|
|
|
default="localhost",
|
2024-07-11 15:21:59 +08:00
|
|
|
)
|
|
|
|
|
2024-07-19 10:57:45 +08:00
|
|
|
MYSCALE_PORT: PositiveInt = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Port number on which the MyScale server is listening (default is 8123)",
|
2024-07-11 15:21:59 +08:00
|
|
|
default=8123,
|
|
|
|
)
|
|
|
|
|
2024-07-19 10:57:45 +08:00
|
|
|
MYSCALE_USER: str = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Username for authenticating with MyScale (default is 'default')",
|
2024-08-23 23:46:01 +08:00
|
|
|
default="default",
|
2024-07-11 15:21:59 +08:00
|
|
|
)
|
|
|
|
|
2024-07-19 10:57:45 +08:00
|
|
|
MYSCALE_PASSWORD: str = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Password for authenticating with MyScale (default is an empty string)",
|
2024-08-23 23:46:01 +08:00
|
|
|
default="",
|
2024-07-11 15:21:59 +08:00
|
|
|
)
|
|
|
|
|
2024-07-19 10:57:45 +08:00
|
|
|
MYSCALE_DATABASE: str = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Name of the MyScale database to connect to (default is 'default')",
|
2024-08-23 23:46:01 +08:00
|
|
|
default="default",
|
2024-07-11 15:21:59 +08:00
|
|
|
)
|
|
|
|
|
2024-07-19 10:57:45 +08:00
|
|
|
MYSCALE_FTS_PARAMS: str = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Additional parameters for MyScale Full Text Search index)",
|
2024-08-23 23:46:01 +08:00
|
|
|
default="",
|
2024-07-11 15:21:59 +08:00
|
|
|
)
|