Detalhes do pacote

@google-cloud/aiplatform

googleapis479.6kApache-2.04.3.0

Vertex AI client for Node.js

google apis client, google api client, google apis, google api

readme (leia-me)

Google Cloud Platform logo

Vertex AI: Node.js Client

release level npm version

Vertex AI client for Node.js

A comprehensive list of changes in each version may be found in the CHANGELOG.

Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Client Libraries Explained.

Table of contents:

Quickstart

Before you begin

  1. [Select or create a Cloud Platform project][projects].
  2. [Enable billing for your project][billing].
  3. [Enable the Vertex AI API][enable_api].
  4. [Set up authentication][auth] so you can access the API from your local workstation.

Installing the client library

npm install @google-cloud/aiplatform

Using the client library

/**
 * TODO(developer): Uncomment these variables before running the sample.
 */
// const projectId = 'YOUR_PROJECT_ID';
// const location = 'YOUR_PROJECT_LOCATION';

const {EndpointServiceClient} = require('@google-cloud/aiplatform');

// Specifies the location of the api endpoint
const clientOptions = {
  apiEndpoint: 'us-central1-aiplatform.googleapis.com',
};
const client = new EndpointServiceClient(clientOptions);

async function listEndpoints() {
  // Configure the parent resource
  const parent = `projects/${projectId}/locations/${location}`;
  const request = {
    parent,
  };

  // Get and print out a list of all the endpoints for this resource
  const [result] = await client.listEndpoints(request);
  for (const endpoint of result) {
    console.log(`\nEndpoint name: ${endpoint.name}`);
    console.log(`Display name: ${endpoint.displayName}`);
    if (endpoint.deployedModels[0]) {
      console.log(
        `First deployed model: ${endpoint.deployedModels[0].model}`
      );
    }
  }
}
listEndpoints();

Samples

Samples are in the samples/ directory. Each sample's README.md has instructions for running its sample.

