Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(vertexai/genai): update to latest proto version #9454

Merged
merged 2 commits into from Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 12 additions & 8 deletions vertexai/genai/aiplatformpb_veneer.gen.go
Expand Up @@ -379,12 +379,14 @@ type FunctionDeclaration struct {
// Schema defining the type used for the parameter. For function with no
// parameters, this can be left unset. Example with 1 required and 1 optional
// parameter: type: OBJECT properties:
// param1:
// type: STRING
// param2:
// type: INTEGER
//
// param1:
// type: STRING
// param2:
// type: INTEGER
//
// required:
// - param1
// - param1
Parameters *Schema
}

Expand Down Expand Up @@ -715,8 +717,9 @@ type Schema struct {
Type Type
// Optional. The format of the data.
// Supported formats:
// for NUMBER type: float, double
// for INTEGER type: int32, int64
//
// for NUMBER type: float, double
// for INTEGER type: int32, int64
Format string
// Optional. The description of the data.
Description string
Expand Down Expand Up @@ -770,7 +773,8 @@ func (Schema) fromProto(p *pb.Schema) *Schema {
//
// A `Tool` is a piece of code that enables the system to interact with
// external systems to perform an action, or set of actions, outside of
// knowledge and scope of the model.
// knowledge and scope of the model. A Tool object should contain exactly
// one type of Tool.
type Tool struct {
// Optional. One or more function declarations to be passed to the model along
// with the current user query. Model may decide to call a subset of these
Expand Down
2 changes: 1 addition & 1 deletion vertexai/genai/client.go
Expand Up @@ -15,7 +15,7 @@
// To get the protoveneer tool:
// go install golang.org/x/exp/protoveneer/cmd/protoveneer@latest

//go:generate protoveneer config.yaml ../../aiplatform/apiv1beta1/aiplatformpb
//go:generate protoveneer -license license.txt config.yaml ../../aiplatform/apiv1beta1/aiplatformpb

// Package genai is a client for the generative VertexAI model.
package genai
Expand Down
8 changes: 7 additions & 1 deletion vertexai/genai/config.yaml
Expand Up @@ -73,7 +73,8 @@ types:
fields:
FinishMessage:
type: string

GroundingMetadata:
omit: true

GenerateContentResponse:
doc: 'is the response from a GenerateContent or GenerateContentStream call.'
Expand All @@ -89,6 +90,11 @@ types:

Tool:
docVerb: contains
fields:
Retrieval:
omit: true
GoogleSearchRetrieval:
omit: true

Schema:
fields:
Expand Down
14 changes: 14 additions & 0 deletions vertexai/genai/license.txt
@@ -0,0 +1,14 @@

// 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.