|
30 | 30 | @AutoValue |
31 | 31 | @JsonDeserialize(builder = LiveConnectConfig.Builder.class) |
32 | 32 | public abstract class LiveConnectConfig extends JsonSerializable { |
33 | | - /** The generation configuration for the session. */ |
34 | | - @JsonProperty("generationConfig") |
35 | | - public abstract Optional<GenerationConfig> generationConfig(); |
36 | | - |
37 | 33 | /** |
38 | 34 | * The requested modalities of the response. Represents the set of modalities that the model can |
39 | 35 | * return. Defaults to AUDIO if not specified. |
40 | 36 | */ |
41 | 37 | @JsonProperty("responseModalities") |
42 | 38 | public abstract Optional<List<String>> responseModalities(); |
43 | 39 |
|
| 40 | + /** |
| 41 | + * Value that controls the degree of randomness in token selection. Lower temperatures are good |
| 42 | + * for prompts that require a less open-ended or creative response, while higher temperatures can |
| 43 | + * lead to more diverse or creative results. |
| 44 | + */ |
| 45 | + @JsonProperty("temperature") |
| 46 | + public abstract Optional<Float> temperature(); |
| 47 | + |
| 48 | + /** |
| 49 | + * Tokens are selected from the most to least probable until the sum of their probabilities equals |
| 50 | + * this value. Use a lower value for less random responses and a higher value for more random |
| 51 | + * responses. |
| 52 | + */ |
| 53 | + @JsonProperty("topP") |
| 54 | + public abstract Optional<Float> topP(); |
| 55 | + |
| 56 | + /** |
| 57 | + * For each token selection step, the ``top_k`` tokens with the highest probabilities are sampled. |
| 58 | + * Then tokens are further filtered based on ``top_p`` with the final token selected using |
| 59 | + * temperature sampling. Use a lower number for less random responses and a higher number for more |
| 60 | + * random responses. |
| 61 | + */ |
| 62 | + @JsonProperty("topK") |
| 63 | + public abstract Optional<Float> topK(); |
| 64 | + |
| 65 | + /** Maximum number of tokens that can be generated in the response. */ |
| 66 | + @JsonProperty("maxOutputTokens") |
| 67 | + public abstract Optional<Integer> maxOutputTokens(); |
| 68 | + |
| 69 | + /** If specified, the media resolution specified will be used. */ |
| 70 | + @JsonProperty("mediaResolution") |
| 71 | + public abstract Optional<String> mediaResolution(); |
| 72 | + |
| 73 | + /** |
| 74 | + * When ``seed`` is fixed to a specific number, the model makes a best effort to provide the same |
| 75 | + * response for repeated requests. By default, a random number is used. |
| 76 | + */ |
| 77 | + @JsonProperty("seed") |
| 78 | + public abstract Optional<Integer> seed(); |
| 79 | + |
44 | 80 | /** The speech generation configuration. */ |
45 | 81 | @JsonProperty("speechConfig") |
46 | 82 | public abstract Optional<SpeechConfig> speechConfig(); |
@@ -78,12 +114,27 @@ private static Builder create() { |
78 | 114 | return new AutoValue_LiveConnectConfig.Builder(); |
79 | 115 | } |
80 | 116 |
|
81 | | - @JsonProperty("generationConfig") |
82 | | - public abstract Builder generationConfig(GenerationConfig generationConfig); |
83 | | - |
84 | 117 | @JsonProperty("responseModalities") |
85 | 118 | public abstract Builder responseModalities(List<String> responseModalities); |
86 | 119 |
|
| 120 | + @JsonProperty("temperature") |
| 121 | + public abstract Builder temperature(Float temperature); |
| 122 | + |
| 123 | + @JsonProperty("topP") |
| 124 | + public abstract Builder topP(Float topP); |
| 125 | + |
| 126 | + @JsonProperty("topK") |
| 127 | + public abstract Builder topK(Float topK); |
| 128 | + |
| 129 | + @JsonProperty("maxOutputTokens") |
| 130 | + public abstract Builder maxOutputTokens(Integer maxOutputTokens); |
| 131 | + |
| 132 | + @JsonProperty("mediaResolution") |
| 133 | + public abstract Builder mediaResolution(String mediaResolution); |
| 134 | + |
| 135 | + @JsonProperty("seed") |
| 136 | + public abstract Builder seed(Integer seed); |
| 137 | + |
87 | 138 | @JsonProperty("speechConfig") |
88 | 139 | public abstract Builder speechConfig(SpeechConfig speechConfig); |
89 | 140 |
|
|
0 commit comments