class ProjectsLocationsEndpoints extends Resource (View source)

The "endpoints" collection of methods.

Typical usage is:

 $aiplatformService = new Google\Service\Aiplatform(...);
 $endpoints = $aiplatformService->projects_locations_endpoints;

Methods

computeTokens(string $endpoint, GoogleCloudAiplatformV1ComputeTokensRequest $postBody, array $optParams = [])

Return a list of tokens based on the input text. (endpoints.computeTokens)

countTokens(string $endpoint, GoogleCloudAiplatformV1CountTokensRequest $postBody, array $optParams = [])

Perform a token counting. (endpoints.countTokens)

create(string $parent, GoogleCloudAiplatformV1Endpoint $postBody, array $optParams = [])

Creates an Endpoint. (endpoints.create)

delete(string $name, array $optParams = [])

Deletes an Endpoint. (endpoints.delete)

deployModel(string $endpoint, GoogleCloudAiplatformV1DeployModelRequest $postBody, array $optParams = [])

Deploys a Model into this Endpoint, creating a DeployedModel within it.

directPredict(string $endpoint, GoogleCloudAiplatformV1DirectPredictRequest $postBody, array $optParams = [])

Perform an unary online prediction request to a gRPC model server for Vertex first-party products and frameworks. (endpoints.directPredict)

directRawPredict(string $endpoint, GoogleCloudAiplatformV1DirectRawPredictRequest $postBody, array $optParams = [])

Perform an unary online prediction request to a gRPC model server for custom containers. (endpoints.directRawPredict)

explain(string $endpoint, GoogleCloudAiplatformV1ExplainRequest $postBody, array $optParams = [])

Perform an online explanation. If deployed_model_id is specified, the corresponding DeployModel must have explanation_spec populated. If deployed_model_id is not specified, all DeployedModels must have explanation_spec populated. (endpoints.explain)

generateContent(string $model, GoogleCloudAiplatformV1GenerateContentRequest $postBody, array $optParams = [])

Generate content with multimodal inputs. (endpoints.generateContent)

get(string $name, array $optParams = [])

Gets an Endpoint. (endpoints.get)

listProjectsLocationsEndpoints(string $parent, array $optParams = [])

Lists Endpoints in a Location. (endpoints.listProjectsLocationsEndpoints)

mutateDeployedModel(string $endpoint, GoogleCloudAiplatformV1MutateDeployedModelRequest $postBody, array $optParams = [])

Updates an existing deployed model. Updatable fields include min_replica_count, max_replica_count, autoscaling_metric_specs, disable_container_logging (v1 only), and enable_container_logging (v1beta1 only). (endpoints.mutateDeployedModel)

patch(string $name, GoogleCloudAiplatformV1Endpoint $postBody, array $optParams = [])

Updates an Endpoint. (endpoints.patch)

predict(string $endpoint, GoogleCloudAiplatformV1PredictRequest $postBody, array $optParams = [])

Perform an online prediction. (endpoints.predict)

rawPredict(string $endpoint, GoogleCloudAiplatformV1RawPredictRequest $postBody, array $optParams = [])

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 that served this prediction. X-Vertex-AI-Deployed-Model-Id: ID of the Endpoint's DeployedModel that served this prediction.

serverStreamingPredict(string $endpoint, GoogleCloudAiplatformV1StreamingPredictRequest $postBody, array $optParams = [])

Perform a server-side streaming online prediction request for Vertex LLM streaming. (endpoints.serverStreamingPredict)

streamGenerateContent(string $model, GoogleCloudAiplatformV1GenerateContentRequest $postBody, array $optParams = [])

Generate content with multimodal inputs with streaming support.

streamRawPredict(string $endpoint, GoogleCloudAiplatformV1StreamRawPredictRequest $postBody, array $optParams = [])

Perform a streaming online prediction with an arbitrary HTTP payload.

undeployModel(string $endpoint, GoogleCloudAiplatformV1UndeployModelRequest $postBody, array $optParams = [])

Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using. (endpoints.undeployModel)

