refactor: extract vdb configs into pydantic-setting based dify configs (#5426)
This commit is contained in:
parent
142dc0afd7
commit
65d34ebb96
12 changed files with 377 additions and 84 deletions
34
api/configs/middleware/vdb/relyt_configs.py
Normal file
34
api/configs/middleware/vdb/relyt_configs.py
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, Field, PositiveInt
|
||||
|
||||
|
||||
class RelytConfigs(BaseModel):
|
||||
"""
|
||||
Relyt configs
|
||||
"""
|
||||
|
||||
RELYT_HOST: Optional[str] = Field(
|
||||
description='Relyt host',
|
||||
default=None,
|
||||
)
|
||||
|
||||
RELYT_PORT: PositiveInt = Field(
|
||||
description='Relyt port',
|
||||
default=9200,
|
||||
)
|
||||
|
||||
RELYT_USER: Optional[str] = Field(
|
||||
description='Relyt user',
|
||||
default=None,
|
||||
)
|
||||
|
||||
RELYT_PASSWORD: Optional[str] = Field(
|
||||
description='Relyt password',
|
||||
default=None,
|
||||
)
|
||||
|
||||
RELYT_DATABASE: Optional[str] = Field(
|
||||
description='Relyt database',
|
||||
default='default',
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue