Skip to content

Commit 0d3274e

Browse files
feat: add FunctionResponsePart and excluded_predefined_functions in ComputerUse (#6825)
* feat: Continuous Tuning docs: Updated docs for related fields PiperOrigin-RevId: 820872021 Source-Link: googleapis/googleapis@d9bfa3b Source-Link: googleapis/googleapis-gen@4f90fc5 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjRmOTBmYzVjODRhN2FhZjA5ZTBmYWRhNDdhNmVlZDdjODNmYzZhZGYifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add FunctionResponsePart and excluded_predefined_functions in ComputerUse PiperOrigin-RevId: 820916199 Source-Link: googleapis/googleapis@c288189 Source-Link: googleapis/googleapis-gen@51fbf7c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjUxZmJmN2M2YTFiOTkwMjcxMjdlZTZhZTY3NTM5N2ZhYWE5NTA2MzcifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 9eb1fef commit 0d3274e

5 files changed

Lines changed: 1836 additions & 6 deletions

File tree

packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tuning_job.proto

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ message TuningJob {
4545
// The base model that is being tuned. See [Supported
4646
// models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).
4747
string base_model = 4;
48+
49+
// The pre-tuned model for continuous tuning.
50+
PreTunedModel pre_tuned_model = 31;
4851
}
4952

5053
oneof tuning_spec {
@@ -61,7 +64,10 @@ message TuningJob {
6164

6265
// Optional. The display name of the
6366
// [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
64-
// characters long and can consist of any UTF-8 characters.
67+
// characters long and can consist of any UTF-8 characters. For continuous
68+
// tuning, tuned_model_display_name will by default use the same display name
69+
// as the pre-tuned model. If a new display name is provided, the tuning job
70+
// will create a new model instead of a new version.
6571
string tuned_model_display_name = 2 [(google.api.field_behavior) = OPTIONAL];
6672

6773
// Optional. The description of the
@@ -147,7 +153,18 @@ message TuningJob {
147153
// this [TuningJob][google.cloud.aiplatform.v1.TuningJob].
148154
message TunedModel {
149155
// Output only. The resource name of the TunedModel. Format:
150-
// `projects/{project}/locations/{location}/models/{model}`.
156+
//
157+
// `projects/{project}/locations/{location}/models/{model}@{version_id}`
158+
//
159+
// When tuning from a base model, the version ID will be 1.
160+
//
161+
// For continuous tuning, if the provided tuned_model_display_name is set and
162+
// different from parent model's display name, the tuned model will have a new
163+
// parent model with version 1. Otherwise the version id will be incremented
164+
// by 1 from the last version ID in the parent model. E.g.,
165+
//
166+
// `projects/{project}/locations/{location}/models/{model}@{last_version_id +
167+
// 1}`
151168
string model = 1 [
152169
(google.api.field_behavior) = OUTPUT_ONLY,
153170
(google.api.resource_reference) = {
@@ -373,3 +390,28 @@ message TunedModelCheckpoint {
373390
// `projects/{project}/locations/{location}/endpoints/{endpoint}`.
374391
string endpoint = 4;
375392
}
393+
394+
// A pre-tuned model for continuous tuning.
395+
message PreTunedModel {
396+
// The resource name of the Model.
397+
// E.g., a model resource name with a specified version id or alias:
398+
//
399+
// `projects/{project}/locations/{location}/models/{model}@{version_id}`
400+
//
401+
// `projects/{project}/locations/{location}/models/{model}@{alias}`
402+
//
403+
// Or, omit the version id to use the default version:
404+
//
405+
// `projects/{project}/locations/{location}/models/{model}`
406+
string tuned_model_name = 1 [(google.api.resource_reference) = {
407+
type: "aiplatform.googleapis.com/Model"
408+
}];
409+
410+
// Optional. The source checkpoint id. If not specified, the default
411+
// checkpoint will be used.
412+
string checkpoint_id = 2 [(google.api.field_behavior) = OPTIONAL];
413+
414+
// Output only. The name of the base model this
415+
// [PreTunedModel][google.cloud.aiplatform.v1.PreTunedModel] was tuned from.
416+
string base_model = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
417+
}

packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tool.proto

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ message Tool {
9999

100100
// Required. The environment being operated.
101101
Environment environment = 1 [(google.api.field_behavior) = REQUIRED];
102+
103+
// Optional. By default, [predefined
104+
// functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
105+
// are included in the final model call. Some of them can be explicitly
106+
// excluded from being automatically included. This can serve two purposes:
107+
// 1. Using a more restricted / different action space.
108+
// 2. Improving the definitions / instructions of predefined functions.
109+
repeated string excluded_predefined_functions = 2
110+
[(google.api.field_behavior) = OPTIONAL];
102111
}
103112

104113
// Optional. Function tool type.
@@ -275,6 +284,64 @@ message FunctionCall {
275284
google.protobuf.Struct args = 2 [(google.api.field_behavior) = OPTIONAL];
276285
}
277286

287+
// A datatype containing media that is part of a `FunctionResponse` message.
288+
//
289+
// A `FunctionResponsePart` consists of data which has an associated datatype. A
290+
// `FunctionResponsePart` can only contain one of the accepted types in
291+
// `FunctionResponsePart.data`.
292+
//
293+
// A `FunctionResponsePart` must have a fixed IANA MIME type identifying the
294+
// type and subtype of the media if the `inline_data` field is filled with raw
295+
// bytes.
296+
message FunctionResponsePart {
297+
// The data of the function response part.
298+
oneof data {
299+
// Inline media bytes.
300+
FunctionResponseBlob inline_data = 1;
301+
302+
// URI based data.
303+
FunctionResponseFileData file_data = 2;
304+
}
305+
}
306+
307+
// Raw media bytes for function response.
308+
//
309+
// Text should not be sent as raw bytes, use the 'text' field.
310+
message FunctionResponseBlob {
311+
// Required. The IANA standard MIME type of the source data.
312+
string mime_type = 1 [(google.api.field_behavior) = REQUIRED];
313+
314+
// Required. Raw bytes.
315+
bytes data = 2 [(google.api.field_behavior) = REQUIRED];
316+
317+
// Optional. Display name of the blob.
318+
//
319+
// Used to provide a label or filename to distinguish blobs.
320+
//
321+
// This field is only returned in PromptMessage for prompt management.
322+
// It is currently used in the Gemini GenerateContent calls only when server
323+
// side tools (code_execution, google_search, and url_context) are enabled.
324+
string display_name = 4 [(google.api.field_behavior) = OPTIONAL];
325+
}
326+
327+
// URI based data for function response.
328+
message FunctionResponseFileData {
329+
// Required. The IANA standard MIME type of the source data.
330+
string mime_type = 1 [(google.api.field_behavior) = REQUIRED];
331+
332+
// Required. URI.
333+
string file_uri = 2 [(google.api.field_behavior) = REQUIRED];
334+
335+
// Optional. Display name of the file data.
336+
//
337+
// Used to provide a label or filename to distinguish file datas.
338+
//
339+
// This field is only returned in PromptMessage for prompt management.
340+
// It is currently used in the Gemini GenerateContent calls only when server
341+
// side tools (code_execution, google_search, and url_context) are enabled.
342+
string display_name = 3 [(google.api.field_behavior) = OPTIONAL];
343+
}
344+
278345
// The result output from a [FunctionCall] that contains a string representing
279346
// the [FunctionDeclaration.name] and a structured JSON object containing any
280347
// output from the function is used as context to the model. This should contain
@@ -293,6 +360,11 @@ message FunctionResponse {
293360
// error details (if any). If "output" and "error" keys are not specified,
294361
// then whole "response" is treated as function output.
295362
google.protobuf.Struct response = 2 [(google.api.field_behavior) = REQUIRED];
363+
364+
// Optional. Ordered `Parts` that constitute a function response. Parts may
365+
// have different IANA MIME types.
366+
repeated FunctionResponsePart parts = 4
367+
[(google.api.field_behavior) = OPTIONAL];
296368
}
297369

298370
// Code generated by the model that is meant to be executed, and the result

0 commit comments

Comments
 (0)