caelum0x 4847e35451 OpenJev: open-source typed decision service
Typed decision/classification service with an in-process gte-small ONNX
embedding engine and lexical fallback, JS/Python SDKs, adapters, and the
otsone model family. Apache-2.0 (sub-packages keep their MIT licenses).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 00:12:36 +03:00

13 lines
445 B
Python

"""HTTP responses matching the transport used by the installed provider SDK."""
from typing import Any
import httpx
import httpx2
def json_response(request: httpx.Request | httpx2.Request, payload: Any, *, status: int = 200) -> httpx.Response | httpx2.Response:
if isinstance(request, httpx2.Request):
return httpx2.Response(status, request=request, json=payload)
return httpx.Response(status, request=request, json=payload)