rawPredict method

Future<HttpBody> rawPredict(
  1. RawPredictRequest request
)

Perform an online prediction with an arbitrary HTTP payload.

The response includes the following HTTP headers:

  • X-Vertex-AI-Endpoint-Id: ID of the Endpoint that served this prediction.

  • X-Vertex-AI-Deployed-Model-Id: ID of the Endpoint's DeployedModel that served this prediction.

Throws a http.ClientException if there were problems communicating with the API service. Throws a StatusException if the API failed with a Status message. Throws a ServiceException for any other failure.

Implementation

Future<HttpBody> rawPredict(RawPredictRequest request) async {
  final url = Uri.https(_host, '/v1beta1/${request.endpoint}:rawPredict');
  final response = await _client.post(url, body: request);
  return HttpBody.fromJson(response);
}