Download harness/adapters/__init__.py from Daniel01410/microtensor_ctx_compress: direct link, hf CLI and curl.
- Browser
- Download file 673 Bytes
-
https://huggingface.co/Daniel01410/microtensor_ctx_compress/resolve/main/harness/adapters/__init__.py
- Command line
-
hf download hf://Daniel01410/microtensor_ctx_compress/harness/adapters/__init__.py
-
curl -L -o __init__.py https://huggingface.co/Daniel01410/microtensor_ctx_compress/resolve/main/harness/adapters/__init__.py
673 Bytes
| from __future__ import annotations | |
| from harness.adapters.base import Adapter, Verdict | |
| from harness.adapters.context_compression import CompressionAdapter | |
| from harness.adapters.generic import GenericAdapter | |
| from harness.adapters.sql_generation import SqlAdapter | |
| ADAPTERS: dict[str, Adapter] = { | |
| GenericAdapter.name: GenericAdapter(), | |
| SqlAdapter.name: SqlAdapter(), | |
| CompressionAdapter.name: CompressionAdapter(), | |
| } | |
| def load(name: str) -> Adapter: | |
| try: | |
| return ADAPTERS[name] | |
| except KeyError as exc: | |
| raise ValueError(f"unknown adapter {name!r}; one of {sorted(ADAPTERS)}") from exc | |
| __all__ = ["ADAPTERS", "Adapter", "Verdict", "load"] | |