Skip to content

Commit

Permalink
Merge branch 'main' into fix-pubsub-ordering-race-condition
Browse files Browse the repository at this point in the history
  • Loading branch information
hongalex committed Feb 27, 2024
2 parents a6bbe24 + 2577611 commit 42eaf18
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .github/.OwlBot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ deep-remove-regex:
- /binaryauthorization/apiv1beta1/
- /certificatemanager/apiv1/
- /channel/apiv1/
- /chat/apiv1/
- /cloudbuild/apiv1/v2/
- /cloudbuild/apiv2/
- /clouddms/apiv1/
Expand Down Expand Up @@ -189,6 +190,7 @@ deep-remove-regex:
- /internal/generated/snippets/binaryauthorization/apiv1beta1/
- /internal/generated/snippets/certificatemanager/apiv1/
- /internal/generated/snippets/channel/apiv1/
- /internal/generated/snippets/chat/apiv1/
- /internal/generated/snippets/cloudbuild/apiv1/v2/
- /internal/generated/snippets/cloudbuild/apiv2/
- /internal/generated/snippets/clouddms/apiv1/
Expand Down Expand Up @@ -679,6 +681,8 @@ deep-copy-regex:
dest: /
- source: /google/cloud/channel/v1/cloud.google.com/go
dest: /
- source: /google/cloud/chat/v1/cloud.google.com/go
dest: /
- source: /google/devtools/cloudbuild/v1/cloud.google.com/go
dest: /
- source: /google/devtools/cloudbuild/v2/cloud.google.com/go
Expand Down
4 changes: 4 additions & 0 deletions internal/postprocessor/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ modules:
- binaryauthorization
- certificatemanager
- channel
- chat
- cloudbuild
- clouddms
- cloudprofiler
Expand Down Expand Up @@ -450,6 +451,9 @@ service-configs:
- input-directory: google/cloud/channel/v1
service-config: cloudchannel_v1.yaml
import-path: cloud.google.com/go/channel/apiv1
- input-directory: google/cloud/chat/v1
service-config: chat_v1.yaml
import-path: cloud.google.com/go/chat/apiv1
- input-directory: google/cloud/clouddms/v1
service-config: datamigration_v1.yaml
import-path: cloud.google.com/go/clouddms/apiv1
Expand Down
20 changes: 12 additions & 8 deletions vertexai/genai/aiplatformpb_veneer.gen.go
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 42eaf18

Please sign in to comment.