Contents

googleapis/swift-google-cloud-aiplatform-v1

Train high-quality custom machine learning models with minimal machine

Overview

The following types provide methods to make RPCs. They are a good starting point to learn about this library.

  • DataFoundryServiceClient: Service for generating and preparing datasets for Gen AI evaluation. (enabled by the DataFoundryService trait)
  • DatasetServiceClient: The service that manages Vertex AI Dataset and its child resources. (enabled by the DatasetService trait)
  • DeploymentResourcePoolServiceClient: A service that manages the DeploymentResourcePool resource. (enabled by the DeploymentResourcePoolService trait)
  • EndpointServiceClient: A service for managing Vertex AI's Endpoints. (enabled by the EndpointService trait)
  • EvaluationServiceClient: Vertex AI Online Evaluation Service. (enabled by the EvaluationService trait)
  • FeatureOnlineStoreAdminServiceClient: The service that handles CRUD and List for resources for FeatureOnlineStore. (enabled by the FeatureOnlineStoreAdminService trait)
  • FeatureOnlineStoreServiceClient: A service for fetching feature values from the online store. (enabled by the FeatureOnlineStoreService trait)
  • FeatureRegistryServiceClient: The service that handles CRUD and List for resources for FeatureRegistry. (enabled by the FeatureRegistryService trait)
  • FeaturestoreOnlineServingServiceClient: A service for serving online feature values. (enabled by the FeaturestoreOnlineServingService trait)
  • FeaturestoreServiceClient: The service that handles CRUD and List for resources for Featurestore. (enabled by the FeaturestoreService trait)
  • GenAiCacheServiceClient: Service for managing Vertex AI's CachedContent resource. (enabled by the GenAiCacheService trait)
  • GenAiTuningServiceClient: A service for creating and managing GenAI Tuning Jobs. (enabled by the GenAiTuningService trait)
  • IndexEndpointServiceClient: A service for managing Vertex AI's IndexEndpoints. (enabled by the IndexEndpointService trait)
  • IndexServiceClient: A service for creating and managing Vertex AI's Index resources. (enabled by the IndexService trait)
  • JobServiceClient: A service for creating and managing Vertex AI's jobs. (enabled by the JobService trait)
  • LlmUtilityServiceClient: Service for LLM related utility functions. (enabled by the LlmUtilityService trait)
  • MatchServiceClient: MatchService is a Google managed service for efficient vector similarity search at scale. (enabled by the MatchService trait)
  • MetadataServiceClient: Service for reading and writing metadata entries. (enabled by the MetadataService trait)
  • MigrationServiceClient: A service that migrates resources from automl.googleapis.com, datalabeling.googleapis.com and ml.googleapis.com to Vertex AI. (enabled by the MigrationService trait)
  • ModelGardenServiceClient: The interface of Model Garden Service. (enabled by the ModelGardenService trait)
  • ModelServiceClient: A service for managing Vertex AI's machine learning Models. (enabled by the ModelService trait)
  • NotebookServiceClient: The interface for Vertex Notebook service (a.k.a. (enabled by the NotebookService trait)
  • PersistentResourceServiceClient: A service for managing Vertex AI's machine learning PersistentResource. (enabled by the PersistentResourceService trait)
  • PipelineServiceClient: A service for creating and managing Vertex AI's pipelines. (enabled by the PipelineService trait)
  • PredictionServiceClient: A service for online predictions and explanations. (enabled by the PredictionService trait)
  • ReasoningEngineExecutionServiceClient: A service for executing queries on Reasoning Engine. (enabled by the ReasoningEngineExecutionService trait)
  • ReasoningEngineServiceClient: A service for managing Vertex AI's Reasoning Engines. (enabled by the ReasoningEngineService trait)
  • ScheduleServiceClient: A service for creating and managing Vertex AI's Schedule resources to periodically launch shceudled runs to make API calls. (enabled by the ScheduleService trait)
  • SessionServiceClient: The service that manages Vertex Session related resources. (enabled by the SessionService trait)
  • SpecialistPoolServiceClient: A service for creating and managing Customer SpecialistPools. (enabled by the SpecialistPoolService trait)
  • TensorboardServiceClient: TensorboardService. (enabled by the TensorboardService trait)
  • VertexRagDataServiceClient: A service for managing user data for RAG. (enabled by the VertexRagDataService trait)
  • VertexRagServiceClient: A service for retrieving relevant contexts. (enabled by the VertexRagService trait)
  • VizierServiceClient: Vertex AI Vizier API. (enabled by the VizierService trait)

Quickstart

The following example demonstrates using PredictionServiceClient:

import Foundation
import GoogleCloudAIPlatformV1
import GoogleApi
import GoogleCloudLocation
import GoogleIAMV1
import GoogleLongRunning
import GoogleWKT

func sample() async throws {
  let client = try GoogleCloudAIPlatformV1.PredictionServiceClient()
  let response = try await client.predict(
    request: PredictRequest()
  /* set fields using .with { $0... } */
)
  print("Success: \(response)")
}

Requirements

For the minimum supported Swift version and platform requirements, see the Requirements section in the google-cloud-swift repository.

Installation

Add swift-google-cloud-aiplatform-v1 as a package dependency:

swift package add-dependency https://github.com/googleapis/swift-google-cloud-aiplatform-v1.git --from 0.6.0

Then add GoogleCloudAIPlatformV1 to your target's dependencies:

swift package add-target-dependency GoogleCloudAIPlatformV1 <target-name> --package swift-google-cloud-aiplatform-v1

Package Traits

This package uses Swift package traits to conditionally compile individual service clients and their associated types. Enabling a trait enables the corresponding client and all the request, response, and model types needed to use that client.

The following traits are enabled by default:

  • PredictionService

To enable additional traits alongside the defaults, specify them in Package.swift:

.package(url: "https://github.com/googleapis/swift-google-cloud-aiplatform-v1.git", from: "0.6.0", traits: [".defaults", "<TraitName>"])

| Trait | Default | Enabled Client | |---|:---:|---| | DataFoundryService | No | DataFoundryServiceClient | | DatasetService | No | DatasetServiceClient | | DeploymentResourcePoolService | No | DeploymentResourcePoolServiceClient | | EndpointService | No | EndpointServiceClient | | EvaluationService | No | EvaluationServiceClient | | FeatureOnlineStoreAdminService | No | FeatureOnlineStoreAdminServiceClient | | FeatureOnlineStoreService | No | FeatureOnlineStoreServiceClient | | FeatureRegistryService | No | FeatureRegistryServiceClient | | FeaturestoreOnlineServingService | No | FeaturestoreOnlineServingServiceClient | | FeaturestoreService | No | FeaturestoreServiceClient | | GenAiCacheService | No | GenAiCacheServiceClient | | GenAiTuningService | No | GenAiTuningServiceClient | | IndexEndpointService | No | IndexEndpointServiceClient | | IndexService | No | IndexServiceClient | | JobService | No | JobServiceClient | | LlmUtilityService | No | LlmUtilityServiceClient | | MatchService | No | MatchServiceClient | | MetadataService | No | MetadataServiceClient | | MigrationService | No | MigrationServiceClient | | ModelGardenService | No | ModelGardenServiceClient | | ModelService | No | ModelServiceClient | | NotebookService | No | NotebookServiceClient | | PersistentResourceService | No | PersistentResourceServiceClient | | PipelineService | No | PipelineServiceClient | | PredictionService | Yes | PredictionServiceClient | | ReasoningEngineExecutionService | No | ReasoningEngineExecutionServiceClient | | ReasoningEngineService | No | ReasoningEngineServiceClient | | ScheduleService | No | ScheduleServiceClient | | SessionService | No | SessionServiceClient | | SpecialistPoolService | No | SpecialistPoolServiceClient | | TensorboardService | No | TensorboardServiceClient | | VertexRagDataService | No | VertexRagDataServiceClient | | VertexRagService | No | VertexRagServiceClient | | VizierService | No | VizierServiceClient |

Troubleshooting

For questions, bug reports, or feature requests, please open an issue in the google-cloud-swift repository.

Contributing

Contributions to this library are always welcome and highly encouraged.

All development, issues, and pull requests are managed in the google-cloud-swift monorepo. See CONTRIBUTING.md for details on getting started.

License

Apache 2.0 - See LICENSE for more information.

Package Metadata

Repository: googleapis/swift-google-cloud-aiplatform-v1

Default branch: main

README: README.md