@@ -23,6 +23,7 @@ import "google/api/annotations.proto";
2323import "google/api/client.proto" ;
2424import "google/api/field_behavior.proto" ;
2525import "google/api/resource.proto" ;
26+ import "google/protobuf/struct.proto" ;
2627
2728option go_package = "cloud.google.com/go/ai/generativelanguage/apiv1/generativelanguagepb;generativelanguagepb" ;
2829option java_multiple_files = true ;
@@ -144,6 +145,7 @@ enum TaskType {
144145}
145146
146147// Request to generate a completion from the model.
148+ // NEXT ID: 18
147149message GenerateContentRequest {
148150 // Required. The name of the `Model` to use for generating the completion.
149151 //
@@ -190,6 +192,7 @@ message GenerateContentRequest {
190192
191193// Configuration options for model generation and outputs. Not all parameters
192194// are configurable for every model.
195+ // Next ID: 29
193196message GenerationConfig {
194197 // Optional. Number of generated responses to return. If unset, this will
195198 // default to 1. Please note that this doesn't work for previous generation
@@ -248,6 +251,11 @@ message GenerationConfig {
248251 // generated seed.
249252 optional int32 seed = 8 [(google.api.field_behavior ) = OPTIONAL ];
250253
254+ // Optional. An internal detail. Use `responseJsonSchema` rather than this
255+ // field.
256+ google.protobuf.Value response_json_schema_ordered = 28
257+ [(google.api.field_behavior ) = OPTIONAL ];
258+
251259 // Optional. Presence penalty applied to the next token's logprobs if the
252260 // token has already been seen in the response.
253261 //
@@ -289,6 +297,7 @@ message GenerationConfig {
289297 // [response_logprobs=True][google.ai.generativelanguage.v1.GenerationConfig.response_logprobs].
290298 // This sets the number of top logprobs to return at each decoding step in the
291299 // [Candidate.logprobs_result][google.ai.generativelanguage.v1.Candidate.logprobs_result].
300+ // The number must be in the range of [0, 20].
292301 optional int32 logprobs = 18 [(google.api.field_behavior ) = OPTIONAL ];
293302
294303 // Optional. Enables enhanced civic answers. It may not be available for all
@@ -442,8 +451,22 @@ message Candidate {
442451 // violations.
443452 IMAGE_SAFETY = 11 ;
444453
454+ // Image generation stopped because generated images has other prohibited
455+ // content.
456+ IMAGE_PROHIBITED_CONTENT = 14 ;
457+
458+ // Image generation stopped because of other miscellaneous issue.
459+ IMAGE_OTHER = 15 ;
460+
461+ // The model was expected to generate an image, but none was generated.
462+ NO_IMAGE = 16 ;
463+
445464 // Model generated a tool call but no tools were enabled in the request.
446465 UNEXPECTED_TOOL_CALL = 12 ;
466+
467+ // Model called too many tools consecutively, thus the system exited
468+ // execution.
469+ TOO_MANY_TOOL_CALLS = 13 ;
447470 }
448471
449472 // Output only. Index of the candidate in the list of response candidates.
@@ -460,6 +483,13 @@ message Candidate {
460483 (google.api.field_behavior ) = OUTPUT_ONLY
461484 ];
462485
486+ // Optional. Output only. Details the reason why the model stopped generating
487+ // tokens. This is populated only when `finish_reason` is set.
488+ optional string finish_message = 4 [
489+ (google.api.field_behavior ) = OPTIONAL ,
490+ (google.api.field_behavior ) = OUTPUT_ONLY
491+ ];
492+
463493 // List of ratings for the safety of a response candidate.
464494 //
465495 // There is at most one rating per category.
@@ -512,6 +542,12 @@ message UrlMetadata {
512542
513543 // Url retrieval is failed due to error.
514544 URL_RETRIEVAL_STATUS_ERROR = 2 ;
545+
546+ // Url retrieval is failed because the content is behind paywall.
547+ URL_RETRIEVAL_STATUS_PAYWALL = 3 ;
548+
549+ // Url retrieval is failed because the content is unsafe.
550+ URL_RETRIEVAL_STATUS_UNSAFE = 4 ;
515551 }
516552
517553 // Retrieved url by the tool.
@@ -541,6 +577,9 @@ message LogprobsResult {
541577 repeated Candidate candidates = 1 ;
542578 }
543579
580+ // Sum of log probabilities for all tokens.
581+ optional float log_probability_sum = 3 ;
582+
544583 // Length = total number of decoding steps.
545584 repeated TopCandidates top_candidates = 1 ;
546585
0 commit comments