private ResponseStream<GenerateContentResponse> generateContentStream(
      GenerateContentRequest request) throws IOException {
    return new ResponseStream(
        new ResponseStreamIteratorWithHistory(
            vertexAi
                .getPredictionServiceClient()
                .streamGenerateContentCallable()
                .call(request)
                .iterator()));
  }
A base generateContentStream method that will be used internally.

@param request a {@link com.google.cloud.vertexai.api.GenerateContentRequest} instance
@return a {@link ResponseStream} that contains a streaming of {@link
    com.google.cloud.vertexai.api.GenerateContentResponse}
@throws IOException if an I/O error occurs while making the API call
java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerativeModel.java