Skip to content

Settings

Settings

Bases: BaseSettings

Which backend to build, and the model that overrides the config's own.

Source code in system_one/settings.py
class Settings(BaseSettings):
    """Which backend to build, and the model that overrides the config's own."""

    model_config = ENV

    backend: Literal["http", "onnx"] = "http"
    model: str | None = None

backend class-attribute instance-attribute

backend: Literal['http', 'onnx'] = 'http'

model class-attribute instance-attribute

model: str | None = None

HTTPConfig

Bases: BaseSettings

Any endpoint speaking the System One contract.

Source code in system_one/settings.py
class HTTPConfig(BaseSettings):
    """Any endpoint speaking the System One contract."""

    model_config = ENV

    base_url: str
    path: str = "/v1/systemone"
    model: str
    api_key: SecretStr | None = None
    timeout: float = 10.0
    max_retries: int = 2

base_url instance-attribute

base_url: str

path class-attribute instance-attribute

path: str = '/v1/systemone'

model instance-attribute

model: str

api_key class-attribute instance-attribute

api_key: SecretStr | None = None

timeout class-attribute instance-attribute

timeout: float = 10.0

max_retries class-attribute instance-attribute

max_retries: int = 2

TypesafeConfig

Bases: HTTPConfig

Typesafe's hosted jev, preset. Needs SYSTEM_ONE_API_KEY.

Source code in system_one/settings.py
class TypesafeConfig(HTTPConfig):
    """Typesafe's hosted jev, preset. Needs `SYSTEM_ONE_API_KEY`."""

    base_url: str = "https://api.typesafe.ai"
    model: str = "jev-latest"
    api_key: SecretStr

base_url class-attribute instance-attribute

base_url: str = 'https://api.typesafe.ai'

model class-attribute instance-attribute

model: str = 'jev-latest'

api_key instance-attribute

api_key: SecretStr

OpenRouterConfig

Bases: HTTPConfig

OpenRouter's decisions endpoint, preset. Needs SYSTEM_ONE_API_KEY.

Source code in system_one/settings.py
class OpenRouterConfig(HTTPConfig):
    """OpenRouter's decisions endpoint, preset. Needs `SYSTEM_ONE_API_KEY`."""

    base_url: str = "https://openrouter.ai"
    path: str = "/api/alpha/decisions"
    model: str = "typesafe/jev-latest"
    api_key: SecretStr

base_url class-attribute instance-attribute

base_url: str = 'https://openrouter.ai'

path class-attribute instance-attribute

path: str = '/api/alpha/decisions'

model class-attribute instance-attribute

model: str = 'typesafe/jev-latest'

api_key instance-attribute

api_key: SecretStr

ONNXConfig

Bases: BaseSettings

Where the local graph lives, and which one to load.

Source code in system_one/settings.py
class ONNXConfig(BaseSettings):
    """Where the local graph lives, and which one to load."""

    model_config = ENV

    onnx_dir: Path = Path("onnx")
    model: str = DEFAULT_NAME

onnx_dir class-attribute instance-attribute

onnx_dir: Path = Path('onnx')

model class-attribute instance-attribute

model: str = DEFAULT_NAME