MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / require_request

Function require_request

tests/supertonic/supertonic_python_warm_bench.py:43–49  ·  view source on GitHub ↗
(payload: Any)

Source from the content-addressed store, hash-verified

41
42
43def require_request(payload: Any) -> dict[str, Any]:
44 if not isinstance(payload, dict):
45 raise RuntimeError("Supertonic request JSON entries must be objects")
46 text = payload.get("text", "")
47 if not isinstance(text, str) or not text:
48 raise RuntimeError("Supertonic request requires non-empty text")
49 return dict(payload)
50
51
52def load_requests(args: argparse.Namespace) -> list[dict[str, Any]]:

Callers 3

load_requestsFunction · 0.85
load_warmup_requestFunction · 0.85
mainFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected