mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-24 00:09:02 +00:00
Args: Switch to use model_field for everything
Pydantic provides these helpers. Better to use these instead of the inspect lib. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -4,7 +4,7 @@ from typing import List, Optional, Union
|
||||
from common.utils import unwrap
|
||||
|
||||
|
||||
class ConfigConfig(BaseModel):
|
||||
class ConfigOverrideConfig(BaseModel):
|
||||
config: Optional[str] = Field(
|
||||
None, description=("Path to an overriding config.yml file")
|
||||
)
|
||||
@@ -279,7 +279,9 @@ class EmbeddingsConfig(BaseModel):
|
||||
|
||||
|
||||
class TabbyConfigModel(BaseModel):
|
||||
config: ConfigConfig = Field(default_factory=ConfigConfig.model_construct)
|
||||
config: ConfigOverrideConfig = Field(
|
||||
default_factory=ConfigOverrideConfig.model_construct
|
||||
)
|
||||
network: NetworkConfig = Field(default_factory=NetworkConfig.model_construct)
|
||||
logging: LoggingConfig = Field(default_factory=LoggingConfig.model_construct)
|
||||
model: ModelConfig = Field(default_factory=ModelConfig.model_construct)
|
||||
|
||||
Reference in New Issue
Block a user