Class PredictionServiceGrpc.PredictionServiceStub
- java.lang.Object
-
- io.grpc.stub.AbstractStub<S>
-
- io.grpc.stub.AbstractAsyncStub<PredictionServiceGrpc.PredictionServiceStub>
-
- com.google.cloud.aiplatform.v1beta1.PredictionServiceGrpc.PredictionServiceStub
-
- Enclosing class:
- PredictionServiceGrpc
public static final class PredictionServiceGrpc.PredictionServiceStub extends io.grpc.stub.AbstractAsyncStub<PredictionServiceGrpc.PredictionServiceStub>
A stub to allow clients to do asynchronous rpc calls to service PredictionService.A service for online predictions and explanations.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PredictionServiceGrpc.PredictionServiceStub
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
void
countTokens(CountTokensRequest request, io.grpc.stub.StreamObserver<CountTokensResponse> responseObserver)
Perform a token counting.void
explain(ExplainRequest request, io.grpc.stub.StreamObserver<ExplainResponse> responseObserver)
Perform an online explanation.void
predict(PredictRequest request, io.grpc.stub.StreamObserver<PredictResponse> responseObserver)
Perform an online prediction.void
rawPredict(RawPredictRequest request, io.grpc.stub.StreamObserver<com.google.api.HttpBody> responseObserver)
Perform an online prediction with an arbitrary HTTP payload.void
serverStreamingPredict(StreamingPredictRequest request, io.grpc.stub.StreamObserver<StreamingPredictResponse> responseObserver)
Perform a server-side streaming online prediction request for Vertex LLM streaming.
-
-
-
Method Detail
-
build
protected PredictionServiceGrpc.PredictionServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
- Specified by:
build
in classio.grpc.stub.AbstractStub<PredictionServiceGrpc.PredictionServiceStub>
-
predict
public void predict(PredictRequest request, io.grpc.stub.StreamObserver<PredictResponse> responseObserver)
Perform an online prediction.
-
rawPredict
public void rawPredict(RawPredictRequest request, io.grpc.stub.StreamObserver<com.google.api.HttpBody> responseObserver)
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][google.cloud.aiplatform.v1beta1.Endpoint] that served this prediction. * `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's [DeployedModel][google.cloud.aiplatform.v1beta1.DeployedModel] that served this prediction.
-
serverStreamingPredict
public void serverStreamingPredict(StreamingPredictRequest request, io.grpc.stub.StreamObserver<StreamingPredictResponse> responseObserver)
Perform a server-side streaming online prediction request for Vertex LLM streaming.
-
explain
public void explain(ExplainRequest request, io.grpc.stub.StreamObserver<ExplainResponse> responseObserver)
Perform an online explanation. If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is specified, the corresponding DeployModel must have [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated. If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is not specified, all DeployedModels must have [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated.
-
countTokens
public void countTokens(CountTokensRequest request, io.grpc.stub.StreamObserver<CountTokensResponse> responseObserver)
Perform a token counting.
-
-