mirror of
http://100.103.83.12:3003/fegger/odoo-at-payroll.git
synced 2026-09-17 16:56:42 +00:00
feat(agent): harden API-first service
This commit is contained in:
@@ -89,9 +89,11 @@ class Config:
|
||||
|
||||
# Service
|
||||
port: int = 8080
|
||||
api_key: str = "" # leer = nur fuer lokale Entwicklung ohne Auth
|
||||
admin_api_key: str = "" # leer = api_key auch fuer /reindex verwenden
|
||||
|
||||
@classmethod
|
||||
def from_env(cls) -> "Config":
|
||||
def from_env(cls) -> Config:
|
||||
d = cls()
|
||||
return cls(
|
||||
kb_dir=_env_str("PV_KB_DIR", d.kb_dir),
|
||||
@@ -122,4 +124,6 @@ class Config:
|
||||
survey_blocks=_env_int("PV_SURVEY_BLOCKS", d.survey_blocks),
|
||||
temporal_boost=_env_float("PV_TEMPORAL_BOOST", d.temporal_boost),
|
||||
port=_env_int("PV_PORT", d.port),
|
||||
api_key=_env_str("PV_API_KEY", d.api_key),
|
||||
admin_api_key=_env_str("PV_ADMIN_API_KEY", d.admin_api_key),
|
||||
)
|
||||
Reference in New Issue
Block a user