rawPredict method
Perform an online prediction with an arbitrary HTTP payload.
The response includes the following HTTP headers:
-
X-Vertex-AI-Endpoint-Id: ID of theEndpointthat served this prediction. -
X-Vertex-AI-Deployed-Model-Id: ID of the Endpoint'sDeployedModelthat served this prediction.
Throws a http.ClientException if there were problems communicating with
the API service. Throws a ServiceException if the API method failed for
any reason.
Implementation
@override
Future<HttpBody> rawPredict(RawPredictRequest request) async {
if (isClosed) throw StateError('Service is closed');
if (_rawPredict case final rawPredict?) {
return rawPredict(request);
}
throw UnsupportedError('rawPredict');
}