Repository navigation
v0.11.0
Added
- Request Hook - Configurable callback for debugging/logging LLM requests
- New
REQUEST_HOOKconfig option:Callable[[str, dict], None] | None - Called with
(backend_name, payload)before each request to Ollama or LM Studio - Enables request logging, debugging, and monitoring without monkey-patching
- New
Example usage
def log_request(backend: str, payload: dict):
print(f"[{backend}] {json.dumps(payload)}")
config.REQUEST_HOOK = log_request