PredictionService class final

A service for online predictions and explanations.

Constructors

PredictionService({required Client client})
Creates a PredictionService using client for transport.
PredictionService.fromApiKey([String? apiKey])
Creates a PredictionService that does authentication through an API key.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelOperation(CancelOperationRequest request) Future<void>
Provides the Operations service functionality in this service.
chatCompletions(ChatCompletionsRequest request) Stream<HttpBody>
Exposes an OpenAI-compatible endpoint for chat completions.
close() → void
Closes the client and cleans up any resources associated with it.
countTokens(CountTokensRequest request) Future<CountTokensResponse>
Perform a token counting.
deleteOperation(DeleteOperationRequest request) Future<void>
Provides the Operations service functionality in this service.
directPredict(DirectPredictRequest request) Future<DirectPredictResponse>
Perform an unary online prediction request to a gRPC model server for Vertex first-party products and frameworks.
directRawPredict(DirectRawPredictRequest request) Future<DirectRawPredictResponse>
Perform an unary online prediction request to a gRPC model server for custom containers.
explain(ExplainRequest request) Future<ExplainResponse>
Perform an online explanation.
generateContent(GenerateContentRequest request) Future<GenerateContentResponse>
Generate content with multimodal inputs.
getIamPolicy(GetIamPolicyRequest request) Future<Policy>
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
getLocation(GetLocationRequest request) Future<Location>
Gets information about a location.
getOperation<T extends ProtoMessage, S extends ProtoMessage>(Operation<T, S> request) Future<Operation<T, S>>
Provides the Operations service functionality in this service.
listLocations(ListLocationsRequest request) Future<ListLocationsResponse>
Lists information about the supported locations for this service.
listOperations(ListOperationsRequest request) Future<ListOperationsResponse>
Provides the Operations service functionality in this service.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
predict(PredictRequest request) Future<PredictResponse>
Perform an online prediction.
rawPredict(RawPredictRequest request) Future<HttpBody>
Perform an online prediction with an arbitrary HTTP payload.
serverStreamingPredict(StreamingPredictRequest request) Stream<StreamingPredictResponse>
Perform a server-side streaming online prediction request for Vertex LLM streaming.
setIamPolicy(SetIamPolicyRequest request) Future<Policy>
Sets the access control policy on the specified resource. Replaces any existing policy.
streamGenerateContent(GenerateContentRequest request) Stream<GenerateContentResponse>
Generate content with multimodal inputs with streaming support.
streamRawPredict(StreamRawPredictRequest request) Stream<HttpBody>
Perform a streaming online prediction with an arbitrary HTTP payload.
testIamPermissions(TestIamPermissionsRequest request) Future<TestIamPermissionsResponse>
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
toString() String
A string representation of this object.
inherited
waitOperation(WaitOperationRequest request) Future<Operation<ProtoMessage, ProtoMessage>>
Provides the Operations service functionality in this service.

Operators

operator ==(Object other) bool
The equality operator.
inherited