@@ -148,7 +148,7 @@ enum TaskType {
148148message GenerateContentRequest {
149149 // Required. The name of the `Model` to use for generating the completion.
150150 //
151- // Format: `name= models/{model}`.
151+ // Format: `models/{model}`.
152152 string model = 1 [
153153 (google.api.field_behavior ) = REQUIRED ,
154154 (google.api.resource_reference ) = {
@@ -200,8 +200,8 @@ message GenerateContentRequest {
200200 // `SafetyCategory` provided in the list, the API will use the default safety
201201 // setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH,
202202 // HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT,
203- // HARM_CATEGORY_HARASSMENT are supported. Refer to the
204- // [guide](https://ai.google.dev/gemini-api/docs/safety-settings)
203+ // HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY are supported.
204+ // Refer to the [guide](https://ai.google.dev/gemini-api/docs/safety-settings)
205205 // for detailed information on available safety settings. Also refer to the
206206 // [Safety guidance](https://ai.google.dev/gemini-api/docs/safety-guidance) to
207207 // learn how to incorporate safety considerations in your AI applications.
@@ -223,9 +223,45 @@ message GenerateContentRequest {
223223 ];
224224}
225225
226+ // The configuration for the prebuilt speaker to use.
227+ message PrebuiltVoiceConfig {
228+ // The name of the preset voice to use.
229+ optional string voice_name = 1 ;
230+ }
231+
232+ // The configuration for the voice to use.
233+ message VoiceConfig {
234+ // The configuration for the speaker to use.
235+ oneof voice_config {
236+ // The configuration for the prebuilt voice to use.
237+ PrebuiltVoiceConfig prebuilt_voice_config = 1 ;
238+ }
239+ }
240+
241+ // The speech generation config.
242+ message SpeechConfig {
243+ // The configuration for the speaker to use.
244+ VoiceConfig voice_config = 1 ;
245+ }
246+
226247// Configuration options for model generation and outputs. Not all parameters
227248// are configurable for every model.
228249message GenerationConfig {
250+ // Supported modalities of the response.
251+ enum Modality {
252+ // Default value.
253+ MODALITY_UNSPECIFIED = 0 ;
254+
255+ // Indicates the model should return text.
256+ TEXT = 1 ;
257+
258+ // Indicates the model should return images.
259+ IMAGE = 2 ;
260+
261+ // Indicates the model should return audio.
262+ AUDIO = 3 ;
263+ }
264+
229265 // Optional. Number of generated responses to return.
230266 //
231267 // Currently, this value can only be set to 1. If unset, this will default
@@ -343,6 +379,27 @@ message GenerationConfig {
343379 // This sets the number of top logprobs to return at each decoding step in the
344380 // [Candidate.logprobs_result][google.ai.generativelanguage.v1beta.Candidate.logprobs_result].
345381 optional int32 logprobs = 18 [(google.api.field_behavior ) = OPTIONAL ];
382+
383+ // Optional. Enables enhanced civic answers. It may not be available for all
384+ // models.
385+ optional bool enable_enhanced_civic_answers = 19
386+ [(google.api.field_behavior ) = OPTIONAL ];
387+
388+ // Optional. The requested modalities of the response. Represents the set of
389+ // modalities that the model can return, and should be expected in the
390+ // response. This is an exact match to the modalities of the response.
391+ //
392+ // A model may have multiple combinations of supported modalities. If the
393+ // requested modalities do not match any of the supported combinations, an
394+ // error will be returned.
395+ //
396+ // An empty list is equivalent to requesting only text.
397+ repeated Modality response_modalities = 20
398+ [(google.api.field_behavior ) = OPTIONAL ];
399+
400+ // Optional. The speech generation config.
401+ optional SpeechConfig speech_config = 21
402+ [(google.api.field_behavior ) = OPTIONAL ];
346403}
347404
348405// Configuration for retrieving grounding content from a `Corpus` or
@@ -401,6 +458,9 @@ message GenerateContentResponse {
401458
402459 // Prompt was blocked due to prohibited content.
403460 PROHIBITED_CONTENT = 4 ;
461+
462+ // Candidates blocked due to unsafe image generation content.
463+ IMAGE_SAFETY = 5 ;
404464 }
405465
406466 // Optional. If set, the prompt was blocked and no candidates are returned.
@@ -481,6 +541,10 @@ message Candidate {
481541
482542 // The function call generated by the model is invalid.
483543 MALFORMED_FUNCTION_CALL = 10 ;
544+
545+ // Token generation stopped because generated images contain safety
546+ // violations.
547+ IMAGE_SAFETY = 11 ;
484548 }
485549
486550 // Output only. Index of the candidate in the list of response candidates.
0 commit comments