encode

fun encode(model: String, request: DecisionRequest): ByteArray

Writes the request body for one decision request.

Return

the JSON body as UTF-8 bytes

Parameters

model

the model to ask

request

the input and the questions to ask about it


Writes the request body for one decision request with no model in it, for a host that names the model outside the System One request.

Return

the JSON body as UTF-8 bytes

Parameters

request

the input and the questions to ask about it