feat: Add new docling-serve cli (#50)

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
Michele Dolfi
2025-02-19 20:54:13 +01:00
committed by GitHub
parent 663e03303a
commit ec33a61faa
13 changed files with 526 additions and 215 deletions

View File

@@ -1,6 +1,28 @@
from typing import Union
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
class UvicornSettings(BaseSettings):
model_config = SettingsConfigDict(
env_prefix="UVICORN_", env_file=".env", extra="allow"
)
model_config = SettingsConfigDict(env_prefix="DOCLING_")
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()