FakePredictionService class base

Testing fake for PredictionService.

Implemented types

Constructors

FakePredictionService({Future<PredictResponse> predict(PredictRequest request)?, Future<HttpBody> rawPredict(RawPredictRequest request)?, Stream<HttpBody> streamRawPredict(StreamRawPredictRequest request)?, Future<DirectPredictResponse> directPredict(DirectPredictRequest request)?, Future<DirectRawPredictResponse> directRawPredict(DirectRawPredictRequest request)?, Stream<StreamingPredictResponse> serverStreamingPredict(StreamingPredictRequest request)?, Future<ExplainResponse> explain(ExplainRequest request)?, Future<CountTokensResponse> countTokens(CountTokensRequest request)?, Future<GenerateContentResponse> generateContent(GenerateContentRequest request)?, Stream<GenerateContentResponse> streamGenerateContent(GenerateContentRequest request)?, Stream<HttpBody> chatCompletions(ChatCompletionsRequest request)?, Future<EmbedContentResponse> embedContent(EmbedContentRequest request)?, Future<ListLocationsResponse> listLocations(ListLocationsRequest request)?, Future<Location> getLocation(GetLocationRequest request)?, Future<Policy> setIamPolicy(SetIamPolicyRequest request)?, Future<Policy> getIamPolicy(GetIamPolicyRequest request)?, Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissionsRequest request)?, Future<ListOperationsResponse> listOperations(ListOperationsRequest request)?, Future<Operation<T, S>> getOperation<T extends ProtoMessage, S extends ProtoMessage>(Operation<T, S> request)?, Future<void> deleteOperation(DeleteOperationRequest request)?, Future<void> cancelOperation(CancelOperationRequest request)?, Future<Operation<ProtoMessage, ProtoMessage>> waitOperation(WaitOperationRequest request)?})

Properties

hashCode int
The hash code for this object.
no setterinherited
isClosed bool
getter/setter pair
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.
override
chatCompletions(ChatCompletionsRequest request) Stream<HttpBody>
Exposes an OpenAI-compatible endpoint for chat completions.
override
close() → void
Closes the client and cleans up any resources associated with it.
override
countTokens(CountTokensRequest request) Future<CountTokensResponse>
Perform a token counting.
override
deleteOperation(DeleteOperationRequest request) Future<void>
Provides the Operations service functionality in this service.
override
directPredict(DirectPredictRequest request) Future<DirectPredictResponse>
Perform an unary online prediction request to a gRPC model server for Vertex first-party products and frameworks.
override
directRawPredict(DirectRawPredictRequest request) Future<DirectRawPredictResponse>
Perform an unary online prediction request to a gRPC model server for custom containers.
override
embedContent(EmbedContentRequest request) Future<EmbedContentResponse>
Embed content with multimodal inputs.
override
explain(ExplainRequest request) Future<ExplainResponse>
Perform an online explanation.
override
generateContent(GenerateContentRequest request) Future<GenerateContentResponse>
Generate content with multimodal inputs.
override
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.
override
getLocation(GetLocationRequest request) Future<Location>
Gets information about a location.
override
getOperation<T extends ProtoMessage, S extends ProtoMessage>(Operation<T, S> request) Future<Operation<T, S>>
Provides the Operations service functionality in this service.
override
listLocations(ListLocationsRequest request) Future<ListLocationsResponse>
Lists information about the supported locations for this service.
override
listOperations(ListOperationsRequest request) Future<ListOperationsResponse>
Provides the Operations service functionality in this service.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
predict(PredictRequest request) Future<PredictResponse>
Perform an online prediction.
override
rawPredict(RawPredictRequest request) Future<HttpBody>
Perform an online prediction with an arbitrary HTTP payload.
override
serverStreamingPredict(StreamingPredictRequest request) Stream<StreamingPredictResponse>
Perform a server-side streaming online prediction request for Vertex LLM streaming.
override
setIamPolicy(SetIamPolicyRequest request) Future<Policy>
Sets the access control policy on the specified resource. Replaces any existing policy.
override
streamGenerateContent(GenerateContentRequest request) Stream<GenerateContentResponse>
Generate content with multimodal inputs with streaming support.
override
streamRawPredict(StreamRawPredictRequest request) Stream<HttpBody>
Perform a streaming online prediction with an arbitrary HTTP payload.
override
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.
override
toString() String
A string representation of this object.
inherited
waitOperation(WaitOperationRequest request) Future<Operation<ProtoMessage, ProtoMessage>>
Provides the Operations service functionality in this service.
override

Operators

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