MCPcopy Create free account
hub / github.com/ResearAI/DeepScientist / _write_response_log

Function _write_response_log

scripts/codex_sglang_responses_proxy.py:437–443  ·  view source on GitHub ↗
(path: Path | None, *, request_id: str, payload: str)

Source from the content-addressed store, hash-verified

435
436
437def _write_response_log(path: Path | None, *, request_id: str, payload: str) -> None:
438 if path is None:
439 return
440 path.parent.mkdir(parents=True, exist_ok=True)
441 with path.open("a", encoding="utf-8") as handle:
442 handle.write(json.dumps({"request_id": request_id, "sse": payload}, ensure_ascii=False))
443 handle.write("\n")
444
445
446class ShimHandler(BaseHTTPRequestHandler):

Callers 1

do_POSTMethod · 0.85

Calls 2

openMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected