diff --git a/vertexai/genai/client.go b/vertexai/genai/client.go index b1023516d45..49aa8f2fd9a 100644 --- a/vertexai/genai/client.go +++ b/vertexai/genai/client.go @@ -25,6 +25,7 @@ import ( aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" pb "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb" + "cloud.google.com/go/vertexai/internal" "cloud.google.com/go/vertexai/internal/support" "google.golang.org/api/iterator" "google.golang.org/api/option" @@ -50,6 +51,7 @@ func NewClient(ctx context.Context, projectID, location string, opts ...option.C if err != nil { return nil, err } + c.SetGoogleClientInfo("gccl", internal.Version) return &Client{ c: c, projectID: projectID, diff --git a/vertexai/internal/version.go b/vertexai/internal/version.go new file mode 100644 index 00000000000..9ba5f5e2428 --- /dev/null +++ b/vertexai/internal/version.go @@ -0,0 +1,18 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +// Version is the current tagged release of the library. +const Version = "0.4.0"