Function: toJSON()
@providerprotocol/ai / proxy / toJSON
Function: toJSON()
Section titled “Function: toJSON()”toJSON(
turn):Response
Defined in: src/providers/proxy/server/webapi.ts:210
Create a JSON Response from a Turn.
Parameters
Section titled “Parameters”The completed inference turn
Returns
Section titled “Returns”Response
HTTP Response with JSON body
Example
Section titled “Example”const turn = await instance.generate(messages);return toJSON(turn);