| | |
| | | "host": "127.0.0.1", |
| | | "port": 8000, |
| | | "debug": False, |
| | | "access_log": False, |
| | | }, |
| | | "api_providers": { |
| | | "common": { |
| | |
| | | except (TypeError, ValueError): |
| | | server["port"] = DEFAULT_CONFIG["server"]["port"] |
| | | server["debug"] = _as_bool(server.get("debug")) |
| | | server["access_log"] = _as_bool(server.get("access_log")) |
| | | server.pop("admin_password", None) |
| | | |
| | | common = clean["api_providers"]["common"] |
| | |
| | | HOST = _get(CONFIG, "server.host") |
| | | PORT = _get(CONFIG, "server.port") |
| | | DEBUG = _get(CONFIG, "server.debug") |
| | | ACCESS_LOG = _get(CONFIG, "server.access_log") |
| | | |
| | | PRINT_MODEL_INPUT = _get(CONFIG, "api_providers.common.print_model_input") |
| | | PROXY = _get(CONFIG, "api_providers.common.proxy") |
| | |
| | | cls.HOST = _get(clean, "server.host") |
| | | cls.PORT = _get(clean, "server.port") |
| | | cls.DEBUG = _get(clean, "server.debug") |
| | | cls.ACCESS_LOG = _get(clean, "server.access_log") |
| | | |
| | | cls.PRINT_MODEL_INPUT = _get(clean, "api_providers.common.print_model_input") |
| | | cls.PROXY = _get(clean, "api_providers.common.proxy") |