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 theDataFoundryServicetrait)DatasetServiceClient: The service that manages Vertex AI Dataset and its child resources. (enabled by theDatasetServicetrait)DeploymentResourcePoolServiceClient: A service that manages the DeploymentResourcePool resource. (enabled by theDeploymentResourcePoolServicetrait)EndpointServiceClient: A service for managing Vertex AI's Endpoints. (enabled by theEndpointServicetrait)EvaluationServiceClient: Vertex AI Online Evaluation Service. (enabled by theEvaluationServicetrait)FeatureOnlineStoreAdminServiceClient: The service that handles CRUD and List for resources for FeatureOnlineStore. (enabled by theFeatureOnlineStoreAdminServicetrait)FeatureOnlineStoreServiceClient: A service for fetching feature values from the online store. (enabled by theFeatureOnlineStoreServicetrait)FeatureRegistryServiceClient: The service that handles CRUD and List for resources for FeatureRegistry. (enabled by theFeatureRegistryServicetrait)FeaturestoreOnlineServingServiceClient: A service for serving online feature values. (enabled by theFeaturestoreOnlineServingServicetrait)FeaturestoreServiceClient: The service that handles CRUD and List for resources for Featurestore. (enabled by theFeaturestoreServicetrait)GenAiCacheServiceClient: Service for managing Vertex AI's CachedContent resource. (enabled by theGenAiCacheServicetrait)GenAiTuningServiceClient: A service for creating and managing GenAI Tuning Jobs. (enabled by theGenAiTuningServicetrait)IndexEndpointServiceClient: A service for managing Vertex AI's IndexEndpoints. (enabled by theIndexEndpointServicetrait)IndexServiceClient: A service for creating and managing Vertex AI's Index resources. (enabled by theIndexServicetrait)JobServiceClient: A service for creating and managing Vertex AI's jobs. (enabled by theJobServicetrait)LlmUtilityServiceClient: Service for LLM related utility functions. (enabled by theLlmUtilityServicetrait)MatchServiceClient: MatchService is a Google managed service for efficient vector similarity search at scale. (enabled by theMatchServicetrait)MetadataServiceClient: Service for reading and writing metadata entries. (enabled by theMetadataServicetrait)MigrationServiceClient: A service that migrates resources from automl.googleapis.com, datalabeling.googleapis.com and ml.googleapis.com to Vertex AI. (enabled by theMigrationServicetrait)ModelGardenServiceClient: The interface of Model Garden Service. (enabled by theModelGardenServicetrait)ModelServiceClient: A service for managing Vertex AI's machine learning Models. (enabled by theModelServicetrait)NotebookServiceClient: The interface for Vertex Notebook service (a.k.a. (enabled by theNotebookServicetrait)PersistentResourceServiceClient: A service for managing Vertex AI's machine learning PersistentResource. (enabled by thePersistentResourceServicetrait)PipelineServiceClient: A service for creating and managing Vertex AI's pipelines. (enabled by thePipelineServicetrait)PredictionServiceClient: A service for online predictions and explanations. (enabled by thePredictionServicetrait)ReasoningEngineExecutionServiceClient: A service for executing queries on Reasoning Engine. (enabled by theReasoningEngineExecutionServicetrait)ReasoningEngineServiceClient: A service for managing Vertex AI's Reasoning Engines. (enabled by theReasoningEngineServicetrait)ScheduleServiceClient: A service for creating and managing Vertex AI's Schedule resources to periodically launch shceudled runs to make API calls. (enabled by theScheduleServicetrait)SessionServiceClient: The service that manages Vertex Session related resources. (enabled by theSessionServicetrait)SpecialistPoolServiceClient: A service for creating and managing Customer SpecialistPools. (enabled by theSpecialistPoolServicetrait)TensorboardServiceClient: TensorboardService. (enabled by theTensorboardServicetrait)VertexRagDataServiceClient: A service for managing user data for RAG. (enabled by theVertexRagDataServicetrait)VertexRagServiceClient: A service for retrieving relevant contexts. (enabled by theVertexRagServicetrait)VizierServiceClient: Vertex AI Vizier API. (enabled by theVizierServicetrait)
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.0Then add GoogleCloudAIPlatformV1 to your target's dependencies:
swift package add-target-dependency GoogleCloudAIPlatformV1 <target-name> --package swift-google-cloud-aiplatform-v1Package 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