feat: add FunctionResponsePart and excluded_predefined_functions in C… · googleapis/googleapis@c288189
@@ -99,6 +99,15 @@ message Tool {
9999100100// Required. The environment being operated.
101101Environment 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 }
103112104113// Optional. Function tool type.
@@ -275,6 +284,64 @@ message FunctionCall {
275284google.protobuf.Struct args = 2 [(google.api.field_behavior) = OPTIONAL];
276285}
277286287+// 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.
295362google.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}
297369298370// Code generated by the model that is meant to be executed, and the result