Sample Source Code Try it
Dataset_service.create_dataset source code ![Open in Cloud Shell][shell_img]
Dataset_service.create_dataset_version source code ![Open in Cloud Shell][shell_img]
Dataset_service.delete_dataset source code ![Open in Cloud Shell][shell_img]
Dataset_service.delete_dataset_version source code ![Open in Cloud Shell][shell_img]
Dataset_service.delete_saved_query source code ![Open in Cloud Shell][shell_img]
Dataset_service.export_data source code ![Open in Cloud Shell][shell_img]
Dataset_service.get_annotation_spec source code ![Open in Cloud Shell][shell_img]
Dataset_service.get_dataset source code ![Open in Cloud Shell][shell_img]
Dataset_service.get_dataset_version source code ![Open in Cloud Shell][shell_img]
Dataset_service.import_data source code ![Open in Cloud Shell][shell_img]
Dataset_service.list_annotations source code ![Open in Cloud Shell][shell_img]
Dataset_service.list_data_items source code ![Open in Cloud Shell][shell_img]
Dataset_service.list_dataset_versions source code ![Open in Cloud Shell][shell_img]
Dataset_service.list_datasets source code ![Open in Cloud Shell][shell_img]
Dataset_service.list_saved_queries source code ![Open in Cloud Shell][shell_img]
Dataset_service.restore_dataset_version source code ![Open in Cloud Shell][shell_img]
Dataset_service.search_data_items source code ![Open in Cloud Shell][shell_img]
Dataset_service.update_dataset source code ![Open in Cloud Shell][shell_img]
Dataset_service.update_dataset_version source code ![Open in Cloud Shell][shell_img]
Deployment_resource_pool_service.create_deployment_resource_pool source code ![Open in Cloud Shell][shell_img]
Deployment_resource_pool_service.delete_deployment_resource_pool source code ![Open in Cloud Shell][shell_img]
Deployment_resource_pool_service.get_deployment_resource_pool source code ![Open in Cloud Shell][shell_img]
Deployment_resource_pool_service.list_deployment_resource_pools source code ![Open in Cloud Shell][shell_img]
Deployment_resource_pool_service.query_deployed_models source code ![Open in Cloud Shell][shell_img]
Deployment_resource_pool_service.update_deployment_resource_pool source code ![Open in Cloud Shell][shell_img]
Endpoint_service.create_endpoint source code ![Open in Cloud Shell][shell_img]
Endpoint_service.delete_endpoint source code ![Open in Cloud Shell][shell_img]
Endpoint_service.deploy_model source code ![Open in Cloud Shell][shell_img]
Endpoint_service.get_endpoint source code ![Open in Cloud Shell][shell_img]
Endpoint_service.list_endpoints source code ![Open in Cloud Shell][shell_img]
Endpoint_service.mutate_deployed_model source code ![Open in Cloud Shell][shell_img]
Endpoint_service.undeploy_model source code ![Open in Cloud Shell][shell_img]
Endpoint_service.update_endpoint source code ![Open in Cloud Shell][shell_img]
Endpoint_service.update_endpoint_long_running source code ![Open in Cloud Shell][shell_img]
Evaluation_service.evaluate_instances source code ![Open in Cloud Shell][shell_img]
Feature_online_store_admin_service.create_feature_online_store source code ![Open in Cloud Shell][shell_img]
Feature_online_store_admin_service.create_feature_view source code ![Open in Cloud Shell][shell_img]
Feature_online_store_admin_service.delete_feature_online_store source code ![Open in Cloud Shell][shell_img]
Feature_online_store_admin_service.delete_feature_view source code ![Open in Cloud Shell][shell_img]
Feature_online_store_admin_service.get_feature_online_store source code ![Open in Cloud Shell][shell_img]
Feature_online_store_admin_service.get_feature_view source code ![Open in Cloud Shell][shell_img]
Feature_online_store_admin_service.get_feature_view_sync source code ![Open in Cloud Shell][shell_img]
Feature_online_store_admin_service.list_feature_online_stores source code ![Open in Cloud Shell][shell_img]
Feature_online_store_admin_service.list_feature_view_syncs source code ![Open in Cloud Shell][shell_img]
Feature_online_store_admin_service.list_feature_views source code ![Open in Cloud Shell][shell_img]
Feature_online_store_admin_service.sync_feature_view source code ![Open in Cloud Shell][shell_img]
Feature_online_store_admin_service.update_feature_online_store source code ![Open in Cloud Shell][shell_img]
Feature_online_store_admin_service.update_feature_view source code ![Open in Cloud Shell][shell_img]
Feature_online_store_service.fetch_feature_values source code ![Open in Cloud Shell][shell_img]
Feature_online_store_service.search_nearest_entities source code ![Open in Cloud Shell][shell_img]
Feature_registry_service.batch_create_features source code ![Open in Cloud Shell][shell_img]
Feature_registry_service.create_feature source code ![Open in Cloud Shell][shell_img]
Feature_registry_service.create_feature_group source code ![Open in Cloud Shell][shell_img]
Feature_registry_service.delete_feature source code ![Open in Cloud Shell][shell_img]
Feature_registry_service.delete_feature_group source code ![Open in Cloud Shell][shell_img]
Feature_registry_service.get_feature source code ![Open in Cloud Shell][shell_img]
Feature_registry_service.get_feature_group source code ![Open in Cloud Shell][shell_img]
Feature_registry_service.list_feature_groups source code ![Open in Cloud Shell][shell_img]
Feature_registry_service.list_features source code ![Open in Cloud Shell][shell_img]
Feature_registry_service.update_feature source code ![Open in Cloud Shell][shell_img]
Feature_registry_service.update_feature_group source code ![Open in Cloud Shell][shell_img]
Featurestore_online_serving_service.read_feature_values source code ![Open in Cloud Shell][shell_img]
Featurestore_online_serving_service.streaming_read_feature_values source code ![Open in Cloud Shell][shell_img]
Featurestore_online_serving_service.write_feature_values source code ![Open in Cloud Shell][shell_img]
Featurestore_service.batch_create_features source code ![Open in Cloud Shell][shell_img]
Featurestore_service.batch_read_feature_values source code ![Open in Cloud Shell][shell_img]
Featurestore_service.create_entity_type source code ![Open in Cloud Shell][shell_img]
Featurestore_service.create_feature source code ![Open in Cloud Shell][shell_img]
Featurestore_service.create_featurestore source code ![Open in Cloud Shell][shell_img]
Featurestore_service.delete_entity_type source code ![Open in Cloud Shell][shell_img]
Featurestore_service.delete_feature source code ![Open in Cloud Shell][shell_img]
Featurestore_service.delete_feature_values source code ![Open in Cloud Shell][shell_img]
Featurestore_service.delete_featurestore source code ![Open in Cloud Shell][shell_img]
Featurestore_service.export_feature_values source code ![Open in Cloud Shell][shell_img]
Featurestore_service.get_entity_type source code ![Open in Cloud Shell][shell_img]
Featurestore_service.get_feature source code ![Open in Cloud Shell][shell_img]
Featurestore_service.get_featurestore source code ![Open in Cloud Shell][shell_img]
Featurestore_service.import_feature_values source code ![Open in Cloud Shell][shell_img]
Featurestore_service.list_entity_types source code ![Open in Cloud Shell][shell_img]
Featurestore_service.list_features source code ![Open in Cloud Shell][shell_img]
Featurestore_service.list_featurestores source code ![Open in Cloud Shell][shell_img]
Featurestore_service.search_features source code ![Open in Cloud Shell][shell_img]
Featurestore_service.update_entity_type source code ![Open in Cloud Shell][shell_img]
Featurestore_service.update_feature source code ![Open in Cloud Shell][shell_img]
Featurestore_service.update_featurestore source code ![Open in Cloud Shell][shell_img]
Gen_ai_cache_service.create_cached_content source code ![Open in Cloud Shell][shell_img]
Gen_ai_cache_service.delete_cached_content source code ![Open in Cloud Shell][shell_img]
Gen_ai_cache_service.get_cached_content source code ![Open in Cloud Shell][shell_img]
Gen_ai_cache_service.list_cached_contents source code ![Open in Cloud Shell][shell_img]
Gen_ai_cache_service.update_cached_content source code ![Open in Cloud Shell][shell_img]
Gen_ai_tuning_service.cancel_tuning_job source code ![Open in Cloud Shell][shell_img]
Gen_ai_tuning_service.create_tuning_job source code ![Open in Cloud Shell][shell_img]
Gen_ai_tuning_service.get_tuning_job source code ![Open in Cloud Shell][shell_img]
Gen_ai_tuning_service.list_tuning_jobs source code ![Open in Cloud Shell][shell_img]
Gen_ai_tuning_service.rebase_tuned_model source code ![Open in Cloud Shell][shell_img]
Index_endpoint_service.create_index_endpoint source code ![Open in Cloud Shell][shell_img]
Index_endpoint_service.delete_index_endpoint source code ![Open in Cloud Shell][shell_img]
Index_endpoint_service.deploy_index source code ![Open in Cloud Shell][shell_img]
Index_endpoint_service.get_index_endpoint source code ![Open in Cloud Shell][shell_img]
Index_endpoint_service.list_index_endpoints source code ![Open in Cloud Shell][shell_img]
Index_endpoint_service.mutate_deployed_index source code ![Open in Cloud Shell][shell_img]
Index_endpoint_service.undeploy_index source code ![Open in Cloud Shell][shell_img]
Index_endpoint_service.update_index_endpoint source code ![Open in Cloud Shell][shell_img]
Index_service.create_index source code ![Open in Cloud Shell][shell_img]
Index_service.delete_index source code ![Open in Cloud Shell][shell_img]
Index_service.get_index source code ![Open in Cloud Shell][shell_img]
Index_service.list_indexes source code ![Open in Cloud Shell][shell_img]
Index_service.remove_datapoints source code ![Open in Cloud Shell][shell_img]
Index_service.update_index source code ![Open in Cloud Shell][shell_img]
Index_service.upsert_datapoints source code ![Open in Cloud Shell][shell_img]
Job_service.cancel_batch_prediction_job source code ![Open in Cloud Shell][shell_img]
Job_service.cancel_custom_job source code ![Open in Cloud Shell][shell_img]
Job_service.cancel_data_labeling_job source code ![Open in Cloud Shell][shell_img]
Job_service.cancel_hyperparameter_tuning_job source code ![Open in Cloud Shell][shell_img]
Job_service.cancel_nas_job [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v