raw_post
raw_post
An async context manager that yields the underlying response for one JSON-RPC call before the SDK
parses its body. ChatGateway uses it when relaying a response body.
Prefer the typed methods unless you are genuinely relaying bytes.
Parameters
method
The JSON-RPC method name.
params
The method’s parameters. The client wraps them in the envelope and supplies the request id.
Returns
aiohttp.ClientResponse, yielded by the context manager with its body unread.
You own interpreting the result. Check the HTTP status first; on 200, inspect the JSON-RPC body
for an error member and compare its code with AI chat errors. You can iterate
resp.content for chunk-level access, but the public endpoint may already have buffered the
response it received from the AI chat service.