Details

GoogleCloudAiplatformV1ComputeTokensResponse computeTokens(string $endpoint, GoogleCloudAiplatformV1ComputeTokensRequest $postBody, array $optParams = [])

Return a list of tokens based on the input text. (endpoints.computeTokens)

Parameters

string $endpoint

Required. The name of the Endpoint requested to get lists of tokens and token ids.

GoogleCloudAiplatformV1ComputeTokensRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1ComputeTokensResponse

Exceptions

Exception

GoogleCloudAiplatformV1CountTokensResponse countTokens(string $endpoint, GoogleCloudAiplatformV1CountTokensRequest $postBody, array $optParams = [])

Perform a token counting. (endpoints.countTokens)

Parameters

string $endpoint

Required. The name of the Endpoint requested to perform token counting. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

GoogleCloudAiplatformV1CountTokensRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1CountTokensResponse

Exceptions

Exception

GoogleLongrunningOperation create(string $parent, GoogleCloudAiplatformV1Endpoint $postBody, array $optParams = [])

Creates an Endpoint. (endpoints.create)

Parameters

string $parent

Required. The resource name of the Location to create the Endpoint in. Format: projects/{project}/locations/{location}

GoogleCloudAiplatformV1Endpoint $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation delete(string $name, array $optParams = [])

Deletes an Endpoint. (endpoints.delete)

Parameters

string $name

Required. The name of the Endpoint resource to be deleted. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation deployModel(string $endpoint, GoogleCloudAiplatformV1DeployModelRequest $postBody, array $optParams = [])

Deploys a Model into this Endpoint, creating a DeployedModel within it.

(endpoints.deployModel)

Parameters

string $endpoint

Required. The name of the Endpoint resource into which to deploy a Model. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

GoogleCloudAiplatformV1DeployModelRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudAiplatformV1DirectPredictResponse directPredict(string $endpoint, GoogleCloudAiplatformV1DirectPredictRequest $postBody, array $optParams = [])

Perform an unary online prediction request to a gRPC model server for Vertex first-party products and frameworks. (endpoints.directPredict)

Parameters

string $endpoint

Required. The name of the Endpoint requested to serve the prediction. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

GoogleCloudAiplatformV1DirectPredictRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1DirectPredictResponse

Exceptions

Exception

GoogleCloudAiplatformV1DirectRawPredictResponse directRawPredict(string $endpoint, GoogleCloudAiplatformV1DirectRawPredictRequest $postBody, array $optParams = [])

Perform an unary online prediction request to a gRPC model server for custom containers. (endpoints.directRawPredict)

Parameters

string $endpoint

Required. The name of the Endpoint requested to serve the prediction. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

GoogleCloudAiplatformV1DirectRawPredictRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1DirectRawPredictResponse

Exceptions

Exception

GoogleCloudAiplatformV1ExplainResponse explain(string $endpoint, GoogleCloudAiplatformV1ExplainRequest $postBody, array $optParams = [])

Perform an online explanation. If deployed_model_id is specified, the corresponding DeployModel must have explanation_spec populated. If deployed_model_id is not specified, all DeployedModels must have explanation_spec populated. (endpoints.explain)

Parameters

string $endpoint

Required. The name of the Endpoint requested to serve the explanation. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

GoogleCloudAiplatformV1ExplainRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1ExplainResponse

Exceptions

Exception

GoogleCloudAiplatformV1GenerateContentResponse generateContent(string $model, GoogleCloudAiplatformV1GenerateContentRequest $postBody, array $optParams = [])

Generate content with multimodal inputs. (endpoints.generateContent)

Parameters

string $model

Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/models

GoogleCloudAiplatformV1GenerateContentRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1GenerateContentResponse

Exceptions

Exception

GoogleCloudAiplatformV1Endpoint get(string $name, array $optParams = [])

Gets an Endpoint. (endpoints.get)

Parameters

string $name

Required. The name of the Endpoint resource. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1Endpoint

Exceptions

Exception

