@@ -277,13 +277,51 @@ message FunctionCall { |
277 | 277 | // execute the `function_call` and return the response with the matching `id`. |
278 | 278 | string id = 3 [(google.api.field_behavior) = OPTIONAL]; |
279 | 279 |
|
280 | | - // Required. The name of the function to call. |
| 280 | + // Optional. The name of the function to call. |
281 | 281 | // Matches [FunctionDeclaration.name]. |
282 | | - string name = 1 [(google.api.field_behavior) = REQUIRED]; |
| 282 | + string name = 1 [(google.api.field_behavior) = OPTIONAL]; |
283 | 283 |
|
284 | | - // Optional. Required. The function parameters and values in JSON object |
285 | | - // format. See [FunctionDeclaration.parameters] for parameter details. |
| 284 | + // Optional. The function parameters and values in JSON object format. |
| 285 | + // See [FunctionDeclaration.parameters] for parameter details. |
286 | 286 | google.protobuf.Struct args = 2 [(google.api.field_behavior) = OPTIONAL]; |
| 287 | + |
| 288 | + // Optional. The partial argument value of the function call. |
| 289 | + // If provided, represents the arguments/fields that are streamed |
| 290 | + // incrementally. |
| 291 | + repeated PartialArg partial_args = 4 [(google.api.field_behavior) = OPTIONAL]; |
| 292 | + |
| 293 | + // Optional. Whether this is the last part of the FunctionCall. |
| 294 | + // If true, another partial message for the current FunctionCall is expected |
| 295 | + // to follow. |
| 296 | + bool will_continue = 5 [(google.api.field_behavior) = OPTIONAL]; |
| 297 | +} |
| 298 | + |
| 299 | +// Partial argument value of the function call. |
| 300 | +message PartialArg { |
| 301 | + // The delta of field value being streamed. |
| 302 | + oneof delta { |
| 303 | + // Optional. Represents a null value. |
| 304 | + google.protobuf.NullValue null_value = 2 |
| 305 | + [(google.api.field_behavior) = OPTIONAL]; |
| 306 | + |
| 307 | + // Optional. Represents a double value. |
| 308 | + double number_value = 3 [(google.api.field_behavior) = OPTIONAL]; |
| 309 | + |
| 310 | + // Optional. Represents a string value. |
| 311 | + string string_value = 4 [(google.api.field_behavior) = OPTIONAL]; |
| 312 | + |
| 313 | + // Optional. Represents a boolean value. |
| 314 | + bool bool_value = 5 [(google.api.field_behavior) = OPTIONAL]; |
| 315 | + } |
| 316 | + |
| 317 | + // Required. A JSON Path (RFC 9535) to the argument being streamed. |
| 318 | + // https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". |
| 319 | + string json_path = 1 [(google.api.field_behavior) = REQUIRED]; |
| 320 | + |
| 321 | + // Optional. Whether this is not the last part of the same json_path. |
| 322 | + // If true, another PartialArg message for the current json_path is expected |
| 323 | + // to follow. |
| 324 | + bool will_continue = 6 [(google.api.field_behavior) = OPTIONAL]; |
287 | 325 | } |
288 | 326 |
|
289 | 327 | // A datatype containing media that is part of a `FunctionResponse` message. |
@@ -634,6 +672,12 @@ message FunctionCallingConfig { |
634 | 672 | // will predict a function call from the set of function names provided. |
635 | 673 | repeated string allowed_function_names = 2 |
636 | 674 | [(google.api.field_behavior) = OPTIONAL]; |
| 675 | + |
| 676 | + // Optional. When set to true, arguments of a single function call will be |
| 677 | + // streamed out in multiple parts/contents/responses. Partial parameter |
| 678 | + // results will be returned in the [FunctionCall.partial_args] field. |
| 679 | + bool stream_function_call_arguments = 4 |
| 680 | + [(google.api.field_behavior) = OPTIONAL]; |
637 | 681 | } |
638 | 682 |
|
639 | 683 | // Retrieval config. |
|