@@ -55,7 +55,7 @@ import kotlinx.serialization.Serializable
5555 * response. The number of tokens per word varies depending on the language outputted. Defaults to 0 
5656 * (unbounded). 
5757 * 
58-  * @property responseModalities  Specifies the format of the data in which the server responds to 
58+  * @property responseModality  Specifies the format of the data in which the server responds to 
5959 * requests 
6060 * 
6161 * @property speechConfig Specifies the voice configuration of the audio response from the server. 
@@ -73,7 +73,7 @@ private constructor(
7373  internal  val  maxOutputTokens:  Int? ,
7474  internal  val  presencePenalty:  Float? ,
7575  internal  val  frequencyPenalty:  Float? ,
76-   internal  val  responseModalities :   List < ContentModality > ? ,
76+   internal  val  responseModality :   ContentModality ? ,
7777  internal  val  speechConfig:  SpeechConfig ? 
7878) {
7979
@@ -97,7 +97,7 @@ private constructor(
9797   * 
9898   * @property maxOutputTokens See [LiveGenerationConfig.maxOutputTokens]. 
9999   * 
100-    * @property responseModalities  See [LiveGenerationConfig.responseModalities ] 
100+    * @property responseModality  See [LiveGenerationConfig.responseModality ] 
101101   * 
102102   * @property speechConfig See [LiveGenerationConfig.speechConfig] 
103103   */  
@@ -109,7 +109,7 @@ private constructor(
109109    @JvmField public  var  maxOutputTokens:  Int?  =  null 
110110    @JvmField public  var  presencePenalty:  Float?  =  null 
111111    @JvmField public  var  frequencyPenalty:  Float?  =  null 
112-     @JvmField public  var  responseModalities :   List < ContentModality > ?  =  null 
112+     @JvmField public  var  responseModality :   ContentModality ?  =  null 
113113    @JvmField public  var  speechConfig:  SpeechConfig ?  =  null 
114114
115115    public  fun  setTemperature (temperature :  Float? ): Builder  =  apply  {
@@ -129,8 +129,8 @@ private constructor(
129129    public  fun  setFrequencyPenalty (frequencyPenalty :  Float? ): Builder  =  apply  {
130130      this .frequencyPenalty =  frequencyPenalty
131131    }
132-     public  fun  setResponseModalities (responseModalities :  List < ContentModality > ? ): Builder  =  apply  {
133-       this .responseModalities  =  responseModalities
132+     public  fun  setResponseModalities (responseModalities :  ContentModality ? ): Builder  =  apply  {
133+       this .responseModality  =  responseModalities
134134    }
135135    public  fun  setSpeechConfig (speechConfig :  SpeechConfig ? ): Builder  =  apply  {
136136      this .speechConfig =  speechConfig
@@ -147,7 +147,7 @@ private constructor(
147147        presencePenalty =  presencePenalty,
148148        frequencyPenalty =  frequencyPenalty,
149149        speechConfig =  speechConfig,
150-         responseModalities  =  responseModalities 
150+         responseModality  =  responseModality 
151151      )
152152  }
153153
@@ -161,7 +161,8 @@ private constructor(
161161      frequencyPenalty =  frequencyPenalty,
162162      presencePenalty =  presencePenalty,
163163      speechConfig =  speechConfig?.toInternal(),
164-       responseModalities =  responseModalities?.map { it.toInternal() }
164+       responseModalities = 
165+         if  (responseModality !=  null ) listOf (responseModality.toInternal()) else  null 
165166    )
166167  }
167168
0 commit comments