GoogleCloudAiplatformV1ListEndpointsResponse listProjectsLocationsEndpoints(string $parent, array $optParams = [])

Lists Endpoints in a Location. (endpoints.listProjectsLocationsEndpoints)

Parameters

string $parent

Required. The resource name of the Location from which to list the Endpoints. Format: projects/{project}/locations/{location}

array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1ListEndpointsResponse

Exceptions

Exception

GoogleLongrunningOperation mutateDeployedModel(string $endpoint, GoogleCloudAiplatformV1MutateDeployedModelRequest $postBody, array $optParams = [])

Updates an existing deployed model. Updatable fields include min_replica_count, max_replica_count, autoscaling_metric_specs, disable_container_logging (v1 only), and enable_container_logging (v1beta1 only). (endpoints.mutateDeployedModel)

Parameters

string $endpoint

Required. The name of the Endpoint resource into which to mutate a DeployedModel. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

GoogleCloudAiplatformV1MutateDeployedModelRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudAiplatformV1Endpoint patch(string $name, GoogleCloudAiplatformV1Endpoint $postBody, array $optParams = [])

Updates an Endpoint. (endpoints.patch)

Parameters

string $name

Output only. The resource name of the Endpoint.

GoogleCloudAiplatformV1Endpoint $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1Endpoint

Exceptions

Exception

GoogleCloudAiplatformV1PredictResponse predict(string $endpoint, GoogleCloudAiplatformV1PredictRequest $postBody, array $optParams = [])

Perform an online prediction. (endpoints.predict)

Parameters

string $endpoint

Required. The name of the Endpoint requested to serve the prediction. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

GoogleCloudAiplatformV1PredictRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1PredictResponse

Exceptions

Exception

GoogleApiHttpBody rawPredict(string $endpoint, GoogleCloudAiplatformV1RawPredictRequest $postBody, array $optParams = [])

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 that served this prediction. X-Vertex-AI-Deployed-Model-Id: ID of the Endpoint's DeployedModel that served this prediction.

(endpoints.rawPredict)

Parameters

string $endpoint

Required. The name of the Endpoint requested to serve the prediction. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

GoogleCloudAiplatformV1RawPredictRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleApiHttpBody

Exceptions

Exception

GoogleCloudAiplatformV1StreamingPredictResponse serverStreamingPredict(string $endpoint, GoogleCloudAiplatformV1StreamingPredictRequest $postBody, array $optParams = [])

Perform a server-side streaming online prediction request for Vertex LLM streaming. (endpoints.serverStreamingPredict)

Parameters

string $endpoint

Required. The name of the Endpoint requested to serve the prediction. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

GoogleCloudAiplatformV1StreamingPredictRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1StreamingPredictResponse

Exceptions

Exception

GoogleCloudAiplatformV1GenerateContentResponse streamGenerateContent(string $model, GoogleCloudAiplatformV1GenerateContentRequest $postBody, array $optParams = [])

Generate content with multimodal inputs with streaming support.

(endpoints.streamGenerateContent)

Parameters

string $model

Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/models

GoogleCloudAiplatformV1GenerateContentRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAiplatformV1GenerateContentResponse

Exceptions

Exception

GoogleApiHttpBody streamRawPredict(string $endpoint, GoogleCloudAiplatformV1StreamRawPredictRequest $postBody, array $optParams = [])

Perform a streaming online prediction with an arbitrary HTTP payload.

(endpoints.streamRawPredict)

Parameters

string $endpoint

Required. The name of the Endpoint requested to serve the prediction. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

GoogleCloudAiplatformV1StreamRawPredictRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleApiHttpBody

Exceptions

Exception

GoogleLongrunningOperation undeployModel(string $endpoint, GoogleCloudAiplatformV1UndeployModelRequest $postBody, array $optParams = [])

Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using. (endpoints.undeployModel)

Parameters

string $endpoint

Required. The name of the Endpoint resource from which to undeploy a Model. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

GoogleCloudAiplatformV1UndeployModelRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception