feat: allow artifacts_path to be defined as ENV (#940)
* allow the artifacts_path to be defined as ENV Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * add check if artifacts_path exists and is dir Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> --------- Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Annotated, Tuple
|
||||
from typing import Annotated, Optional, Tuple
|
||||
|
||||
from pydantic import BaseModel, PlainValidator
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
@@ -62,6 +62,7 @@ class AppSettings(BaseSettings):
|
||||
debug: DebugSettings
|
||||
|
||||
cache_dir: Path = Path.home() / ".cache" / "docling"
|
||||
artifacts_path: Optional[Path] = None
|
||||
|
||||
|
||||
settings = AppSettings(perf=BatchConcurrencySettings(), debug=DebugSettings())
|
||||
|
||||
Reference in New Issue
Block a user