Spaces:
Configuration error
Configuration error
Download openhands/server/types.py from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/openhands/server/types.py
- Command line
-
hf download hf://spaces/flyingdarkdev/README/openhands/server/types.py
-
curl -L -o types.py https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/openhands/server/types.py
1.01 kB
| from abc import ABC, abstractmethod | |
| from enum import Enum | |
| from typing import ClassVar, Protocol | |
| class AppMode(Enum): | |
| OSS = 'oss' | |
| SAAS = 'saas' | |
| class SessionMiddlewareInterface(Protocol): | |
| """Protocol for session middleware classes.""" | |
| pass | |
| class ServerConfigInterface(ABC): | |
| CONFIG_PATH: ClassVar[str | None] | |
| APP_MODE: ClassVar[AppMode] | |
| POSTHOG_CLIENT_KEY: ClassVar[str] | |
| GITHUB_CLIENT_ID: ClassVar[str] | |
| ATTACH_SESSION_MIDDLEWARE_PATH: ClassVar[str] | |
| def verify_config(self) -> None: | |
| """Verify configuration settings.""" | |
| raise NotImplementedError | |
| async def get_config(self) -> dict[str, str]: | |
| """Configure attributes for frontend""" | |
| raise NotImplementedError | |
| class MissingSettingsError(ValueError): | |
| """Raised when settings are missing or not found.""" | |
| pass | |
| class LLMAuthenticationError(ValueError): | |
| """Raised when there is an issue with LLM authentication.""" | |
| pass | |