Files
docling-serve/docling_serve/settings.py
Michele Dolfi ec33a61faa feat: Add new docling-serve cli (#50)
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
2025-02-19 20:54:13 +01:00

29 lines
673 B
Python

from typing import Union
from pydantic_settings import BaseSettings, SettingsConfigDict
class UvicornSettings(BaseSettings):
model_config = SettingsConfigDict(
env_prefix="UVICORN_", env_file=".env", extra="allow"
)
host: str = "0.0.0.0"
port: int = 5001
reload: bool = False
root_path: str = ""
proxy_headers: bool = True
workers: Union[int, None] = None
class DoclingServeSettings(BaseSettings):
model_config = SettingsConfigDict(
env_prefix="DOCLING_SERVE_", env_file=".env", extra="allow"
)
enable_ui: bool = False
uvicorn_settings = UvicornSettings()
docling_serve_settings = DoclingServeSettings()