streamRawPredict method

Stream<HttpBody> streamRawPredict(
  1. StreamRawPredictRequest request
)

Perform a streaming online prediction with an arbitrary HTTP payload.

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

Stream<HttpBody> streamRawPredict(StreamRawPredictRequest request) {
  final url = _endPoint.replace(
    path: '/v1beta1/${request.endpoint}:streamRawPredict',
  );
  return _client
      .postStreaming(url, body: request, enableSse: true)
      .map(HttpBody.fromJson);
}