Debian Codegraph @

docs/dyn/aiplatform_v1.projects.locations.tuningJobs.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="aiplatform_v1.html">Agent Platform API</a> . <a href="aiplatform_v1.projects.html">projects</a> . <a href="aiplatform_v1.projects.locations.html">locations</a> . <a href="aiplatform_v1.projects.locations.tuningJobs.html">tuningJobs</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="aiplatform_v1.projects.locations.tuningJobs.operations.html">operations()</a></code>
79 </p>
80 <p class="firstline">Returns the operations Resource.</p>
81
82 <p class="toc_element">
83 <code><a href="#cancel">cancel(name, body=None, x__xgafv=None)</a></code></p>
84 <p class="firstline">Cancels a tuning job. Starts an asynchronous cancellation request. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use GenAiTuningService.GetTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the tuning job is not deleted. Instead, its state is set to `CANCELLED`, and `error` is set to a status with a `google.rpc.Status.code` of 1, corresponding to `Code.CANCELLED`.</p>
85 <p class="toc_element">
86 <code><a href="#close">close()</a></code></p>
87 <p class="firstline">Close httplib2 connections.</p>
88 <p class="toc_element">
89 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
90 <p class="firstline">Creates a tuning job. A created tuning job will be subsequently executed to start the model tuning process.</p>
91 <p class="toc_element">
92 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
93 <p class="firstline">Gets a tuning job.</p>
94 <p class="toc_element">
95 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
96 <p class="firstline">Lists tuning jobs in a location.</p>
97 <p class="toc_element">
98 <code><a href="#list_next">list_next()</a></code></p>
99 <p class="firstline">Retrieves the next page of results.</p>
100 <p class="toc_element">
101 <code><a href="#rebaseTunedModel">rebaseTunedModel(parent, body=None, x__xgafv=None)</a></code></p>
102 <p class="firstline">Rebase a tuned model. A rebase operation takes a model that was previously tuned on a base model version, and retunes it on a new base model version. The rebase operation creates a new tuning job and a new tuned model.</p>
103 <h3>Method Details</h3>
104 <div class="method">
105 <code class="details" id="cancel">cancel(name, body=None, x__xgafv=None)</code>
106 <pre>Cancels a tuning job. Starts an asynchronous cancellation request. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use GenAiTuningService.GetTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the tuning job is not deleted. Instead, its state is set to `CANCELLED`, and `error` is set to a status with a `google.rpc.Status.code` of 1, corresponding to `Code.CANCELLED`.
107
108 Args:
109 name: string, Required. The name of the tuning job to cancel. Format: `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` (required)
110 body: object, The request body.
111 The object takes the form of:
112
113 { # Request message for GenAiTuningService.CancelTuningJob.
114 }
115
116 x__xgafv: string, V1 error format.
117 Allowed values
118 1 - v1 error format
119 2 - v2 error format
120
121 Returns:
122 An object of the form:
123
124 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
125 }</pre>
126 </div>
127
128 <div class="method">
129 <code class="details" id="close">close()</code>
130 <pre>Close httplib2 connections.</pre>
131 </div>
132
133 <div class="method">
134 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
135 <pre>Creates a tuning job. A created tuning job will be subsequently executed to start the model tuning process.
136
137 Args:
138 parent: string, Required. The resource name of the location to create the tuning job in. Format: `projects/{project}/locations/{location}` (required)
139 body: object, The request body.
140 The object takes the form of:
141
142 { # Represents a TuningJob that runs with Google owned models.
143 &quot;baseModel&quot;: &quot;A String&quot;, # The base model that is being tuned. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).
144 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob was created.
145 &quot;description&quot;: &quot;A String&quot;, # Optional. The description of the TuningJob.
146 &quot;encryptionSpec&quot;: { # Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. # Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key.
147 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Resource name of the Cloud KMS key used to protect the resource. The Cloud KMS key must be in the same region as the resource. It must have the format `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
148 },
149 &quot;endTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob entered any of the following JobStates: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
150 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when job&#x27;s state is `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
151 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
152 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
153 {
154 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
155 },
156 ],
157 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
158 },
159 &quot;evaluateDatasetRuns&quot;: [ # Output only. Evaluation runs for the Tuning Job.
160 { # Evaluate Dataset Run Result for Tuning Job.
161 &quot;checkpointId&quot;: &quot;A String&quot;, # Output only. The checkpoint id used in the evaluation run. Only populated when evaluating checkpoints.
162 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The error of the evaluation run if any.
163 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
164 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
165 {
166 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
167 },
168 ],
169 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
170 },
171 &quot;evaluateDatasetResponse&quot;: { # The results from an evaluation run performed by the EvaluationService. # Output only. Results for EvaluationService.
172 &quot;aggregationOutput&quot;: { # The aggregation result for the entire dataset and all metrics. # Output only. Aggregation statistics derived from results of EvaluationService.
173 &quot;aggregationResults&quot;: [ # One AggregationResult per metric.
174 { # The aggregation result for a single metric.
175 &quot;aggregationMetric&quot;: &quot;A String&quot;, # Aggregation metric.
176 &quot;bleuMetricValue&quot;: { # Bleu metric value for an instance. # Results for bleu metric.
177 &quot;score&quot;: 3.14, # Output only. Bleu score.
178 },
179 &quot;customCodeExecutionResult&quot;: { # Result for custom code execution metric. # Result for code execution metric.
180 &quot;score&quot;: 3.14, # Output only. Custom code execution score.
181 },
182 &quot;exactMatchMetricValue&quot;: { # Exact match metric value for an instance. # Results for exact match metric.
183 &quot;score&quot;: 3.14, # Output only. Exact match score.
184 },
185 &quot;pairwiseMetricResult&quot;: { # Spec for pairwise metric result. # Result for pairwise metric.
186 &quot;customOutput&quot;: { # Spec for custom output. # Output only. Spec for custom output.
187 &quot;rawOutputs&quot;: { # Raw output. # Output only. List of raw output strings.
188 &quot;rawOutput&quot;: [ # Output only. Raw output string.
189 &quot;A String&quot;,
190 ],
191 },
192 },
193 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for pairwise metric score.
194 &quot;pairwiseChoice&quot;: &quot;A String&quot;, # Output only. Pairwise metric choice.
195 },
196 &quot;pointwiseMetricResult&quot;: { # Spec for pointwise metric result. # Result for pointwise metric.
197 &quot;customOutput&quot;: { # Spec for custom output. # Output only. Spec for custom output.
198 &quot;rawOutputs&quot;: { # Raw output. # Output only. List of raw output strings.
199 &quot;rawOutput&quot;: [ # Output only. Raw output string.
200 &quot;A String&quot;,
201 ],
202 },
203 },
204 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for pointwise metric score.
205 &quot;score&quot;: 3.14, # Output only. Pointwise metric score.
206 },
207 &quot;rougeMetricValue&quot;: { # Rouge metric value for an instance. # Results for rouge metric.
208 &quot;score&quot;: 3.14, # Output only. Rouge score.
209 },
210 },
211 ],
212 &quot;dataset&quot;: { # The dataset used for evaluation. # The dataset used for evaluation &amp; aggregation.
213 &quot;bigquerySource&quot;: { # The BigQuery location for the input content. # BigQuery source holds the dataset.
214 &quot;inputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
215 },
216 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Cloud storage source holds the dataset. Currently only one Cloud Storage file path is supported.
217 &quot;uris&quot;: [ # Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/wildcards.
218 &quot;A String&quot;,
219 ],
220 },
221 },
222 },
223 &quot;outputInfo&quot;: { # Describes the info for output of EvaluationService. # Output only. Output info for EvaluationService.
224 &quot;gcsOutputDirectory&quot;: &quot;A String&quot;, # Output only. The full path of the Cloud Storage directory created, into which the evaluation results and aggregation results are written.
225 },
226 },
227 &quot;evaluationRun&quot;: &quot;A String&quot;, # Output only. The resource name of the evaluation run. Format: `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`.
228 &quot;operationName&quot;: &quot;A String&quot;, # Output only. Deprecated: The updated architecture uses evaluation_run instead.
229 },
230 ],
231 &quot;experiment&quot;: &quot;A String&quot;, # Output only. The Experiment associated with this TuningJob.
232 &quot;labels&quot;: { # Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
233 &quot;a_key&quot;: &quot;A String&quot;,
234 },
235 &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. Resource name of a TuningJob. Format: `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
236 &quot;preTunedModel&quot;: { # A pre-tuned model for continuous tuning. # The pre-tuned model for continuous tuning.
237 &quot;baseModel&quot;: &quot;A String&quot;, # Output only. The name of the base model this PreTunedModel was tuned from.
238 &quot;checkpointId&quot;: &quot;A String&quot;, # Optional. The source checkpoint id. If not specified, the default checkpoint will be used.
239 &quot;tunedModelName&quot;: &quot;A String&quot;, # The resource name of the Model. E.g., a model resource name with a specified version id or alias: `projects/{project}/locations/{location}/models/{model}@{version_id}` `projects/{project}/locations/{location}/models/{model}@{alias}` Or, omit the version id to use the default version: `projects/{project}/locations/{location}/models/{model}`
240 },
241 &quot;preferenceOptimizationSpec&quot;: { # Tuning Spec for Preference Optimization. # Tuning Spec for Preference Optimization.
242 &quot;exportLastCheckpointOnly&quot;: True or False, # Optional. If set to true, disable intermediate checkpoints for Preference Optimization and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for Preference Optimization. Default is false.
243 &quot;hyperParameters&quot;: { # Hyperparameters for Preference Optimization. # Optional. Hyperparameters for Preference Optimization.
244 &quot;adapterSize&quot;: &quot;A String&quot;, # Optional. Adapter size for preference optimization.
245 &quot;beta&quot;: 3.14, # Optional. Weight for KL Divergence regularization.
246 &quot;epochCount&quot;: &quot;A String&quot;, # Optional. Number of complete passes the model makes over the entire training dataset during training.
247 &quot;learningRateMultiplier&quot;: 3.14, # Optional. Multiplier for adjusting the default learning rate.
248 },
249 &quot;trainingDatasetUri&quot;: &quot;A String&quot;, # Required. Cloud Storage path to file containing training dataset for preference optimization tuning. The dataset must be formatted as a JSONL file.
250 &quot;validationDatasetUri&quot;: &quot;A String&quot;, # Optional. Cloud Storage path to file containing validation dataset for preference optimization tuning. The dataset must be formatted as a JSONL file.
251 },
252 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent Users starting the pipeline must have the `iam.serviceAccounts.actAs` permission on this service account.
253 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob for the first time entered the `JOB_STATE_RUNNING` state.
254 &quot;state&quot;: &quot;A String&quot;, # Output only. The detailed state of the job.
255 &quot;supervisedTuningSpec&quot;: { # Tuning Spec for Supervised Tuning for first party models. # Tuning Spec for Supervised Fine Tuning.
256 &quot;evaluationConfig&quot;: { # Evaluation Config for Tuning Job. # Optional. Evaluation Config for Tuning Job.
257 &quot;autoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Autorater config for evaluation.
258 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
259 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
260 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
261 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
262 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
263 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
264 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
265 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
266 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
267 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
268 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
269 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
270 },
271 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
272 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
273 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
274 },
275 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
276 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
277 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
278 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
279 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
280 { # Configuration for the model to configure output formatting and delivery.
281 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
282 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
283 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
284 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
285 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
286 },
287 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
288 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
289 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
290 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
291 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
292 },
293 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
294 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
295 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
296 },
297 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
298 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
299 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
300 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
301 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
302 },
303 },
304 ],
305 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
306 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
307 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
308 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
309 &quot;A String&quot;,
310 ],
311 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
312 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
313 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
314 # Object with schema name: GoogleCloudAiplatformV1Schema
315 ],
316 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
317 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
318 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
319 },
320 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
321 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
322 &quot;A String&quot;,
323 ],
324 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
325 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
326 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
327 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
328 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
329 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
330 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
331 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
332 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
333 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
334 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
335 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
336 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
337 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
338 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
339 },
340 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
341 &quot;A String&quot;,
342 ],
343 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
344 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
345 &quot;A String&quot;,
346 ],
347 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
348 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
349 },
350 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
351 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
352 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
353 },
354 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
355 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
356 },
357 },
358 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
359 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
360 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
361 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
362 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
363 { # Configuration for a single speaker in a multi-speaker setup.
364 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
365 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
366 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
367 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
368 },
369 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
370 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
371 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
372 },
373 },
374 },
375 ],
376 },
377 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
378 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
379 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
380 },
381 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
382 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
383 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
384 },
385 },
386 },
387 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
388 &quot;A String&quot;,
389 ],
390 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
391 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
392 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
393 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
394 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
395 },
396 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
397 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
398 },
399 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
400 },
401 &quot;datasetCustomMetrics&quot;: [ # Optional. Specifications for custom dataset-level aggregations.
402 { # Defines a custom dataset-level aggregation.
403 &quot;aggregationFunction&quot;: &quot;A String&quot;, # Required. The Python code string containing the aggregation function. Expected function signature: `def aggregate(instances: list[dict[str, Any]]) -&gt; dict[str, float]:` The `instances` argument is a list of dictionaries, where each dictionary represents a single evaluation result item. The structure of each dictionary corresponds to the fields in the `EvaluationResult` message. This includes: - `&quot;request&quot;`: Contains the original input data and model inputs (from `EvaluationResult.EvaluationRequest`). - `&quot;candidate_results&quot;`: Contains the results of any instance-level metrics (from `EvaluationResult.CandidateResults`). Example of a single item in the `instances` list: { &quot;request&quot;: { &quot;prompt&quot;: {&quot;text&quot;: &quot;What is the capital of France?&quot;}, &quot;golden_response&quot;: {&quot;text&quot;: &quot;Paris&quot;}, &quot;candidate_responses&quot;: [{&quot;candidate&quot;: &quot;model-v1&quot;, &quot;text&quot;: &quot;Paris&quot;}] }, &quot;candidate_results&quot;: [ {&quot;metric&quot;: &quot;exact_match&quot;, &quot;score&quot;: 1.0}, {&quot;metric&quot;: &quot;bleu&quot;, &quot;score&quot;: 0.9} ] }
404 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A display name for this custom summary metric. Used to prefix keys in the output summaryMetrics map. If not provided, a default name like &quot;dataset_custom_metric_1&quot;, &quot;dataset_custom_metric_2&quot;, etc., will be generated based on the order in the repeated field.
405 },
406 ],
407 &quot;inferenceGenerationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for inference generation and outputs. If not set, default generation parameters are used.
408 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
409 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
410 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
411 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
412 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
413 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
414 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
415 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
416 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
417 },
418 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
419 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
420 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
421 },
422 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
423 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
424 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
425 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
426 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
427 { # Configuration for the model to configure output formatting and delivery.
428 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
429 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
430 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
431 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
432 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
433 },
434 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
435 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
436 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
437 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
438 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
439 },
440 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
441 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
442 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
443 },
444 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
445 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
446 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
447 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
448 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
449 },
450 },
451 ],
452 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
453 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
454 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
455 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
456 &quot;A String&quot;,
457 ],
458 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
459 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
460 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
461 # Object with schema name: GoogleCloudAiplatformV1Schema
462 ],
463 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
464 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
465 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
466 },
467 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
468 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
469 &quot;A String&quot;,
470 ],
471 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
472 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
473 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
474 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
475 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
476 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
477 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
478 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
479 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
480 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
481 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
482 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
483 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
484 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
485 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
486 },
487 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
488 &quot;A String&quot;,
489 ],
490 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
491 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
492 &quot;A String&quot;,
493 ],
494 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
495 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
496 },
497 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
498 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
499 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
500 },
501 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
502 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
503 },
504 },
505 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
506 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
507 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
508 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
509 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
510 { # Configuration for a single speaker in a multi-speaker setup.
511 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
512 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
513 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
514 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
515 },
516 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
517 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
518 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
519 },
520 },
521 },
522 ],
523 },
524 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
525 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
526 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
527 },
528 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
529 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
530 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
531 },
532 },
533 },
534 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
535 &quot;A String&quot;,
536 ],
537 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
538 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
539 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
540 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
541 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
542 },
543 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
544 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
545 },
546 &quot;metrics&quot;: [ # Required. The metrics used for evaluation.
547 { # The metric used for running evaluations.
548 &quot;aggregationMetrics&quot;: [ # Optional. The aggregation metrics to use.
549 &quot;A String&quot;,
550 ],
551 &quot;bleuSpec&quot;: { # Spec for bleu score metric - calculates the precision of n-grams in the prediction as compared to reference - returns a score ranging between 0 to 1. # Spec for bleu metric.
552 &quot;useEffectiveOrder&quot;: True or False, # Optional. Whether to use_effective_order to compute bleu score.
553 },
554 &quot;computationBasedMetricSpec&quot;: { # Specification for a computation based metric. # Spec for a computation based metric.
555 &quot;parameters&quot;: { # Optional. A map of parameters for the metric, e.g. {&quot;rouge_type&quot;: &quot;rougeL&quot;}.
556 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
557 },
558 &quot;type&quot;: &quot;A String&quot;, # Required. The type of the computation based metric.
559 },
560 &quot;customCodeExecutionSpec&quot;: { # Specificies a metric that is populated by evaluating user-defined Python code. # Spec for Custom Code Execution metric.
561 &quot;evaluationFunction&quot;: &quot;A String&quot;, # Required. Python function. Expected user to define the following function, e.g.: def evaluate(instance: dict[str, Any]) -&gt; float: Please include this function signature in the code snippet. Instance is the evaluation instance, any fields populated in the instance are available to the function as instance[field_name]. Example: Example input: ``` instance= EvaluationInstance( response=EvaluationInstance.InstanceData(text=&quot;The answer is 4.&quot;), reference=EvaluationInstance.InstanceData(text=&quot;4&quot;) ) ``` Example converted input: ``` { &#x27;response&#x27;: {&#x27;text&#x27;: &#x27;The answer is 4.&#x27;}, &#x27;reference&#x27;: {&#x27;text&#x27;: &#x27;4&#x27;} } ``` Example python function: ``` def evaluate(instance: dict[str, Any]) -&gt; float: if instance&#x27;response&#x27; == instance&#x27;reference&#x27;: return 1.0 return 0.0 ``` CustomCodeExecutionSpec is also supported in Batch Evaluation (EvalDataset RPC) and Tuning Evaluation. Each line in the input jsonl file will be converted to dict[str, Any] and passed to the evaluation function.
562 },
563 &quot;exactMatchSpec&quot;: { # Spec for exact match metric - returns 1 if prediction and reference exactly matches, otherwise 0. # Spec for exact match metric.
564 },
565 &quot;llmBasedMetricSpec&quot;: { # Specification for an LLM based metric. # Spec for an LLM based metric.
566 &quot;additionalConfig&quot;: { # Optional. Optional additional configuration for the metric.
567 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
568 },
569 &quot;judgeAutoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Optional configuration for the judge LLM (Autorater).
570 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
571 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
572 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
573 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
574 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
575 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
576 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
577 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
578 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
579 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
580 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
581 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
582 },
583 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
584 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
585 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
586 },
587 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
588 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
589 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
590 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
591 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
592 { # Configuration for the model to configure output formatting and delivery.
593 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
594 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
595 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
596 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
597 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
598 },
599 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
600 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
601 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
602 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
603 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
604 },
605 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
606 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
607 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
608 },
609 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
610 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
611 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
612 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
613 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
614 },
615 },
616 ],
617 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
618 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
619 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
620 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
621 &quot;A String&quot;,
622 ],
623 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
624 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
625 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
626 # Object with schema name: GoogleCloudAiplatformV1Schema
627 ],
628 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
629 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
630 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
631 },
632 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
633 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
634 &quot;A String&quot;,
635 ],
636 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
637 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
638 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
639 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
640 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
641 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
642 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
643 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
644 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
645 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
646 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
647 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
648 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
649 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
650 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
651 },
652 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
653 &quot;A String&quot;,
654 ],
655 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
656 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
657 &quot;A String&quot;,
658 ],
659 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
660 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
661 },
662 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
663 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
664 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
665 },
666 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
667 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
668 },
669 },
670 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
671 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
672 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
673 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
674 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
675 { # Configuration for a single speaker in a multi-speaker setup.
676 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
677 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
678 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
679 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
680 },
681 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
682 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
683 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
684 },
685 },
686 },
687 ],
688 },
689 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
690 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
691 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
692 },
693 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
694 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
695 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
696 },
697 },
698 },
699 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
700 &quot;A String&quot;,
701 ],
702 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
703 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
704 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
705 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
706 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
707 },
708 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
709 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
710 },
711 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
712 },
713 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Template for the prompt sent to the judge model.
714 &quot;predefinedRubricGenerationSpec&quot;: { # The spec for a pre-defined metric. # Dynamically generate rubrics using a predefined spec.
715 &quot;metricSpecName&quot;: &quot;A String&quot;, # Required. The name of a pre-defined metric, such as &quot;instruction_following_v1&quot; or &quot;text_quality_v1&quot;.
716 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
717 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
718 },
719 },
720 &quot;resultParserConfig&quot;: { # Config for parsing LLM responses. It can be used to parse the LLM response to be evaluated, or the LLM response from LLM-based metrics/Autoraters. # Optional. The parser config for the metric result.
721 &quot;customCodeParserConfig&quot;: { # Configuration for parsing the LLM response using custom code. # Optional. Use custom code to parse the LLM response.
722 &quot;parsingFunction&quot;: &quot;A String&quot;, # Required. Python function for parsing results. The function should be defined within this string. The function takes a list of strings (LLM responses) and should return either a list of dictionaries (for rubrics) or a single dictionary (for a metric result). Example function signature: def parse(responses: list[str]) -&gt; list[dict[str, Any]] | dict[str, Any]: When parsing rubrics, return a list of dictionaries, where each dictionary represents a Rubric. Example for rubrics: [ { &quot;content&quot;: {&quot;property&quot;: {&quot;description&quot;: &quot;The response is factual.&quot;}}, &quot;type&quot;: &quot;FACTUALITY&quot;, &quot;importance&quot;: &quot;HIGH&quot; }, { &quot;content&quot;: {&quot;property&quot;: {&quot;description&quot;: &quot;The response is fluent.&quot;}}, &quot;type&quot;: &quot;FLUENCY&quot;, &quot;importance&quot;: &quot;MEDIUM&quot; } ] When parsing critique results, return a dictionary representing a MetricResult. Example for a metric result: { &quot;score&quot;: 0.8, &quot;explanation&quot;: &quot;The model followed most instructions.&quot;, &quot;rubric_verdicts&quot;: [...] } ... code for result extraction and aggregation
723 },
724 },
725 &quot;rubricGenerationSpec&quot;: { # Specification for how rubrics should be generated. # Dynamically generate rubrics using this specification.
726 &quot;modelConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Configuration for the model used in rubric generation. Configs including sampling count and base model can be specified here. Flipping is not supported for rubric generation.
727 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
728 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
729 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
730 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
731 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
732 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
733 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
734 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
735 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
736 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
737 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
738 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
739 },
740 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
741 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
742 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
743 },
744 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
745 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
746 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
747 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
748 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
749 { # Configuration for the model to configure output formatting and delivery.
750 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
751 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
752 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
753 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
754 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
755 },
756 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
757 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
758 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
759 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
760 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
761 },
762 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
763 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
764 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
765 },
766 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
767 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
768 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
769 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
770 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
771 },
772 },
773 ],
774 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
775 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
776 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
777 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
778 &quot;A String&quot;,
779 ],
780 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
781 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
782 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
783 # Object with schema name: GoogleCloudAiplatformV1Schema
784 ],
785 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
786 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
787 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
788 },
789 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
790 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
791 &quot;A String&quot;,
792 ],
793 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
794 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
795 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
796 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
797 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
798 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
799 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
800 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
801 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
802 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
803 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
804 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
805 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
806 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
807 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
808 },
809 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
810 &quot;A String&quot;,
811 ],
812 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
813 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
814 &quot;A String&quot;,
815 ],
816 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
817 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
818 },
819 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
820 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
821 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
822 },
823 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
824 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
825 },
826 },
827 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
828 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
829 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
830 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
831 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
832 { # Configuration for a single speaker in a multi-speaker setup.
833 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
834 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
835 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
836 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
837 },
838 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
839 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
840 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
841 },
842 },
843 },
844 ],
845 },
846 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
847 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
848 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
849 },
850 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
851 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
852 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
853 },
854 },
855 },
856 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
857 &quot;A String&quot;,
858 ],
859 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
860 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
861 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
862 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
863 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
864 },
865 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
866 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
867 },
868 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
869 },
870 &quot;promptTemplate&quot;: &quot;A String&quot;, # Template for the prompt used to generate rubrics. The details should be updated based on the most-recent recipe requirements.
871 &quot;rubricContentType&quot;: &quot;A String&quot;, # The type of rubric content to be generated.
872 &quot;rubricTypeOntology&quot;: [ # Optional. An optional, pre-defined list of allowed types for generated rubrics. If this field is provided, it implies `include_rubric_type` should be true, and the generated rubric types should be chosen from this ontology.
873 &quot;A String&quot;,
874 ],
875 },
876 &quot;rubricGroupKey&quot;: &quot;A String&quot;, # Use a pre-defined group of rubrics associated with the input. Refers to a key in the rubric_groups map of EvaluationInstance.
877 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for the judge model.
878 },
879 &quot;metadata&quot;: { # Metadata about the metric, used for visualization and organization. # Optional. Metadata about the metric, used for visualization and organization.
880 &quot;otherMetadata&quot;: { # Optional. Flexible metadata for user-defined attributes.
881 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
882 },
883 &quot;scoreRange&quot;: { # The range of possible scores for this metric, used for plotting. # Optional. The range of possible scores for this metric, used for plotting.
884 &quot;description&quot;: &quot;A String&quot;, # Optional. The description of the score explaining the directionality etc.
885 &quot;max&quot;: 3.14, # Required. The maximum value of the score range (inclusive).
886 &quot;min&quot;: 3.14, # Required. The minimum value of the score range (inclusive).
887 &quot;step&quot;: 3.14, # Optional. The distance between discrete steps in the range. If unset, the range is assumed to be continuous.
888 },
889 &quot;title&quot;: &quot;A String&quot;, # Optional. The user-friendly name for the metric. If not set for a registered metric, it will default to the metric&#x27;s display name.
890 },
891 &quot;pairwiseMetricSpec&quot;: { # Spec for pairwise metric. # Spec for pairwise metric.
892 &quot;baselineResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the baseline response.
893 &quot;candidateResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the candidate response.
894 &quot;customOutputFormatConfig&quot;: { # Spec for custom output format configuration. # Optional. CustomOutputFormatConfig allows customization of metric output. When this config is set, the default output is replaced with the raw output string. If a custom format is chosen, the `pairwise_choice` and `explanation` fields in the corresponding metric result will be empty.
895 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
896 },
897 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pairwise metric.
898 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pairwise metric.
899 },
900 &quot;pointwiseMetricSpec&quot;: { # Spec for pointwise metric. # Spec for pointwise metric.
901 &quot;customOutputFormatConfig&quot;: { # Spec for custom output format configuration. # Optional. CustomOutputFormatConfig allows customization of metric output. By default, metrics return a score and explanation. When this config is set, the default output is replaced with either: - The raw output string. - A parsed output based on a user-defined schema. If a custom format is chosen, the `score` and `explanation` fields in the corresponding metric result will be empty.
902 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
903 },
904 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pointwise metric.
905 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pointwise metric.
906 },
907 &quot;predefinedMetricSpec&quot;: { # The spec for a pre-defined metric. # The spec for a pre-defined metric.
908 &quot;metricSpecName&quot;: &quot;A String&quot;, # Required. The name of a pre-defined metric, such as &quot;instruction_following_v1&quot; or &quot;text_quality_v1&quot;.
909 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
910 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
911 },
912 },
913 &quot;rougeSpec&quot;: { # Spec for rouge score metric - calculates the recall of n-grams in prediction as compared to reference - returns a score ranging between 0 and 1. # Spec for rouge metric.
914 &quot;rougeType&quot;: &quot;A String&quot;, # Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum.
915 &quot;splitSummaries&quot;: True or False, # Optional. Whether to split summaries while using rougeLsum.
916 &quot;useStemmer&quot;: True or False, # Optional. Whether to use stemmer to compute rouge score.
917 },
918 },
919 ],
920 &quot;outputConfig&quot;: { # Config for evaluation output. # Required. Config for evaluation output.
921 &quot;gcsDestination&quot;: { # The Google Cloud Storage location where the output is to be written to. # Cloud storage destination for evaluation output.
922 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
923 },
924 },
925 },
926 &quot;exportLastCheckpointOnly&quot;: True or False, # Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. Default is false.
927 &quot;hyperParameters&quot;: { # Hyperparameters for SFT. # Optional. Hyperparameters for SFT.
928 &quot;adapterSize&quot;: &quot;A String&quot;, # Optional. Adapter size for tuning.
929 &quot;epochCount&quot;: &quot;A String&quot;, # Optional. Number of complete passes the model makes over the entire training dataset during training.
930 &quot;learningRateMultiplier&quot;: 3.14, # Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. This feature is only available for 1P models.
931 },
932 &quot;trainingDatasetUri&quot;: &quot;A String&quot;, # Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
933 &quot;validationDatasetUri&quot;: &quot;A String&quot;, # Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
934 },
935 &quot;tunedModel&quot;: { # The Model Registry Model and Online Prediction Endpoint associated with this TuningJob. # Output only. The tuned model resources associated with this TuningJob.
936 &quot;checkpoints&quot;: [ # Output only. The checkpoints associated with this TunedModel. This field is only populated for tuning jobs that enable intermediate checkpoints.
937 { # TunedModelCheckpoint for the Tuned Model of a Tuning Job.
938 &quot;checkpointId&quot;: &quot;A String&quot;, # The ID of the checkpoint.
939 &quot;endpoint&quot;: &quot;A String&quot;, # The Endpoint resource name that the checkpoint is deployed to. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
940 &quot;epoch&quot;: &quot;A String&quot;, # The epoch of the checkpoint.
941 &quot;step&quot;: &quot;A String&quot;, # The step of the checkpoint.
942 },
943 ],
944 &quot;endpoint&quot;: &quot;A String&quot;, # Output only. A resource name of an Endpoint. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
945 &quot;model&quot;: &quot;A String&quot;, # Output only. The resource name of the TunedModel. Format: `projects/{project}/locations/{location}/models/{model}@{version_id}` When tuning from a base model, the version ID will be 1. For continuous tuning, if the provided tuned_model_display_name is set and different from parent model&#x27;s display name, the tuned model will have a new parent model with version 1. Otherwise the version id will be incremented by 1 from the last version ID in the parent model. E.g., `projects/{project}/locations/{location}/models/{model}@{last_version_id + 1}`
946 },
947 &quot;tunedModelDisplayName&quot;: &quot;A String&quot;, # Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. For continuous tuning, tuned_model_display_name will by default use the same display name as the pre-tuned model. If a new display name is provided, the tuning job will create a new model instead of a new version.
948 &quot;tuningDataStats&quot;: { # The tuning data statistic values for TuningJob. # Output only. The tuning data statistics associated with this TuningJob.
949 &quot;preferenceOptimizationDataStats&quot;: { # Statistics computed for datasets used for preference optimization. # Output only. Statistics for preference optimization.
950 &quot;droppedExampleIndices&quot;: [ # Output only. A partial sample of the indices (starting from 1) of the dropped examples.
951 &quot;A String&quot;,
952 ],
953 &quot;droppedExampleReasons&quot;: [ # Output only. For each index in `dropped_example_indices`, the user-facing reason why the example was dropped.
954 &quot;A String&quot;,
955 ],
956 &quot;scoreVariancePerExampleDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for scores variance per example.
957 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
958 { # Dataset bucket used to create a histogram for the distribution given a population of values.
959 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
960 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
961 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
962 },
963 ],
964 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
965 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
966 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
967 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
968 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
969 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
970 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
971 },
972 &quot;scoresDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for scores.
973 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
974 { # Dataset bucket used to create a histogram for the distribution given a population of values.
975 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
976 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
977 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
978 },
979 ],
980 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
981 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
982 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
983 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
984 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
985 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
986 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
987 },
988 &quot;totalBillableTokenCount&quot;: &quot;A String&quot;, # Output only. Number of billable tokens in the tuning dataset.
989 &quot;tuningDatasetExampleCount&quot;: &quot;A String&quot;, # Output only. Number of examples in the tuning dataset.
990 &quot;tuningStepCount&quot;: &quot;A String&quot;, # Output only. Number of tuning steps for this Tuning Job.
991 &quot;userDatasetExamples&quot;: [ # Output only. Sample user examples in the training dataset.
992 { # Input example for preference optimization.
993 &quot;completions&quot;: [ # List of completions for a given prompt.
994 { # Completion and its preference score.
995 &quot;completion&quot;: { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message. # Single turn completion for the given prompt.
996 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
997 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
998 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
999 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
1000 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
1001 },
1002 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
1003 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
1004 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
1005 },
1006 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
1007 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
1008 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
1009 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1010 },
1011 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
1012 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
1013 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1014 },
1015 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
1016 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
1017 { # Partial argument value of the function call.
1018 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
1019 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
1020 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
1021 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
1022 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
1023 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
1024 },
1025 ],
1026 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
1027 },
1028 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
1029 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
1030 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
1031 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
1032 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
1033 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
1034 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
1035 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1036 },
1037 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
1038 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
1039 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
1040 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1041 },
1042 },
1043 ],
1044 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
1045 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1046 },
1047 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
1048 },
1049 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
1050 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
1051 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
1052 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1053 },
1054 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
1055 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
1056 },
1057 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
1058 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
1059 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
1060 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
1061 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
1062 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
1063 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
1064 },
1065 },
1066 ],
1067 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
1068 },
1069 &quot;score&quot;: 3.14, # The score for the given completion.
1070 },
1071 ],
1072 &quot;contents&quot;: [ # Multi-turn contents that represents the Prompt.
1073 { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message.
1074 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
1075 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
1076 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
1077 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
1078 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
1079 },
1080 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
1081 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
1082 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
1083 },
1084 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
1085 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
1086 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
1087 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1088 },
1089 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
1090 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
1091 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1092 },
1093 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
1094 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
1095 { # Partial argument value of the function call.
1096 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
1097 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
1098 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
1099 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
1100 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
1101 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
1102 },
1103 ],
1104 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
1105 },
1106 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
1107 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
1108 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
1109 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
1110 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
1111 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
1112 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
1113 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1114 },
1115 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
1116 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
1117 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
1118 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1119 },
1120 },
1121 ],
1122 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
1123 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1124 },
1125 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
1126 },
1127 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
1128 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
1129 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
1130 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1131 },
1132 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
1133 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
1134 },
1135 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
1136 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
1137 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
1138 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
1139 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
1140 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
1141 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
1142 },
1143 },
1144 ],
1145 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
1146 },
1147 ],
1148 },
1149 ],
1150 &quot;userInputTokenDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for the user input tokens.
1151 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
1152 { # Dataset bucket used to create a histogram for the distribution given a population of values.
1153 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
1154 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
1155 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
1156 },
1157 ],
1158 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
1159 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
1160 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
1161 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
1162 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
1163 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
1164 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
1165 },
1166 &quot;userOutputTokenDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for the user output tokens.
1167 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
1168 { # Dataset bucket used to create a histogram for the distribution given a population of values.
1169 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
1170 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
1171 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
1172 },
1173 ],
1174 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
1175 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
1176 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
1177 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
1178 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
1179 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
1180 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
1181 },
1182 },
1183 &quot;supervisedTuningDataStats&quot;: { # Tuning data statistics for Supervised Tuning. # The SFT Tuning data stats.
1184 &quot;droppedExampleReasons&quot;: [ # Output only. For each index in `truncated_example_indices`, the user-facing reason why the example was dropped.
1185 &quot;A String&quot;,
1186 ],
1187 &quot;totalBillableCharacterCount&quot;: &quot;A String&quot;, # Output only. Number of billable characters in the tuning dataset.
1188 &quot;totalBillableTokenCount&quot;: &quot;A String&quot;, # Output only. Number of billable tokens in the tuning dataset.
1189 &quot;totalTruncatedExampleCount&quot;: &quot;A String&quot;, # Output only. The number of examples in the dataset that have been dropped. An example can be dropped for reasons including: too many tokens, contains an invalid image, contains too many images, etc.
1190 &quot;totalTuningCharacterCount&quot;: &quot;A String&quot;, # Output only. Number of tuning characters in the tuning dataset.
1191 &quot;truncatedExampleIndices&quot;: [ # Output only. A partial sample of the indices (starting from 1) of the dropped examples.
1192 &quot;A String&quot;,
1193 ],
1194 &quot;tuningDatasetExampleCount&quot;: &quot;A String&quot;, # Output only. Number of examples in the tuning dataset.
1195 &quot;tuningStepCount&quot;: &quot;A String&quot;, # Output only. Number of tuning steps for this Tuning Job.
1196 &quot;userDatasetExamples&quot;: [ # Output only. Sample user messages in the training dataset uri.
1197 { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message.
1198 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
1199 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
1200 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
1201 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
1202 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
1203 },
1204 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
1205 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
1206 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
1207 },
1208 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
1209 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
1210 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
1211 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1212 },
1213 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
1214 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
1215 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1216 },
1217 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
1218 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
1219 { # Partial argument value of the function call.
1220 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
1221 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
1222 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
1223 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
1224 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
1225 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
1226 },
1227 ],
1228 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
1229 },
1230 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
1231 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
1232 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
1233 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
1234 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
1235 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
1236 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
1237 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1238 },
1239 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
1240 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
1241 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
1242 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1243 },
1244 },
1245 ],
1246 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
1247 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1248 },
1249 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
1250 },
1251 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
1252 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
1253 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
1254 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1255 },
1256 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
1257 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
1258 },
1259 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
1260 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
1261 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
1262 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
1263 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
1264 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
1265 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
1266 },
1267 },
1268 ],
1269 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
1270 },
1271 ],
1272 &quot;userInputTokenDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the user input tokens.
1273 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
1274 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
1275 { # Dataset bucket used to create a histogram for the distribution given a population of values.
1276 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
1277 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
1278 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
1279 },
1280 ],
1281 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
1282 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
1283 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
1284 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
1285 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
1286 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
1287 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
1288 },
1289 &quot;userMessagePerExampleDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the messages per example.
1290 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
1291 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
1292 { # Dataset bucket used to create a histogram for the distribution given a population of values.
1293 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
1294 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
1295 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
1296 },
1297 ],
1298 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
1299 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
1300 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
1301 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
1302 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
1303 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
1304 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
1305 },
1306 &quot;userOutputTokenDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the user output tokens.
1307 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
1308 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
1309 { # Dataset bucket used to create a histogram for the distribution given a population of values.
1310 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
1311 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
1312 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
1313 },
1314 ],
1315 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
1316 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
1317 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
1318 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
1319 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
1320 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
1321 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
1322 },
1323 },
1324 },
1325 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob was most recently updated.
1326 }
1327
1328 x__xgafv: string, V1 error format.
1329 Allowed values
1330 1 - v1 error format
1331 2 - v2 error format
1332
1333 Returns:
1334 An object of the form:
1335
1336 { # Represents a TuningJob that runs with Google owned models.
1337 &quot;baseModel&quot;: &quot;A String&quot;, # The base model that is being tuned. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).
1338 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob was created.
1339 &quot;description&quot;: &quot;A String&quot;, # Optional. The description of the TuningJob.
1340 &quot;encryptionSpec&quot;: { # Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. # Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key.
1341 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Resource name of the Cloud KMS key used to protect the resource. The Cloud KMS key must be in the same region as the resource. It must have the format `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
1342 },
1343 &quot;endTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob entered any of the following JobStates: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
1344 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when job&#x27;s state is `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
1345 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1346 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
1347 {
1348 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1349 },
1350 ],
1351 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
1352 },
1353 &quot;evaluateDatasetRuns&quot;: [ # Output only. Evaluation runs for the Tuning Job.
1354 { # Evaluate Dataset Run Result for Tuning Job.
1355 &quot;checkpointId&quot;: &quot;A String&quot;, # Output only. The checkpoint id used in the evaluation run. Only populated when evaluating checkpoints.
1356 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The error of the evaluation run if any.
1357 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1358 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
1359 {
1360 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1361 },
1362 ],
1363 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
1364 },
1365 &quot;evaluateDatasetResponse&quot;: { # The results from an evaluation run performed by the EvaluationService. # Output only. Results for EvaluationService.
1366 &quot;aggregationOutput&quot;: { # The aggregation result for the entire dataset and all metrics. # Output only. Aggregation statistics derived from results of EvaluationService.
1367 &quot;aggregationResults&quot;: [ # One AggregationResult per metric.
1368 { # The aggregation result for a single metric.
1369 &quot;aggregationMetric&quot;: &quot;A String&quot;, # Aggregation metric.
1370 &quot;bleuMetricValue&quot;: { # Bleu metric value for an instance. # Results for bleu metric.
1371 &quot;score&quot;: 3.14, # Output only. Bleu score.
1372 },
1373 &quot;customCodeExecutionResult&quot;: { # Result for custom code execution metric. # Result for code execution metric.
1374 &quot;score&quot;: 3.14, # Output only. Custom code execution score.
1375 },
1376 &quot;exactMatchMetricValue&quot;: { # Exact match metric value for an instance. # Results for exact match metric.
1377 &quot;score&quot;: 3.14, # Output only. Exact match score.
1378 },
1379 &quot;pairwiseMetricResult&quot;: { # Spec for pairwise metric result. # Result for pairwise metric.
1380 &quot;customOutput&quot;: { # Spec for custom output. # Output only. Spec for custom output.
1381 &quot;rawOutputs&quot;: { # Raw output. # Output only. List of raw output strings.
1382 &quot;rawOutput&quot;: [ # Output only. Raw output string.
1383 &quot;A String&quot;,
1384 ],
1385 },
1386 },
1387 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for pairwise metric score.
1388 &quot;pairwiseChoice&quot;: &quot;A String&quot;, # Output only. Pairwise metric choice.
1389 },
1390 &quot;pointwiseMetricResult&quot;: { # Spec for pointwise metric result. # Result for pointwise metric.
1391 &quot;customOutput&quot;: { # Spec for custom output. # Output only. Spec for custom output.
1392 &quot;rawOutputs&quot;: { # Raw output. # Output only. List of raw output strings.
1393 &quot;rawOutput&quot;: [ # Output only. Raw output string.
1394 &quot;A String&quot;,
1395 ],
1396 },
1397 },
1398 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for pointwise metric score.
1399 &quot;score&quot;: 3.14, # Output only. Pointwise metric score.
1400 },
1401 &quot;rougeMetricValue&quot;: { # Rouge metric value for an instance. # Results for rouge metric.
1402 &quot;score&quot;: 3.14, # Output only. Rouge score.
1403 },
1404 },
1405 ],
1406 &quot;dataset&quot;: { # The dataset used for evaluation. # The dataset used for evaluation &amp; aggregation.
1407 &quot;bigquerySource&quot;: { # The BigQuery location for the input content. # BigQuery source holds the dataset.
1408 &quot;inputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
1409 },
1410 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Cloud storage source holds the dataset. Currently only one Cloud Storage file path is supported.
1411 &quot;uris&quot;: [ # Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/wildcards.
1412 &quot;A String&quot;,
1413 ],
1414 },
1415 },
1416 },
1417 &quot;outputInfo&quot;: { # Describes the info for output of EvaluationService. # Output only. Output info for EvaluationService.
1418 &quot;gcsOutputDirectory&quot;: &quot;A String&quot;, # Output only. The full path of the Cloud Storage directory created, into which the evaluation results and aggregation results are written.
1419 },
1420 },
1421 &quot;evaluationRun&quot;: &quot;A String&quot;, # Output only. The resource name of the evaluation run. Format: `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`.
1422 &quot;operationName&quot;: &quot;A String&quot;, # Output only. Deprecated: The updated architecture uses evaluation_run instead.
1423 },
1424 ],
1425 &quot;experiment&quot;: &quot;A String&quot;, # Output only. The Experiment associated with this TuningJob.
1426 &quot;labels&quot;: { # Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
1427 &quot;a_key&quot;: &quot;A String&quot;,
1428 },
1429 &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. Resource name of a TuningJob. Format: `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
1430 &quot;preTunedModel&quot;: { # A pre-tuned model for continuous tuning. # The pre-tuned model for continuous tuning.
1431 &quot;baseModel&quot;: &quot;A String&quot;, # Output only. The name of the base model this PreTunedModel was tuned from.
1432 &quot;checkpointId&quot;: &quot;A String&quot;, # Optional. The source checkpoint id. If not specified, the default checkpoint will be used.
1433 &quot;tunedModelName&quot;: &quot;A String&quot;, # The resource name of the Model. E.g., a model resource name with a specified version id or alias: `projects/{project}/locations/{location}/models/{model}@{version_id}` `projects/{project}/locations/{location}/models/{model}@{alias}` Or, omit the version id to use the default version: `projects/{project}/locations/{location}/models/{model}`
1434 },
1435 &quot;preferenceOptimizationSpec&quot;: { # Tuning Spec for Preference Optimization. # Tuning Spec for Preference Optimization.
1436 &quot;exportLastCheckpointOnly&quot;: True or False, # Optional. If set to true, disable intermediate checkpoints for Preference Optimization and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for Preference Optimization. Default is false.
1437 &quot;hyperParameters&quot;: { # Hyperparameters for Preference Optimization. # Optional. Hyperparameters for Preference Optimization.
1438 &quot;adapterSize&quot;: &quot;A String&quot;, # Optional. Adapter size for preference optimization.
1439 &quot;beta&quot;: 3.14, # Optional. Weight for KL Divergence regularization.
1440 &quot;epochCount&quot;: &quot;A String&quot;, # Optional. Number of complete passes the model makes over the entire training dataset during training.
1441 &quot;learningRateMultiplier&quot;: 3.14, # Optional. Multiplier for adjusting the default learning rate.
1442 },
1443 &quot;trainingDatasetUri&quot;: &quot;A String&quot;, # Required. Cloud Storage path to file containing training dataset for preference optimization tuning. The dataset must be formatted as a JSONL file.
1444 &quot;validationDatasetUri&quot;: &quot;A String&quot;, # Optional. Cloud Storage path to file containing validation dataset for preference optimization tuning. The dataset must be formatted as a JSONL file.
1445 },
1446 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent Users starting the pipeline must have the `iam.serviceAccounts.actAs` permission on this service account.
1447 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob for the first time entered the `JOB_STATE_RUNNING` state.
1448 &quot;state&quot;: &quot;A String&quot;, # Output only. The detailed state of the job.
1449 &quot;supervisedTuningSpec&quot;: { # Tuning Spec for Supervised Tuning for first party models. # Tuning Spec for Supervised Fine Tuning.
1450 &quot;evaluationConfig&quot;: { # Evaluation Config for Tuning Job. # Optional. Evaluation Config for Tuning Job.
1451 &quot;autoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Autorater config for evaluation.
1452 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
1453 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
1454 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
1455 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
1456 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
1457 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
1458 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
1459 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
1460 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
1461 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
1462 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
1463 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
1464 },
1465 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
1466 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
1467 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
1468 },
1469 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
1470 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
1471 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
1472 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
1473 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
1474 { # Configuration for the model to configure output formatting and delivery.
1475 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
1476 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
1477 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1478 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
1479 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
1480 },
1481 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
1482 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
1483 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1484 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
1485 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
1486 },
1487 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
1488 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
1489 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
1490 },
1491 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
1492 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
1493 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1494 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
1495 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
1496 },
1497 },
1498 ],
1499 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
1500 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
1501 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
1502 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
1503 &quot;A String&quot;,
1504 ],
1505 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
1506 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
1507 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
1508 # Object with schema name: GoogleCloudAiplatformV1Schema
1509 ],
1510 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
1511 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
1512 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
1513 },
1514 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
1515 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
1516 &quot;A String&quot;,
1517 ],
1518 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
1519 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
1520 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
1521 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
1522 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
1523 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
1524 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
1525 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
1526 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
1527 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
1528 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
1529 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
1530 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
1531 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
1532 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
1533 },
1534 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
1535 &quot;A String&quot;,
1536 ],
1537 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
1538 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
1539 &quot;A String&quot;,
1540 ],
1541 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
1542 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
1543 },
1544 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
1545 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
1546 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
1547 },
1548 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
1549 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
1550 },
1551 },
1552 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
1553 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
1554 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
1555 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
1556 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
1557 { # Configuration for a single speaker in a multi-speaker setup.
1558 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
1559 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
1560 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
1561 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
1562 },
1563 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
1564 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
1565 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
1566 },
1567 },
1568 },
1569 ],
1570 },
1571 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
1572 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
1573 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
1574 },
1575 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
1576 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
1577 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
1578 },
1579 },
1580 },
1581 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
1582 &quot;A String&quot;,
1583 ],
1584 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
1585 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
1586 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
1587 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
1588 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
1589 },
1590 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
1591 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
1592 },
1593 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
1594 },
1595 &quot;datasetCustomMetrics&quot;: [ # Optional. Specifications for custom dataset-level aggregations.
1596 { # Defines a custom dataset-level aggregation.
1597 &quot;aggregationFunction&quot;: &quot;A String&quot;, # Required. The Python code string containing the aggregation function. Expected function signature: `def aggregate(instances: list[dict[str, Any]]) -&gt; dict[str, float]:` The `instances` argument is a list of dictionaries, where each dictionary represents a single evaluation result item. The structure of each dictionary corresponds to the fields in the `EvaluationResult` message. This includes: - `&quot;request&quot;`: Contains the original input data and model inputs (from `EvaluationResult.EvaluationRequest`). - `&quot;candidate_results&quot;`: Contains the results of any instance-level metrics (from `EvaluationResult.CandidateResults`). Example of a single item in the `instances` list: { &quot;request&quot;: { &quot;prompt&quot;: {&quot;text&quot;: &quot;What is the capital of France?&quot;}, &quot;golden_response&quot;: {&quot;text&quot;: &quot;Paris&quot;}, &quot;candidate_responses&quot;: [{&quot;candidate&quot;: &quot;model-v1&quot;, &quot;text&quot;: &quot;Paris&quot;}] }, &quot;candidate_results&quot;: [ {&quot;metric&quot;: &quot;exact_match&quot;, &quot;score&quot;: 1.0}, {&quot;metric&quot;: &quot;bleu&quot;, &quot;score&quot;: 0.9} ] }
1598 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A display name for this custom summary metric. Used to prefix keys in the output summaryMetrics map. If not provided, a default name like &quot;dataset_custom_metric_1&quot;, &quot;dataset_custom_metric_2&quot;, etc., will be generated based on the order in the repeated field.
1599 },
1600 ],
1601 &quot;inferenceGenerationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for inference generation and outputs. If not set, default generation parameters are used.
1602 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
1603 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
1604 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
1605 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
1606 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
1607 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
1608 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
1609 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
1610 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
1611 },
1612 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
1613 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
1614 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
1615 },
1616 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
1617 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
1618 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
1619 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
1620 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
1621 { # Configuration for the model to configure output formatting and delivery.
1622 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
1623 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
1624 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1625 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
1626 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
1627 },
1628 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
1629 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
1630 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1631 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
1632 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
1633 },
1634 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
1635 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
1636 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
1637 },
1638 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
1639 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
1640 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1641 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
1642 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
1643 },
1644 },
1645 ],
1646 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
1647 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
1648 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
1649 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
1650 &quot;A String&quot;,
1651 ],
1652 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
1653 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
1654 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
1655 # Object with schema name: GoogleCloudAiplatformV1Schema
1656 ],
1657 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
1658 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
1659 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
1660 },
1661 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
1662 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
1663 &quot;A String&quot;,
1664 ],
1665 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
1666 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
1667 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
1668 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
1669 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
1670 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
1671 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
1672 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
1673 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
1674 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
1675 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
1676 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
1677 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
1678 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
1679 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
1680 },
1681 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
1682 &quot;A String&quot;,
1683 ],
1684 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
1685 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
1686 &quot;A String&quot;,
1687 ],
1688 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
1689 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
1690 },
1691 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
1692 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
1693 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
1694 },
1695 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
1696 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
1697 },
1698 },
1699 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
1700 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
1701 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
1702 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
1703 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
1704 { # Configuration for a single speaker in a multi-speaker setup.
1705 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
1706 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
1707 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
1708 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
1709 },
1710 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
1711 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
1712 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
1713 },
1714 },
1715 },
1716 ],
1717 },
1718 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
1719 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
1720 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
1721 },
1722 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
1723 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
1724 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
1725 },
1726 },
1727 },
1728 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
1729 &quot;A String&quot;,
1730 ],
1731 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
1732 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
1733 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
1734 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
1735 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
1736 },
1737 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
1738 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
1739 },
1740 &quot;metrics&quot;: [ # Required. The metrics used for evaluation.
1741 { # The metric used for running evaluations.
1742 &quot;aggregationMetrics&quot;: [ # Optional. The aggregation metrics to use.
1743 &quot;A String&quot;,
1744 ],
1745 &quot;bleuSpec&quot;: { # Spec for bleu score metric - calculates the precision of n-grams in the prediction as compared to reference - returns a score ranging between 0 to 1. # Spec for bleu metric.
1746 &quot;useEffectiveOrder&quot;: True or False, # Optional. Whether to use_effective_order to compute bleu score.
1747 },
1748 &quot;computationBasedMetricSpec&quot;: { # Specification for a computation based metric. # Spec for a computation based metric.
1749 &quot;parameters&quot;: { # Optional. A map of parameters for the metric, e.g. {&quot;rouge_type&quot;: &quot;rougeL&quot;}.
1750 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1751 },
1752 &quot;type&quot;: &quot;A String&quot;, # Required. The type of the computation based metric.
1753 },
1754 &quot;customCodeExecutionSpec&quot;: { # Specificies a metric that is populated by evaluating user-defined Python code. # Spec for Custom Code Execution metric.
1755 &quot;evaluationFunction&quot;: &quot;A String&quot;, # Required. Python function. Expected user to define the following function, e.g.: def evaluate(instance: dict[str, Any]) -&gt; float: Please include this function signature in the code snippet. Instance is the evaluation instance, any fields populated in the instance are available to the function as instance[field_name]. Example: Example input: ``` instance= EvaluationInstance( response=EvaluationInstance.InstanceData(text=&quot;The answer is 4.&quot;), reference=EvaluationInstance.InstanceData(text=&quot;4&quot;) ) ``` Example converted input: ``` { &#x27;response&#x27;: {&#x27;text&#x27;: &#x27;The answer is 4.&#x27;}, &#x27;reference&#x27;: {&#x27;text&#x27;: &#x27;4&#x27;} } ``` Example python function: ``` def evaluate(instance: dict[str, Any]) -&gt; float: if instance&#x27;response&#x27; == instance&#x27;reference&#x27;: return 1.0 return 0.0 ``` CustomCodeExecutionSpec is also supported in Batch Evaluation (EvalDataset RPC) and Tuning Evaluation. Each line in the input jsonl file will be converted to dict[str, Any] and passed to the evaluation function.
1756 },
1757 &quot;exactMatchSpec&quot;: { # Spec for exact match metric - returns 1 if prediction and reference exactly matches, otherwise 0. # Spec for exact match metric.
1758 },
1759 &quot;llmBasedMetricSpec&quot;: { # Specification for an LLM based metric. # Spec for an LLM based metric.
1760 &quot;additionalConfig&quot;: { # Optional. Optional additional configuration for the metric.
1761 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1762 },
1763 &quot;judgeAutoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Optional configuration for the judge LLM (Autorater).
1764 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
1765 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
1766 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
1767 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
1768 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
1769 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
1770 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
1771 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
1772 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
1773 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
1774 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
1775 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
1776 },
1777 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
1778 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
1779 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
1780 },
1781 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
1782 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
1783 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
1784 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
1785 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
1786 { # Configuration for the model to configure output formatting and delivery.
1787 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
1788 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
1789 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1790 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
1791 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
1792 },
1793 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
1794 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
1795 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1796 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
1797 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
1798 },
1799 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
1800 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
1801 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
1802 },
1803 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
1804 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
1805 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1806 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
1807 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
1808 },
1809 },
1810 ],
1811 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
1812 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
1813 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
1814 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
1815 &quot;A String&quot;,
1816 ],
1817 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
1818 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
1819 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
1820 # Object with schema name: GoogleCloudAiplatformV1Schema
1821 ],
1822 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
1823 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
1824 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
1825 },
1826 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
1827 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
1828 &quot;A String&quot;,
1829 ],
1830 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
1831 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
1832 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
1833 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
1834 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
1835 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
1836 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
1837 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
1838 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
1839 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
1840 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
1841 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
1842 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
1843 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
1844 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
1845 },
1846 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
1847 &quot;A String&quot;,
1848 ],
1849 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
1850 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
1851 &quot;A String&quot;,
1852 ],
1853 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
1854 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
1855 },
1856 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
1857 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
1858 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
1859 },
1860 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
1861 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
1862 },
1863 },
1864 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
1865 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
1866 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
1867 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
1868 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
1869 { # Configuration for a single speaker in a multi-speaker setup.
1870 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
1871 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
1872 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
1873 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
1874 },
1875 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
1876 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
1877 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
1878 },
1879 },
1880 },
1881 ],
1882 },
1883 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
1884 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
1885 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
1886 },
1887 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
1888 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
1889 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
1890 },
1891 },
1892 },
1893 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
1894 &quot;A String&quot;,
1895 ],
1896 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
1897 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
1898 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
1899 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
1900 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
1901 },
1902 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
1903 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
1904 },
1905 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
1906 },
1907 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Template for the prompt sent to the judge model.
1908 &quot;predefinedRubricGenerationSpec&quot;: { # The spec for a pre-defined metric. # Dynamically generate rubrics using a predefined spec.
1909 &quot;metricSpecName&quot;: &quot;A String&quot;, # Required. The name of a pre-defined metric, such as &quot;instruction_following_v1&quot; or &quot;text_quality_v1&quot;.
1910 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
1911 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1912 },
1913 },
1914 &quot;resultParserConfig&quot;: { # Config for parsing LLM responses. It can be used to parse the LLM response to be evaluated, or the LLM response from LLM-based metrics/Autoraters. # Optional. The parser config for the metric result.
1915 &quot;customCodeParserConfig&quot;: { # Configuration for parsing the LLM response using custom code. # Optional. Use custom code to parse the LLM response.
1916 &quot;parsingFunction&quot;: &quot;A String&quot;, # Required. Python function for parsing results. The function should be defined within this string. The function takes a list of strings (LLM responses) and should return either a list of dictionaries (for rubrics) or a single dictionary (for a metric result). Example function signature: def parse(responses: list[str]) -&gt; list[dict[str, Any]] | dict[str, Any]: When parsing rubrics, return a list of dictionaries, where each dictionary represents a Rubric. Example for rubrics: [ { &quot;content&quot;: {&quot;property&quot;: {&quot;description&quot;: &quot;The response is factual.&quot;}}, &quot;type&quot;: &quot;FACTUALITY&quot;, &quot;importance&quot;: &quot;HIGH&quot; }, { &quot;content&quot;: {&quot;property&quot;: {&quot;description&quot;: &quot;The response is fluent.&quot;}}, &quot;type&quot;: &quot;FLUENCY&quot;, &quot;importance&quot;: &quot;MEDIUM&quot; } ] When parsing critique results, return a dictionary representing a MetricResult. Example for a metric result: { &quot;score&quot;: 0.8, &quot;explanation&quot;: &quot;The model followed most instructions.&quot;, &quot;rubric_verdicts&quot;: [...] } ... code for result extraction and aggregation
1917 },
1918 },
1919 &quot;rubricGenerationSpec&quot;: { # Specification for how rubrics should be generated. # Dynamically generate rubrics using this specification.
1920 &quot;modelConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Configuration for the model used in rubric generation. Configs including sampling count and base model can be specified here. Flipping is not supported for rubric generation.
1921 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
1922 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
1923 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
1924 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
1925 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
1926 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
1927 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
1928 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
1929 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
1930 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
1931 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
1932 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
1933 },
1934 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
1935 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
1936 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
1937 },
1938 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
1939 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
1940 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
1941 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
1942 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
1943 { # Configuration for the model to configure output formatting and delivery.
1944 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
1945 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
1946 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1947 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
1948 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
1949 },
1950 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
1951 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
1952 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1953 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
1954 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
1955 },
1956 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
1957 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
1958 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
1959 },
1960 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
1961 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
1962 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1963 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
1964 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
1965 },
1966 },
1967 ],
1968 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
1969 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
1970 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
1971 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
1972 &quot;A String&quot;,
1973 ],
1974 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
1975 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
1976 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
1977 # Object with schema name: GoogleCloudAiplatformV1Schema
1978 ],
1979 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
1980 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
1981 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
1982 },
1983 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
1984 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
1985 &quot;A String&quot;,
1986 ],
1987 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
1988 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
1989 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
1990 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
1991 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
1992 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
1993 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
1994 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
1995 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
1996 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
1997 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
1998 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
1999 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
2000 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
2001 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
2002 },
2003 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
2004 &quot;A String&quot;,
2005 ],
2006 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
2007 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
2008 &quot;A String&quot;,
2009 ],
2010 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
2011 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
2012 },
2013 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
2014 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
2015 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
2016 },
2017 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
2018 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
2019 },
2020 },
2021 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
2022 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
2023 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
2024 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
2025 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
2026 { # Configuration for a single speaker in a multi-speaker setup.
2027 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
2028 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
2029 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
2030 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
2031 },
2032 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
2033 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
2034 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
2035 },
2036 },
2037 },
2038 ],
2039 },
2040 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
2041 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
2042 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
2043 },
2044 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
2045 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
2046 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
2047 },
2048 },
2049 },
2050 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
2051 &quot;A String&quot;,
2052 ],
2053 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
2054 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
2055 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
2056 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
2057 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
2058 },
2059 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
2060 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
2061 },
2062 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
2063 },
2064 &quot;promptTemplate&quot;: &quot;A String&quot;, # Template for the prompt used to generate rubrics. The details should be updated based on the most-recent recipe requirements.
2065 &quot;rubricContentType&quot;: &quot;A String&quot;, # The type of rubric content to be generated.
2066 &quot;rubricTypeOntology&quot;: [ # Optional. An optional, pre-defined list of allowed types for generated rubrics. If this field is provided, it implies `include_rubric_type` should be true, and the generated rubric types should be chosen from this ontology.
2067 &quot;A String&quot;,
2068 ],
2069 },
2070 &quot;rubricGroupKey&quot;: &quot;A String&quot;, # Use a pre-defined group of rubrics associated with the input. Refers to a key in the rubric_groups map of EvaluationInstance.
2071 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for the judge model.
2072 },
2073 &quot;metadata&quot;: { # Metadata about the metric, used for visualization and organization. # Optional. Metadata about the metric, used for visualization and organization.
2074 &quot;otherMetadata&quot;: { # Optional. Flexible metadata for user-defined attributes.
2075 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2076 },
2077 &quot;scoreRange&quot;: { # The range of possible scores for this metric, used for plotting. # Optional. The range of possible scores for this metric, used for plotting.
2078 &quot;description&quot;: &quot;A String&quot;, # Optional. The description of the score explaining the directionality etc.
2079 &quot;max&quot;: 3.14, # Required. The maximum value of the score range (inclusive).
2080 &quot;min&quot;: 3.14, # Required. The minimum value of the score range (inclusive).
2081 &quot;step&quot;: 3.14, # Optional. The distance between discrete steps in the range. If unset, the range is assumed to be continuous.
2082 },
2083 &quot;title&quot;: &quot;A String&quot;, # Optional. The user-friendly name for the metric. If not set for a registered metric, it will default to the metric&#x27;s display name.
2084 },
2085 &quot;pairwiseMetricSpec&quot;: { # Spec for pairwise metric. # Spec for pairwise metric.
2086 &quot;baselineResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the baseline response.
2087 &quot;candidateResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the candidate response.
2088 &quot;customOutputFormatConfig&quot;: { # Spec for custom output format configuration. # Optional. CustomOutputFormatConfig allows customization of metric output. When this config is set, the default output is replaced with the raw output string. If a custom format is chosen, the `pairwise_choice` and `explanation` fields in the corresponding metric result will be empty.
2089 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
2090 },
2091 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pairwise metric.
2092 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pairwise metric.
2093 },
2094 &quot;pointwiseMetricSpec&quot;: { # Spec for pointwise metric. # Spec for pointwise metric.
2095 &quot;customOutputFormatConfig&quot;: { # Spec for custom output format configuration. # Optional. CustomOutputFormatConfig allows customization of metric output. By default, metrics return a score and explanation. When this config is set, the default output is replaced with either: - The raw output string. - A parsed output based on a user-defined schema. If a custom format is chosen, the `score` and `explanation` fields in the corresponding metric result will be empty.
2096 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
2097 },
2098 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pointwise metric.
2099 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pointwise metric.
2100 },
2101 &quot;predefinedMetricSpec&quot;: { # The spec for a pre-defined metric. # The spec for a pre-defined metric.
2102 &quot;metricSpecName&quot;: &quot;A String&quot;, # Required. The name of a pre-defined metric, such as &quot;instruction_following_v1&quot; or &quot;text_quality_v1&quot;.
2103 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
2104 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2105 },
2106 },
2107 &quot;rougeSpec&quot;: { # Spec for rouge score metric - calculates the recall of n-grams in prediction as compared to reference - returns a score ranging between 0 and 1. # Spec for rouge metric.
2108 &quot;rougeType&quot;: &quot;A String&quot;, # Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum.
2109 &quot;splitSummaries&quot;: True or False, # Optional. Whether to split summaries while using rougeLsum.
2110 &quot;useStemmer&quot;: True or False, # Optional. Whether to use stemmer to compute rouge score.
2111 },
2112 },
2113 ],
2114 &quot;outputConfig&quot;: { # Config for evaluation output. # Required. Config for evaluation output.
2115 &quot;gcsDestination&quot;: { # The Google Cloud Storage location where the output is to be written to. # Cloud storage destination for evaluation output.
2116 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
2117 },
2118 },
2119 },
2120 &quot;exportLastCheckpointOnly&quot;: True or False, # Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. Default is false.
2121 &quot;hyperParameters&quot;: { # Hyperparameters for SFT. # Optional. Hyperparameters for SFT.
2122 &quot;adapterSize&quot;: &quot;A String&quot;, # Optional. Adapter size for tuning.
2123 &quot;epochCount&quot;: &quot;A String&quot;, # Optional. Number of complete passes the model makes over the entire training dataset during training.
2124 &quot;learningRateMultiplier&quot;: 3.14, # Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. This feature is only available for 1P models.
2125 },
2126 &quot;trainingDatasetUri&quot;: &quot;A String&quot;, # Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
2127 &quot;validationDatasetUri&quot;: &quot;A String&quot;, # Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
2128 },
2129 &quot;tunedModel&quot;: { # The Model Registry Model and Online Prediction Endpoint associated with this TuningJob. # Output only. The tuned model resources associated with this TuningJob.
2130 &quot;checkpoints&quot;: [ # Output only. The checkpoints associated with this TunedModel. This field is only populated for tuning jobs that enable intermediate checkpoints.
2131 { # TunedModelCheckpoint for the Tuned Model of a Tuning Job.
2132 &quot;checkpointId&quot;: &quot;A String&quot;, # The ID of the checkpoint.
2133 &quot;endpoint&quot;: &quot;A String&quot;, # The Endpoint resource name that the checkpoint is deployed to. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
2134 &quot;epoch&quot;: &quot;A String&quot;, # The epoch of the checkpoint.
2135 &quot;step&quot;: &quot;A String&quot;, # The step of the checkpoint.
2136 },
2137 ],
2138 &quot;endpoint&quot;: &quot;A String&quot;, # Output only. A resource name of an Endpoint. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
2139 &quot;model&quot;: &quot;A String&quot;, # Output only. The resource name of the TunedModel. Format: `projects/{project}/locations/{location}/models/{model}@{version_id}` When tuning from a base model, the version ID will be 1. For continuous tuning, if the provided tuned_model_display_name is set and different from parent model&#x27;s display name, the tuned model will have a new parent model with version 1. Otherwise the version id will be incremented by 1 from the last version ID in the parent model. E.g., `projects/{project}/locations/{location}/models/{model}@{last_version_id + 1}`
2140 },
2141 &quot;tunedModelDisplayName&quot;: &quot;A String&quot;, # Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. For continuous tuning, tuned_model_display_name will by default use the same display name as the pre-tuned model. If a new display name is provided, the tuning job will create a new model instead of a new version.
2142 &quot;tuningDataStats&quot;: { # The tuning data statistic values for TuningJob. # Output only. The tuning data statistics associated with this TuningJob.
2143 &quot;preferenceOptimizationDataStats&quot;: { # Statistics computed for datasets used for preference optimization. # Output only. Statistics for preference optimization.
2144 &quot;droppedExampleIndices&quot;: [ # Output only. A partial sample of the indices (starting from 1) of the dropped examples.
2145 &quot;A String&quot;,
2146 ],
2147 &quot;droppedExampleReasons&quot;: [ # Output only. For each index in `dropped_example_indices`, the user-facing reason why the example was dropped.
2148 &quot;A String&quot;,
2149 ],
2150 &quot;scoreVariancePerExampleDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for scores variance per example.
2151 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
2152 { # Dataset bucket used to create a histogram for the distribution given a population of values.
2153 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
2154 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
2155 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
2156 },
2157 ],
2158 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
2159 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
2160 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
2161 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
2162 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
2163 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
2164 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
2165 },
2166 &quot;scoresDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for scores.
2167 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
2168 { # Dataset bucket used to create a histogram for the distribution given a population of values.
2169 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
2170 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
2171 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
2172 },
2173 ],
2174 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
2175 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
2176 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
2177 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
2178 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
2179 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
2180 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
2181 },
2182 &quot;totalBillableTokenCount&quot;: &quot;A String&quot;, # Output only. Number of billable tokens in the tuning dataset.
2183 &quot;tuningDatasetExampleCount&quot;: &quot;A String&quot;, # Output only. Number of examples in the tuning dataset.
2184 &quot;tuningStepCount&quot;: &quot;A String&quot;, # Output only. Number of tuning steps for this Tuning Job.
2185 &quot;userDatasetExamples&quot;: [ # Output only. Sample user examples in the training dataset.
2186 { # Input example for preference optimization.
2187 &quot;completions&quot;: [ # List of completions for a given prompt.
2188 { # Completion and its preference score.
2189 &quot;completion&quot;: { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message. # Single turn completion for the given prompt.
2190 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
2191 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
2192 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
2193 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
2194 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
2195 },
2196 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
2197 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
2198 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
2199 },
2200 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
2201 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
2202 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
2203 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2204 },
2205 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
2206 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
2207 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2208 },
2209 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
2210 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
2211 { # Partial argument value of the function call.
2212 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
2213 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
2214 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
2215 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
2216 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
2217 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
2218 },
2219 ],
2220 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
2221 },
2222 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
2223 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
2224 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
2225 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
2226 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
2227 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
2228 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
2229 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2230 },
2231 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
2232 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
2233 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
2234 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2235 },
2236 },
2237 ],
2238 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
2239 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2240 },
2241 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
2242 },
2243 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
2244 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
2245 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
2246 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2247 },
2248 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
2249 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
2250 },
2251 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
2252 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
2253 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
2254 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
2255 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
2256 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
2257 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
2258 },
2259 },
2260 ],
2261 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
2262 },
2263 &quot;score&quot;: 3.14, # The score for the given completion.
2264 },
2265 ],
2266 &quot;contents&quot;: [ # Multi-turn contents that represents the Prompt.
2267 { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message.
2268 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
2269 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
2270 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
2271 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
2272 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
2273 },
2274 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
2275 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
2276 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
2277 },
2278 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
2279 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
2280 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
2281 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2282 },
2283 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
2284 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
2285 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2286 },
2287 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
2288 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
2289 { # Partial argument value of the function call.
2290 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
2291 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
2292 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
2293 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
2294 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
2295 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
2296 },
2297 ],
2298 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
2299 },
2300 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
2301 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
2302 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
2303 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
2304 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
2305 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
2306 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
2307 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2308 },
2309 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
2310 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
2311 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
2312 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2313 },
2314 },
2315 ],
2316 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
2317 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2318 },
2319 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
2320 },
2321 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
2322 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
2323 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
2324 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2325 },
2326 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
2327 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
2328 },
2329 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
2330 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
2331 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
2332 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
2333 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
2334 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
2335 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
2336 },
2337 },
2338 ],
2339 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
2340 },
2341 ],
2342 },
2343 ],
2344 &quot;userInputTokenDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for the user input tokens.
2345 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
2346 { # Dataset bucket used to create a histogram for the distribution given a population of values.
2347 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
2348 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
2349 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
2350 },
2351 ],
2352 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
2353 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
2354 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
2355 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
2356 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
2357 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
2358 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
2359 },
2360 &quot;userOutputTokenDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for the user output tokens.
2361 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
2362 { # Dataset bucket used to create a histogram for the distribution given a population of values.
2363 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
2364 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
2365 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
2366 },
2367 ],
2368 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
2369 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
2370 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
2371 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
2372 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
2373 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
2374 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
2375 },
2376 },
2377 &quot;supervisedTuningDataStats&quot;: { # Tuning data statistics for Supervised Tuning. # The SFT Tuning data stats.
2378 &quot;droppedExampleReasons&quot;: [ # Output only. For each index in `truncated_example_indices`, the user-facing reason why the example was dropped.
2379 &quot;A String&quot;,
2380 ],
2381 &quot;totalBillableCharacterCount&quot;: &quot;A String&quot;, # Output only. Number of billable characters in the tuning dataset.
2382 &quot;totalBillableTokenCount&quot;: &quot;A String&quot;, # Output only. Number of billable tokens in the tuning dataset.
2383 &quot;totalTruncatedExampleCount&quot;: &quot;A String&quot;, # Output only. The number of examples in the dataset that have been dropped. An example can be dropped for reasons including: too many tokens, contains an invalid image, contains too many images, etc.
2384 &quot;totalTuningCharacterCount&quot;: &quot;A String&quot;, # Output only. Number of tuning characters in the tuning dataset.
2385 &quot;truncatedExampleIndices&quot;: [ # Output only. A partial sample of the indices (starting from 1) of the dropped examples.
2386 &quot;A String&quot;,
2387 ],
2388 &quot;tuningDatasetExampleCount&quot;: &quot;A String&quot;, # Output only. Number of examples in the tuning dataset.
2389 &quot;tuningStepCount&quot;: &quot;A String&quot;, # Output only. Number of tuning steps for this Tuning Job.
2390 &quot;userDatasetExamples&quot;: [ # Output only. Sample user messages in the training dataset uri.
2391 { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message.
2392 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
2393 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
2394 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
2395 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
2396 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
2397 },
2398 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
2399 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
2400 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
2401 },
2402 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
2403 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
2404 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
2405 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2406 },
2407 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
2408 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
2409 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2410 },
2411 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
2412 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
2413 { # Partial argument value of the function call.
2414 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
2415 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
2416 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
2417 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
2418 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
2419 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
2420 },
2421 ],
2422 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
2423 },
2424 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
2425 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
2426 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
2427 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
2428 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
2429 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
2430 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
2431 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2432 },
2433 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
2434 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
2435 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
2436 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2437 },
2438 },
2439 ],
2440 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
2441 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2442 },
2443 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
2444 },
2445 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
2446 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
2447 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
2448 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2449 },
2450 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
2451 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
2452 },
2453 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
2454 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
2455 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
2456 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
2457 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
2458 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
2459 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
2460 },
2461 },
2462 ],
2463 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
2464 },
2465 ],
2466 &quot;userInputTokenDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the user input tokens.
2467 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
2468 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
2469 { # Dataset bucket used to create a histogram for the distribution given a population of values.
2470 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
2471 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
2472 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
2473 },
2474 ],
2475 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
2476 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
2477 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
2478 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
2479 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
2480 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
2481 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
2482 },
2483 &quot;userMessagePerExampleDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the messages per example.
2484 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
2485 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
2486 { # Dataset bucket used to create a histogram for the distribution given a population of values.
2487 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
2488 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
2489 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
2490 },
2491 ],
2492 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
2493 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
2494 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
2495 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
2496 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
2497 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
2498 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
2499 },
2500 &quot;userOutputTokenDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the user output tokens.
2501 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
2502 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
2503 { # Dataset bucket used to create a histogram for the distribution given a population of values.
2504 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
2505 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
2506 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
2507 },
2508 ],
2509 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
2510 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
2511 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
2512 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
2513 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
2514 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
2515 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
2516 },
2517 },
2518 },
2519 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob was most recently updated.
2520 }</pre>
2521 </div>
2522
2523 <div class="method">
2524 <code class="details" id="get">get(name, x__xgafv=None)</code>
2525 <pre>Gets a tuning job.
2526
2527 Args:
2528 name: string, Required. The name of the tuning job to retrieve. Format: `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` (required)
2529 x__xgafv: string, V1 error format.
2530 Allowed values
2531 1 - v1 error format
2532 2 - v2 error format
2533
2534 Returns:
2535 An object of the form:
2536
2537 { # Represents a TuningJob that runs with Google owned models.
2538 &quot;baseModel&quot;: &quot;A String&quot;, # The base model that is being tuned. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).
2539 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob was created.
2540 &quot;description&quot;: &quot;A String&quot;, # Optional. The description of the TuningJob.
2541 &quot;encryptionSpec&quot;: { # Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. # Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key.
2542 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Resource name of the Cloud KMS key used to protect the resource. The Cloud KMS key must be in the same region as the resource. It must have the format `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
2543 },
2544 &quot;endTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob entered any of the following JobStates: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
2545 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when job&#x27;s state is `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
2546 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2547 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
2548 {
2549 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2550 },
2551 ],
2552 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
2553 },
2554 &quot;evaluateDatasetRuns&quot;: [ # Output only. Evaluation runs for the Tuning Job.
2555 { # Evaluate Dataset Run Result for Tuning Job.
2556 &quot;checkpointId&quot;: &quot;A String&quot;, # Output only. The checkpoint id used in the evaluation run. Only populated when evaluating checkpoints.
2557 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The error of the evaluation run if any.
2558 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2559 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
2560 {
2561 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2562 },
2563 ],
2564 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
2565 },
2566 &quot;evaluateDatasetResponse&quot;: { # The results from an evaluation run performed by the EvaluationService. # Output only. Results for EvaluationService.
2567 &quot;aggregationOutput&quot;: { # The aggregation result for the entire dataset and all metrics. # Output only. Aggregation statistics derived from results of EvaluationService.
2568 &quot;aggregationResults&quot;: [ # One AggregationResult per metric.
2569 { # The aggregation result for a single metric.
2570 &quot;aggregationMetric&quot;: &quot;A String&quot;, # Aggregation metric.
2571 &quot;bleuMetricValue&quot;: { # Bleu metric value for an instance. # Results for bleu metric.
2572 &quot;score&quot;: 3.14, # Output only. Bleu score.
2573 },
2574 &quot;customCodeExecutionResult&quot;: { # Result for custom code execution metric. # Result for code execution metric.
2575 &quot;score&quot;: 3.14, # Output only. Custom code execution score.
2576 },
2577 &quot;exactMatchMetricValue&quot;: { # Exact match metric value for an instance. # Results for exact match metric.
2578 &quot;score&quot;: 3.14, # Output only. Exact match score.
2579 },
2580 &quot;pairwiseMetricResult&quot;: { # Spec for pairwise metric result. # Result for pairwise metric.
2581 &quot;customOutput&quot;: { # Spec for custom output. # Output only. Spec for custom output.
2582 &quot;rawOutputs&quot;: { # Raw output. # Output only. List of raw output strings.
2583 &quot;rawOutput&quot;: [ # Output only. Raw output string.
2584 &quot;A String&quot;,
2585 ],
2586 },
2587 },
2588 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for pairwise metric score.
2589 &quot;pairwiseChoice&quot;: &quot;A String&quot;, # Output only. Pairwise metric choice.
2590 },
2591 &quot;pointwiseMetricResult&quot;: { # Spec for pointwise metric result. # Result for pointwise metric.
2592 &quot;customOutput&quot;: { # Spec for custom output. # Output only. Spec for custom output.
2593 &quot;rawOutputs&quot;: { # Raw output. # Output only. List of raw output strings.
2594 &quot;rawOutput&quot;: [ # Output only. Raw output string.
2595 &quot;A String&quot;,
2596 ],
2597 },
2598 },
2599 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for pointwise metric score.
2600 &quot;score&quot;: 3.14, # Output only. Pointwise metric score.
2601 },
2602 &quot;rougeMetricValue&quot;: { # Rouge metric value for an instance. # Results for rouge metric.
2603 &quot;score&quot;: 3.14, # Output only. Rouge score.
2604 },
2605 },
2606 ],
2607 &quot;dataset&quot;: { # The dataset used for evaluation. # The dataset used for evaluation &amp; aggregation.
2608 &quot;bigquerySource&quot;: { # The BigQuery location for the input content. # BigQuery source holds the dataset.
2609 &quot;inputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
2610 },
2611 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Cloud storage source holds the dataset. Currently only one Cloud Storage file path is supported.
2612 &quot;uris&quot;: [ # Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/wildcards.
2613 &quot;A String&quot;,
2614 ],
2615 },
2616 },
2617 },
2618 &quot;outputInfo&quot;: { # Describes the info for output of EvaluationService. # Output only. Output info for EvaluationService.
2619 &quot;gcsOutputDirectory&quot;: &quot;A String&quot;, # Output only. The full path of the Cloud Storage directory created, into which the evaluation results and aggregation results are written.
2620 },
2621 },
2622 &quot;evaluationRun&quot;: &quot;A String&quot;, # Output only. The resource name of the evaluation run. Format: `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`.
2623 &quot;operationName&quot;: &quot;A String&quot;, # Output only. Deprecated: The updated architecture uses evaluation_run instead.
2624 },
2625 ],
2626 &quot;experiment&quot;: &quot;A String&quot;, # Output only. The Experiment associated with this TuningJob.
2627 &quot;labels&quot;: { # Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
2628 &quot;a_key&quot;: &quot;A String&quot;,
2629 },
2630 &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. Resource name of a TuningJob. Format: `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
2631 &quot;preTunedModel&quot;: { # A pre-tuned model for continuous tuning. # The pre-tuned model for continuous tuning.
2632 &quot;baseModel&quot;: &quot;A String&quot;, # Output only. The name of the base model this PreTunedModel was tuned from.
2633 &quot;checkpointId&quot;: &quot;A String&quot;, # Optional. The source checkpoint id. If not specified, the default checkpoint will be used.
2634 &quot;tunedModelName&quot;: &quot;A String&quot;, # The resource name of the Model. E.g., a model resource name with a specified version id or alias: `projects/{project}/locations/{location}/models/{model}@{version_id}` `projects/{project}/locations/{location}/models/{model}@{alias}` Or, omit the version id to use the default version: `projects/{project}/locations/{location}/models/{model}`
2635 },
2636 &quot;preferenceOptimizationSpec&quot;: { # Tuning Spec for Preference Optimization. # Tuning Spec for Preference Optimization.
2637 &quot;exportLastCheckpointOnly&quot;: True or False, # Optional. If set to true, disable intermediate checkpoints for Preference Optimization and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for Preference Optimization. Default is false.
2638 &quot;hyperParameters&quot;: { # Hyperparameters for Preference Optimization. # Optional. Hyperparameters for Preference Optimization.
2639 &quot;adapterSize&quot;: &quot;A String&quot;, # Optional. Adapter size for preference optimization.
2640 &quot;beta&quot;: 3.14, # Optional. Weight for KL Divergence regularization.
2641 &quot;epochCount&quot;: &quot;A String&quot;, # Optional. Number of complete passes the model makes over the entire training dataset during training.
2642 &quot;learningRateMultiplier&quot;: 3.14, # Optional. Multiplier for adjusting the default learning rate.
2643 },
2644 &quot;trainingDatasetUri&quot;: &quot;A String&quot;, # Required. Cloud Storage path to file containing training dataset for preference optimization tuning. The dataset must be formatted as a JSONL file.
2645 &quot;validationDatasetUri&quot;: &quot;A String&quot;, # Optional. Cloud Storage path to file containing validation dataset for preference optimization tuning. The dataset must be formatted as a JSONL file.
2646 },
2647 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent Users starting the pipeline must have the `iam.serviceAccounts.actAs` permission on this service account.
2648 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob for the first time entered the `JOB_STATE_RUNNING` state.
2649 &quot;state&quot;: &quot;A String&quot;, # Output only. The detailed state of the job.
2650 &quot;supervisedTuningSpec&quot;: { # Tuning Spec for Supervised Tuning for first party models. # Tuning Spec for Supervised Fine Tuning.
2651 &quot;evaluationConfig&quot;: { # Evaluation Config for Tuning Job. # Optional. Evaluation Config for Tuning Job.
2652 &quot;autoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Autorater config for evaluation.
2653 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
2654 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
2655 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
2656 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
2657 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
2658 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
2659 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
2660 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
2661 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
2662 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
2663 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
2664 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
2665 },
2666 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
2667 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
2668 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
2669 },
2670 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
2671 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
2672 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
2673 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
2674 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
2675 { # Configuration for the model to configure output formatting and delivery.
2676 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
2677 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
2678 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
2679 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
2680 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
2681 },
2682 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
2683 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
2684 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
2685 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
2686 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
2687 },
2688 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
2689 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
2690 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
2691 },
2692 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
2693 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
2694 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
2695 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
2696 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
2697 },
2698 },
2699 ],
2700 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
2701 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
2702 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
2703 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
2704 &quot;A String&quot;,
2705 ],
2706 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
2707 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
2708 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
2709 # Object with schema name: GoogleCloudAiplatformV1Schema
2710 ],
2711 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
2712 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
2713 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
2714 },
2715 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
2716 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
2717 &quot;A String&quot;,
2718 ],
2719 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
2720 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
2721 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
2722 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
2723 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
2724 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
2725 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
2726 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
2727 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
2728 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
2729 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
2730 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
2731 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
2732 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
2733 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
2734 },
2735 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
2736 &quot;A String&quot;,
2737 ],
2738 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
2739 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
2740 &quot;A String&quot;,
2741 ],
2742 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
2743 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
2744 },
2745 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
2746 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
2747 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
2748 },
2749 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
2750 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
2751 },
2752 },
2753 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
2754 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
2755 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
2756 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
2757 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
2758 { # Configuration for a single speaker in a multi-speaker setup.
2759 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
2760 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
2761 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
2762 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
2763 },
2764 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
2765 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
2766 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
2767 },
2768 },
2769 },
2770 ],
2771 },
2772 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
2773 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
2774 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
2775 },
2776 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
2777 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
2778 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
2779 },
2780 },
2781 },
2782 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
2783 &quot;A String&quot;,
2784 ],
2785 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
2786 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
2787 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
2788 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
2789 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
2790 },
2791 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
2792 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
2793 },
2794 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
2795 },
2796 &quot;datasetCustomMetrics&quot;: [ # Optional. Specifications for custom dataset-level aggregations.
2797 { # Defines a custom dataset-level aggregation.
2798 &quot;aggregationFunction&quot;: &quot;A String&quot;, # Required. The Python code string containing the aggregation function. Expected function signature: `def aggregate(instances: list[dict[str, Any]]) -&gt; dict[str, float]:` The `instances` argument is a list of dictionaries, where each dictionary represents a single evaluation result item. The structure of each dictionary corresponds to the fields in the `EvaluationResult` message. This includes: - `&quot;request&quot;`: Contains the original input data and model inputs (from `EvaluationResult.EvaluationRequest`). - `&quot;candidate_results&quot;`: Contains the results of any instance-level metrics (from `EvaluationResult.CandidateResults`). Example of a single item in the `instances` list: { &quot;request&quot;: { &quot;prompt&quot;: {&quot;text&quot;: &quot;What is the capital of France?&quot;}, &quot;golden_response&quot;: {&quot;text&quot;: &quot;Paris&quot;}, &quot;candidate_responses&quot;: [{&quot;candidate&quot;: &quot;model-v1&quot;, &quot;text&quot;: &quot;Paris&quot;}] }, &quot;candidate_results&quot;: [ {&quot;metric&quot;: &quot;exact_match&quot;, &quot;score&quot;: 1.0}, {&quot;metric&quot;: &quot;bleu&quot;, &quot;score&quot;: 0.9} ] }
2799 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A display name for this custom summary metric. Used to prefix keys in the output summaryMetrics map. If not provided, a default name like &quot;dataset_custom_metric_1&quot;, &quot;dataset_custom_metric_2&quot;, etc., will be generated based on the order in the repeated field.
2800 },
2801 ],
2802 &quot;inferenceGenerationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for inference generation and outputs. If not set, default generation parameters are used.
2803 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
2804 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
2805 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
2806 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
2807 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
2808 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
2809 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
2810 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
2811 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
2812 },
2813 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
2814 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
2815 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
2816 },
2817 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
2818 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
2819 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
2820 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
2821 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
2822 { # Configuration for the model to configure output formatting and delivery.
2823 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
2824 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
2825 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
2826 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
2827 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
2828 },
2829 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
2830 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
2831 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
2832 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
2833 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
2834 },
2835 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
2836 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
2837 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
2838 },
2839 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
2840 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
2841 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
2842 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
2843 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
2844 },
2845 },
2846 ],
2847 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
2848 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
2849 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
2850 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
2851 &quot;A String&quot;,
2852 ],
2853 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
2854 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
2855 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
2856 # Object with schema name: GoogleCloudAiplatformV1Schema
2857 ],
2858 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
2859 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
2860 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
2861 },
2862 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
2863 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
2864 &quot;A String&quot;,
2865 ],
2866 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
2867 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
2868 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
2869 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
2870 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
2871 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
2872 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
2873 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
2874 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
2875 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
2876 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
2877 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
2878 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
2879 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
2880 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
2881 },
2882 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
2883 &quot;A String&quot;,
2884 ],
2885 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
2886 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
2887 &quot;A String&quot;,
2888 ],
2889 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
2890 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
2891 },
2892 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
2893 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
2894 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
2895 },
2896 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
2897 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
2898 },
2899 },
2900 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
2901 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
2902 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
2903 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
2904 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
2905 { # Configuration for a single speaker in a multi-speaker setup.
2906 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
2907 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
2908 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
2909 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
2910 },
2911 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
2912 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
2913 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
2914 },
2915 },
2916 },
2917 ],
2918 },
2919 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
2920 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
2921 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
2922 },
2923 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
2924 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
2925 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
2926 },
2927 },
2928 },
2929 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
2930 &quot;A String&quot;,
2931 ],
2932 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
2933 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
2934 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
2935 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
2936 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
2937 },
2938 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
2939 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
2940 },
2941 &quot;metrics&quot;: [ # Required. The metrics used for evaluation.
2942 { # The metric used for running evaluations.
2943 &quot;aggregationMetrics&quot;: [ # Optional. The aggregation metrics to use.
2944 &quot;A String&quot;,
2945 ],
2946 &quot;bleuSpec&quot;: { # Spec for bleu score metric - calculates the precision of n-grams in the prediction as compared to reference - returns a score ranging between 0 to 1. # Spec for bleu metric.
2947 &quot;useEffectiveOrder&quot;: True or False, # Optional. Whether to use_effective_order to compute bleu score.
2948 },
2949 &quot;computationBasedMetricSpec&quot;: { # Specification for a computation based metric. # Spec for a computation based metric.
2950 &quot;parameters&quot;: { # Optional. A map of parameters for the metric, e.g. {&quot;rouge_type&quot;: &quot;rougeL&quot;}.
2951 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2952 },
2953 &quot;type&quot;: &quot;A String&quot;, # Required. The type of the computation based metric.
2954 },
2955 &quot;customCodeExecutionSpec&quot;: { # Specificies a metric that is populated by evaluating user-defined Python code. # Spec for Custom Code Execution metric.
2956 &quot;evaluationFunction&quot;: &quot;A String&quot;, # Required. Python function. Expected user to define the following function, e.g.: def evaluate(instance: dict[str, Any]) -&gt; float: Please include this function signature in the code snippet. Instance is the evaluation instance, any fields populated in the instance are available to the function as instance[field_name]. Example: Example input: ``` instance= EvaluationInstance( response=EvaluationInstance.InstanceData(text=&quot;The answer is 4.&quot;), reference=EvaluationInstance.InstanceData(text=&quot;4&quot;) ) ``` Example converted input: ``` { &#x27;response&#x27;: {&#x27;text&#x27;: &#x27;The answer is 4.&#x27;}, &#x27;reference&#x27;: {&#x27;text&#x27;: &#x27;4&#x27;} } ``` Example python function: ``` def evaluate(instance: dict[str, Any]) -&gt; float: if instance&#x27;response&#x27; == instance&#x27;reference&#x27;: return 1.0 return 0.0 ``` CustomCodeExecutionSpec is also supported in Batch Evaluation (EvalDataset RPC) and Tuning Evaluation. Each line in the input jsonl file will be converted to dict[str, Any] and passed to the evaluation function.
2957 },
2958 &quot;exactMatchSpec&quot;: { # Spec for exact match metric - returns 1 if prediction and reference exactly matches, otherwise 0. # Spec for exact match metric.
2959 },
2960 &quot;llmBasedMetricSpec&quot;: { # Specification for an LLM based metric. # Spec for an LLM based metric.
2961 &quot;additionalConfig&quot;: { # Optional. Optional additional configuration for the metric.
2962 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2963 },
2964 &quot;judgeAutoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Optional configuration for the judge LLM (Autorater).
2965 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
2966 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
2967 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
2968 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
2969 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
2970 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
2971 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
2972 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
2973 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
2974 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
2975 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
2976 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
2977 },
2978 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
2979 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
2980 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
2981 },
2982 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
2983 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
2984 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
2985 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
2986 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
2987 { # Configuration for the model to configure output formatting and delivery.
2988 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
2989 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
2990 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
2991 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
2992 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
2993 },
2994 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
2995 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
2996 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
2997 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
2998 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
2999 },
3000 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
3001 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
3002 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
3003 },
3004 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
3005 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
3006 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
3007 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
3008 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
3009 },
3010 },
3011 ],
3012 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
3013 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
3014 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
3015 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
3016 &quot;A String&quot;,
3017 ],
3018 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
3019 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
3020 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
3021 # Object with schema name: GoogleCloudAiplatformV1Schema
3022 ],
3023 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
3024 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
3025 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
3026 },
3027 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
3028 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
3029 &quot;A String&quot;,
3030 ],
3031 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
3032 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
3033 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
3034 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
3035 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
3036 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
3037 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
3038 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
3039 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
3040 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
3041 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
3042 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
3043 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
3044 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
3045 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
3046 },
3047 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
3048 &quot;A String&quot;,
3049 ],
3050 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
3051 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
3052 &quot;A String&quot;,
3053 ],
3054 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
3055 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
3056 },
3057 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
3058 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
3059 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
3060 },
3061 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
3062 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
3063 },
3064 },
3065 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
3066 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
3067 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
3068 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
3069 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
3070 { # Configuration for a single speaker in a multi-speaker setup.
3071 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
3072 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
3073 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
3074 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
3075 },
3076 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
3077 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
3078 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
3079 },
3080 },
3081 },
3082 ],
3083 },
3084 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
3085 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
3086 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
3087 },
3088 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
3089 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
3090 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
3091 },
3092 },
3093 },
3094 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
3095 &quot;A String&quot;,
3096 ],
3097 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
3098 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
3099 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
3100 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
3101 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
3102 },
3103 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
3104 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
3105 },
3106 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
3107 },
3108 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Template for the prompt sent to the judge model.
3109 &quot;predefinedRubricGenerationSpec&quot;: { # The spec for a pre-defined metric. # Dynamically generate rubrics using a predefined spec.
3110 &quot;metricSpecName&quot;: &quot;A String&quot;, # Required. The name of a pre-defined metric, such as &quot;instruction_following_v1&quot; or &quot;text_quality_v1&quot;.
3111 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
3112 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3113 },
3114 },
3115 &quot;resultParserConfig&quot;: { # Config for parsing LLM responses. It can be used to parse the LLM response to be evaluated, or the LLM response from LLM-based metrics/Autoraters. # Optional. The parser config for the metric result.
3116 &quot;customCodeParserConfig&quot;: { # Configuration for parsing the LLM response using custom code. # Optional. Use custom code to parse the LLM response.
3117 &quot;parsingFunction&quot;: &quot;A String&quot;, # Required. Python function for parsing results. The function should be defined within this string. The function takes a list of strings (LLM responses) and should return either a list of dictionaries (for rubrics) or a single dictionary (for a metric result). Example function signature: def parse(responses: list[str]) -&gt; list[dict[str, Any]] | dict[str, Any]: When parsing rubrics, return a list of dictionaries, where each dictionary represents a Rubric. Example for rubrics: [ { &quot;content&quot;: {&quot;property&quot;: {&quot;description&quot;: &quot;The response is factual.&quot;}}, &quot;type&quot;: &quot;FACTUALITY&quot;, &quot;importance&quot;: &quot;HIGH&quot; }, { &quot;content&quot;: {&quot;property&quot;: {&quot;description&quot;: &quot;The response is fluent.&quot;}}, &quot;type&quot;: &quot;FLUENCY&quot;, &quot;importance&quot;: &quot;MEDIUM&quot; } ] When parsing critique results, return a dictionary representing a MetricResult. Example for a metric result: { &quot;score&quot;: 0.8, &quot;explanation&quot;: &quot;The model followed most instructions.&quot;, &quot;rubric_verdicts&quot;: [...] } ... code for result extraction and aggregation
3118 },
3119 },
3120 &quot;rubricGenerationSpec&quot;: { # Specification for how rubrics should be generated. # Dynamically generate rubrics using this specification.
3121 &quot;modelConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Configuration for the model used in rubric generation. Configs including sampling count and base model can be specified here. Flipping is not supported for rubric generation.
3122 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
3123 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
3124 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
3125 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
3126 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
3127 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
3128 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
3129 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
3130 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
3131 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
3132 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
3133 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
3134 },
3135 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
3136 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
3137 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
3138 },
3139 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
3140 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
3141 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
3142 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
3143 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
3144 { # Configuration for the model to configure output formatting and delivery.
3145 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
3146 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
3147 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
3148 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
3149 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
3150 },
3151 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
3152 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
3153 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
3154 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
3155 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
3156 },
3157 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
3158 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
3159 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
3160 },
3161 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
3162 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
3163 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
3164 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
3165 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
3166 },
3167 },
3168 ],
3169 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
3170 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
3171 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
3172 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
3173 &quot;A String&quot;,
3174 ],
3175 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
3176 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
3177 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
3178 # Object with schema name: GoogleCloudAiplatformV1Schema
3179 ],
3180 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
3181 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
3182 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
3183 },
3184 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
3185 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
3186 &quot;A String&quot;,
3187 ],
3188 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
3189 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
3190 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
3191 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
3192 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
3193 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
3194 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
3195 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
3196 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
3197 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
3198 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
3199 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
3200 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
3201 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
3202 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
3203 },
3204 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
3205 &quot;A String&quot;,
3206 ],
3207 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
3208 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
3209 &quot;A String&quot;,
3210 ],
3211 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
3212 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
3213 },
3214 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
3215 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
3216 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
3217 },
3218 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
3219 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
3220 },
3221 },
3222 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
3223 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
3224 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
3225 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
3226 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
3227 { # Configuration for a single speaker in a multi-speaker setup.
3228 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
3229 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
3230 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
3231 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
3232 },
3233 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
3234 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
3235 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
3236 },
3237 },
3238 },
3239 ],
3240 },
3241 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
3242 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
3243 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
3244 },
3245 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
3246 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
3247 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
3248 },
3249 },
3250 },
3251 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
3252 &quot;A String&quot;,
3253 ],
3254 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
3255 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
3256 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
3257 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
3258 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
3259 },
3260 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
3261 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
3262 },
3263 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
3264 },
3265 &quot;promptTemplate&quot;: &quot;A String&quot;, # Template for the prompt used to generate rubrics. The details should be updated based on the most-recent recipe requirements.
3266 &quot;rubricContentType&quot;: &quot;A String&quot;, # The type of rubric content to be generated.
3267 &quot;rubricTypeOntology&quot;: [ # Optional. An optional, pre-defined list of allowed types for generated rubrics. If this field is provided, it implies `include_rubric_type` should be true, and the generated rubric types should be chosen from this ontology.
3268 &quot;A String&quot;,
3269 ],
3270 },
3271 &quot;rubricGroupKey&quot;: &quot;A String&quot;, # Use a pre-defined group of rubrics associated with the input. Refers to a key in the rubric_groups map of EvaluationInstance.
3272 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for the judge model.
3273 },
3274 &quot;metadata&quot;: { # Metadata about the metric, used for visualization and organization. # Optional. Metadata about the metric, used for visualization and organization.
3275 &quot;otherMetadata&quot;: { # Optional. Flexible metadata for user-defined attributes.
3276 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3277 },
3278 &quot;scoreRange&quot;: { # The range of possible scores for this metric, used for plotting. # Optional. The range of possible scores for this metric, used for plotting.
3279 &quot;description&quot;: &quot;A String&quot;, # Optional. The description of the score explaining the directionality etc.
3280 &quot;max&quot;: 3.14, # Required. The maximum value of the score range (inclusive).
3281 &quot;min&quot;: 3.14, # Required. The minimum value of the score range (inclusive).
3282 &quot;step&quot;: 3.14, # Optional. The distance between discrete steps in the range. If unset, the range is assumed to be continuous.
3283 },
3284 &quot;title&quot;: &quot;A String&quot;, # Optional. The user-friendly name for the metric. If not set for a registered metric, it will default to the metric&#x27;s display name.
3285 },
3286 &quot;pairwiseMetricSpec&quot;: { # Spec for pairwise metric. # Spec for pairwise metric.
3287 &quot;baselineResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the baseline response.
3288 &quot;candidateResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the candidate response.
3289 &quot;customOutputFormatConfig&quot;: { # Spec for custom output format configuration. # Optional. CustomOutputFormatConfig allows customization of metric output. When this config is set, the default output is replaced with the raw output string. If a custom format is chosen, the `pairwise_choice` and `explanation` fields in the corresponding metric result will be empty.
3290 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
3291 },
3292 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pairwise metric.
3293 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pairwise metric.
3294 },
3295 &quot;pointwiseMetricSpec&quot;: { # Spec for pointwise metric. # Spec for pointwise metric.
3296 &quot;customOutputFormatConfig&quot;: { # Spec for custom output format configuration. # Optional. CustomOutputFormatConfig allows customization of metric output. By default, metrics return a score and explanation. When this config is set, the default output is replaced with either: - The raw output string. - A parsed output based on a user-defined schema. If a custom format is chosen, the `score` and `explanation` fields in the corresponding metric result will be empty.
3297 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
3298 },
3299 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pointwise metric.
3300 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pointwise metric.
3301 },
3302 &quot;predefinedMetricSpec&quot;: { # The spec for a pre-defined metric. # The spec for a pre-defined metric.
3303 &quot;metricSpecName&quot;: &quot;A String&quot;, # Required. The name of a pre-defined metric, such as &quot;instruction_following_v1&quot; or &quot;text_quality_v1&quot;.
3304 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
3305 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3306 },
3307 },
3308 &quot;rougeSpec&quot;: { # Spec for rouge score metric - calculates the recall of n-grams in prediction as compared to reference - returns a score ranging between 0 and 1. # Spec for rouge metric.
3309 &quot;rougeType&quot;: &quot;A String&quot;, # Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum.
3310 &quot;splitSummaries&quot;: True or False, # Optional. Whether to split summaries while using rougeLsum.
3311 &quot;useStemmer&quot;: True or False, # Optional. Whether to use stemmer to compute rouge score.
3312 },
3313 },
3314 ],
3315 &quot;outputConfig&quot;: { # Config for evaluation output. # Required. Config for evaluation output.
3316 &quot;gcsDestination&quot;: { # The Google Cloud Storage location where the output is to be written to. # Cloud storage destination for evaluation output.
3317 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
3318 },
3319 },
3320 },
3321 &quot;exportLastCheckpointOnly&quot;: True or False, # Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. Default is false.
3322 &quot;hyperParameters&quot;: { # Hyperparameters for SFT. # Optional. Hyperparameters for SFT.
3323 &quot;adapterSize&quot;: &quot;A String&quot;, # Optional. Adapter size for tuning.
3324 &quot;epochCount&quot;: &quot;A String&quot;, # Optional. Number of complete passes the model makes over the entire training dataset during training.
3325 &quot;learningRateMultiplier&quot;: 3.14, # Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. This feature is only available for 1P models.
3326 },
3327 &quot;trainingDatasetUri&quot;: &quot;A String&quot;, # Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
3328 &quot;validationDatasetUri&quot;: &quot;A String&quot;, # Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
3329 },
3330 &quot;tunedModel&quot;: { # The Model Registry Model and Online Prediction Endpoint associated with this TuningJob. # Output only. The tuned model resources associated with this TuningJob.
3331 &quot;checkpoints&quot;: [ # Output only. The checkpoints associated with this TunedModel. This field is only populated for tuning jobs that enable intermediate checkpoints.
3332 { # TunedModelCheckpoint for the Tuned Model of a Tuning Job.
3333 &quot;checkpointId&quot;: &quot;A String&quot;, # The ID of the checkpoint.
3334 &quot;endpoint&quot;: &quot;A String&quot;, # The Endpoint resource name that the checkpoint is deployed to. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
3335 &quot;epoch&quot;: &quot;A String&quot;, # The epoch of the checkpoint.
3336 &quot;step&quot;: &quot;A String&quot;, # The step of the checkpoint.
3337 },
3338 ],
3339 &quot;endpoint&quot;: &quot;A String&quot;, # Output only. A resource name of an Endpoint. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
3340 &quot;model&quot;: &quot;A String&quot;, # Output only. The resource name of the TunedModel. Format: `projects/{project}/locations/{location}/models/{model}@{version_id}` When tuning from a base model, the version ID will be 1. For continuous tuning, if the provided tuned_model_display_name is set and different from parent model&#x27;s display name, the tuned model will have a new parent model with version 1. Otherwise the version id will be incremented by 1 from the last version ID in the parent model. E.g., `projects/{project}/locations/{location}/models/{model}@{last_version_id + 1}`
3341 },
3342 &quot;tunedModelDisplayName&quot;: &quot;A String&quot;, # Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. For continuous tuning, tuned_model_display_name will by default use the same display name as the pre-tuned model. If a new display name is provided, the tuning job will create a new model instead of a new version.
3343 &quot;tuningDataStats&quot;: { # The tuning data statistic values for TuningJob. # Output only. The tuning data statistics associated with this TuningJob.
3344 &quot;preferenceOptimizationDataStats&quot;: { # Statistics computed for datasets used for preference optimization. # Output only. Statistics for preference optimization.
3345 &quot;droppedExampleIndices&quot;: [ # Output only. A partial sample of the indices (starting from 1) of the dropped examples.
3346 &quot;A String&quot;,
3347 ],
3348 &quot;droppedExampleReasons&quot;: [ # Output only. For each index in `dropped_example_indices`, the user-facing reason why the example was dropped.
3349 &quot;A String&quot;,
3350 ],
3351 &quot;scoreVariancePerExampleDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for scores variance per example.
3352 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
3353 { # Dataset bucket used to create a histogram for the distribution given a population of values.
3354 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
3355 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
3356 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
3357 },
3358 ],
3359 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
3360 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
3361 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
3362 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
3363 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
3364 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
3365 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
3366 },
3367 &quot;scoresDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for scores.
3368 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
3369 { # Dataset bucket used to create a histogram for the distribution given a population of values.
3370 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
3371 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
3372 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
3373 },
3374 ],
3375 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
3376 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
3377 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
3378 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
3379 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
3380 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
3381 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
3382 },
3383 &quot;totalBillableTokenCount&quot;: &quot;A String&quot;, # Output only. Number of billable tokens in the tuning dataset.
3384 &quot;tuningDatasetExampleCount&quot;: &quot;A String&quot;, # Output only. Number of examples in the tuning dataset.
3385 &quot;tuningStepCount&quot;: &quot;A String&quot;, # Output only. Number of tuning steps for this Tuning Job.
3386 &quot;userDatasetExamples&quot;: [ # Output only. Sample user examples in the training dataset.
3387 { # Input example for preference optimization.
3388 &quot;completions&quot;: [ # List of completions for a given prompt.
3389 { # Completion and its preference score.
3390 &quot;completion&quot;: { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message. # Single turn completion for the given prompt.
3391 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
3392 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
3393 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
3394 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
3395 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
3396 },
3397 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
3398 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
3399 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
3400 },
3401 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
3402 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
3403 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
3404 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3405 },
3406 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
3407 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
3408 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3409 },
3410 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
3411 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
3412 { # Partial argument value of the function call.
3413 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
3414 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
3415 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
3416 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
3417 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
3418 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
3419 },
3420 ],
3421 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
3422 },
3423 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
3424 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
3425 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
3426 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
3427 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
3428 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
3429 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
3430 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3431 },
3432 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
3433 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
3434 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
3435 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3436 },
3437 },
3438 ],
3439 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
3440 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3441 },
3442 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
3443 },
3444 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
3445 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
3446 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
3447 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3448 },
3449 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
3450 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
3451 },
3452 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
3453 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
3454 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
3455 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
3456 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
3457 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
3458 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
3459 },
3460 },
3461 ],
3462 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
3463 },
3464 &quot;score&quot;: 3.14, # The score for the given completion.
3465 },
3466 ],
3467 &quot;contents&quot;: [ # Multi-turn contents that represents the Prompt.
3468 { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message.
3469 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
3470 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
3471 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
3472 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
3473 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
3474 },
3475 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
3476 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
3477 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
3478 },
3479 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
3480 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
3481 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
3482 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3483 },
3484 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
3485 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
3486 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3487 },
3488 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
3489 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
3490 { # Partial argument value of the function call.
3491 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
3492 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
3493 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
3494 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
3495 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
3496 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
3497 },
3498 ],
3499 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
3500 },
3501 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
3502 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
3503 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
3504 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
3505 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
3506 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
3507 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
3508 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3509 },
3510 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
3511 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
3512 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
3513 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3514 },
3515 },
3516 ],
3517 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
3518 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3519 },
3520 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
3521 },
3522 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
3523 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
3524 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
3525 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3526 },
3527 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
3528 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
3529 },
3530 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
3531 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
3532 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
3533 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
3534 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
3535 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
3536 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
3537 },
3538 },
3539 ],
3540 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
3541 },
3542 ],
3543 },
3544 ],
3545 &quot;userInputTokenDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for the user input tokens.
3546 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
3547 { # Dataset bucket used to create a histogram for the distribution given a population of values.
3548 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
3549 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
3550 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
3551 },
3552 ],
3553 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
3554 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
3555 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
3556 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
3557 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
3558 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
3559 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
3560 },
3561 &quot;userOutputTokenDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for the user output tokens.
3562 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
3563 { # Dataset bucket used to create a histogram for the distribution given a population of values.
3564 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
3565 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
3566 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
3567 },
3568 ],
3569 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
3570 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
3571 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
3572 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
3573 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
3574 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
3575 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
3576 },
3577 },
3578 &quot;supervisedTuningDataStats&quot;: { # Tuning data statistics for Supervised Tuning. # The SFT Tuning data stats.
3579 &quot;droppedExampleReasons&quot;: [ # Output only. For each index in `truncated_example_indices`, the user-facing reason why the example was dropped.
3580 &quot;A String&quot;,
3581 ],
3582 &quot;totalBillableCharacterCount&quot;: &quot;A String&quot;, # Output only. Number of billable characters in the tuning dataset.
3583 &quot;totalBillableTokenCount&quot;: &quot;A String&quot;, # Output only. Number of billable tokens in the tuning dataset.
3584 &quot;totalTruncatedExampleCount&quot;: &quot;A String&quot;, # Output only. The number of examples in the dataset that have been dropped. An example can be dropped for reasons including: too many tokens, contains an invalid image, contains too many images, etc.
3585 &quot;totalTuningCharacterCount&quot;: &quot;A String&quot;, # Output only. Number of tuning characters in the tuning dataset.
3586 &quot;truncatedExampleIndices&quot;: [ # Output only. A partial sample of the indices (starting from 1) of the dropped examples.
3587 &quot;A String&quot;,
3588 ],
3589 &quot;tuningDatasetExampleCount&quot;: &quot;A String&quot;, # Output only. Number of examples in the tuning dataset.
3590 &quot;tuningStepCount&quot;: &quot;A String&quot;, # Output only. Number of tuning steps for this Tuning Job.
3591 &quot;userDatasetExamples&quot;: [ # Output only. Sample user messages in the training dataset uri.
3592 { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message.
3593 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
3594 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
3595 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
3596 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
3597 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
3598 },
3599 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
3600 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
3601 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
3602 },
3603 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
3604 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
3605 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
3606 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3607 },
3608 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
3609 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
3610 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3611 },
3612 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
3613 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
3614 { # Partial argument value of the function call.
3615 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
3616 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
3617 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
3618 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
3619 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
3620 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
3621 },
3622 ],
3623 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
3624 },
3625 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
3626 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
3627 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
3628 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
3629 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
3630 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
3631 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
3632 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3633 },
3634 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
3635 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
3636 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
3637 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3638 },
3639 },
3640 ],
3641 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
3642 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3643 },
3644 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
3645 },
3646 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
3647 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
3648 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
3649 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3650 },
3651 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
3652 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
3653 },
3654 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
3655 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
3656 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
3657 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
3658 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
3659 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
3660 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
3661 },
3662 },
3663 ],
3664 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
3665 },
3666 ],
3667 &quot;userInputTokenDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the user input tokens.
3668 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
3669 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
3670 { # Dataset bucket used to create a histogram for the distribution given a population of values.
3671 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
3672 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
3673 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
3674 },
3675 ],
3676 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
3677 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
3678 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
3679 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
3680 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
3681 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
3682 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
3683 },
3684 &quot;userMessagePerExampleDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the messages per example.
3685 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
3686 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
3687 { # Dataset bucket used to create a histogram for the distribution given a population of values.
3688 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
3689 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
3690 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
3691 },
3692 ],
3693 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
3694 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
3695 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
3696 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
3697 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
3698 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
3699 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
3700 },
3701 &quot;userOutputTokenDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the user output tokens.
3702 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
3703 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
3704 { # Dataset bucket used to create a histogram for the distribution given a population of values.
3705 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
3706 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
3707 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
3708 },
3709 ],
3710 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
3711 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
3712 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
3713 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
3714 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
3715 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
3716 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
3717 },
3718 },
3719 },
3720 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob was most recently updated.
3721 }</pre>
3722 </div>
3723
3724 <div class="method">
3725 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
3726 <pre>Lists tuning jobs in a location.
3727
3728 Args:
3729 parent: string, Required. The resource name of the location to list the tuning jobs from. Format: `projects/{project}/locations/{location}` (required)
3730 filter: string, Optional. The standard list filter.
3731 pageSize: integer, Optional. The standard list page size.
3732 pageToken: string, Optional. The standard list page token. Typically obtained from ListTuningJobsResponse.next_page_token of the previous GenAiTuningService.ListTuningJobs call.
3733 x__xgafv: string, V1 error format.
3734 Allowed values
3735 1 - v1 error format
3736 2 - v2 error format
3737
3738 Returns:
3739 An object of the form:
3740
3741 { # Response message for GenAiTuningService.ListTuningJobs
3742 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve the next page of results. Pass this token in a subsequent [GenAiTuningService.ListTuningJobs] call to retrieve the next page of results.
3743 &quot;tuningJobs&quot;: [ # The tuning jobs that match the request.
3744 { # Represents a TuningJob that runs with Google owned models.
3745 &quot;baseModel&quot;: &quot;A String&quot;, # The base model that is being tuned. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).
3746 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob was created.
3747 &quot;description&quot;: &quot;A String&quot;, # Optional. The description of the TuningJob.
3748 &quot;encryptionSpec&quot;: { # Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. # Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key.
3749 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Resource name of the Cloud KMS key used to protect the resource. The Cloud KMS key must be in the same region as the resource. It must have the format `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
3750 },
3751 &quot;endTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob entered any of the following JobStates: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
3752 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when job&#x27;s state is `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
3753 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
3754 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
3755 {
3756 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
3757 },
3758 ],
3759 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
3760 },
3761 &quot;evaluateDatasetRuns&quot;: [ # Output only. Evaluation runs for the Tuning Job.
3762 { # Evaluate Dataset Run Result for Tuning Job.
3763 &quot;checkpointId&quot;: &quot;A String&quot;, # Output only. The checkpoint id used in the evaluation run. Only populated when evaluating checkpoints.
3764 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The error of the evaluation run if any.
3765 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
3766 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
3767 {
3768 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
3769 },
3770 ],
3771 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
3772 },
3773 &quot;evaluateDatasetResponse&quot;: { # The results from an evaluation run performed by the EvaluationService. # Output only. Results for EvaluationService.
3774 &quot;aggregationOutput&quot;: { # The aggregation result for the entire dataset and all metrics. # Output only. Aggregation statistics derived from results of EvaluationService.
3775 &quot;aggregationResults&quot;: [ # One AggregationResult per metric.
3776 { # The aggregation result for a single metric.
3777 &quot;aggregationMetric&quot;: &quot;A String&quot;, # Aggregation metric.
3778 &quot;bleuMetricValue&quot;: { # Bleu metric value for an instance. # Results for bleu metric.
3779 &quot;score&quot;: 3.14, # Output only. Bleu score.
3780 },
3781 &quot;customCodeExecutionResult&quot;: { # Result for custom code execution metric. # Result for code execution metric.
3782 &quot;score&quot;: 3.14, # Output only. Custom code execution score.
3783 },
3784 &quot;exactMatchMetricValue&quot;: { # Exact match metric value for an instance. # Results for exact match metric.
3785 &quot;score&quot;: 3.14, # Output only. Exact match score.
3786 },
3787 &quot;pairwiseMetricResult&quot;: { # Spec for pairwise metric result. # Result for pairwise metric.
3788 &quot;customOutput&quot;: { # Spec for custom output. # Output only. Spec for custom output.
3789 &quot;rawOutputs&quot;: { # Raw output. # Output only. List of raw output strings.
3790 &quot;rawOutput&quot;: [ # Output only. Raw output string.
3791 &quot;A String&quot;,
3792 ],
3793 },
3794 },
3795 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for pairwise metric score.
3796 &quot;pairwiseChoice&quot;: &quot;A String&quot;, # Output only. Pairwise metric choice.
3797 },
3798 &quot;pointwiseMetricResult&quot;: { # Spec for pointwise metric result. # Result for pointwise metric.
3799 &quot;customOutput&quot;: { # Spec for custom output. # Output only. Spec for custom output.
3800 &quot;rawOutputs&quot;: { # Raw output. # Output only. List of raw output strings.
3801 &quot;rawOutput&quot;: [ # Output only. Raw output string.
3802 &quot;A String&quot;,
3803 ],
3804 },
3805 },
3806 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for pointwise metric score.
3807 &quot;score&quot;: 3.14, # Output only. Pointwise metric score.
3808 },
3809 &quot;rougeMetricValue&quot;: { # Rouge metric value for an instance. # Results for rouge metric.
3810 &quot;score&quot;: 3.14, # Output only. Rouge score.
3811 },
3812 },
3813 ],
3814 &quot;dataset&quot;: { # The dataset used for evaluation. # The dataset used for evaluation &amp; aggregation.
3815 &quot;bigquerySource&quot;: { # The BigQuery location for the input content. # BigQuery source holds the dataset.
3816 &quot;inputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
3817 },
3818 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Cloud storage source holds the dataset. Currently only one Cloud Storage file path is supported.
3819 &quot;uris&quot;: [ # Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/wildcards.
3820 &quot;A String&quot;,
3821 ],
3822 },
3823 },
3824 },
3825 &quot;outputInfo&quot;: { # Describes the info for output of EvaluationService. # Output only. Output info for EvaluationService.
3826 &quot;gcsOutputDirectory&quot;: &quot;A String&quot;, # Output only. The full path of the Cloud Storage directory created, into which the evaluation results and aggregation results are written.
3827 },
3828 },
3829 &quot;evaluationRun&quot;: &quot;A String&quot;, # Output only. The resource name of the evaluation run. Format: `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`.
3830 &quot;operationName&quot;: &quot;A String&quot;, # Output only. Deprecated: The updated architecture uses evaluation_run instead.
3831 },
3832 ],
3833 &quot;experiment&quot;: &quot;A String&quot;, # Output only. The Experiment associated with this TuningJob.
3834 &quot;labels&quot;: { # Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
3835 &quot;a_key&quot;: &quot;A String&quot;,
3836 },
3837 &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. Resource name of a TuningJob. Format: `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
3838 &quot;preTunedModel&quot;: { # A pre-tuned model for continuous tuning. # The pre-tuned model for continuous tuning.
3839 &quot;baseModel&quot;: &quot;A String&quot;, # Output only. The name of the base model this PreTunedModel was tuned from.
3840 &quot;checkpointId&quot;: &quot;A String&quot;, # Optional. The source checkpoint id. If not specified, the default checkpoint will be used.
3841 &quot;tunedModelName&quot;: &quot;A String&quot;, # The resource name of the Model. E.g., a model resource name with a specified version id or alias: `projects/{project}/locations/{location}/models/{model}@{version_id}` `projects/{project}/locations/{location}/models/{model}@{alias}` Or, omit the version id to use the default version: `projects/{project}/locations/{location}/models/{model}`
3842 },
3843 &quot;preferenceOptimizationSpec&quot;: { # Tuning Spec for Preference Optimization. # Tuning Spec for Preference Optimization.
3844 &quot;exportLastCheckpointOnly&quot;: True or False, # Optional. If set to true, disable intermediate checkpoints for Preference Optimization and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for Preference Optimization. Default is false.
3845 &quot;hyperParameters&quot;: { # Hyperparameters for Preference Optimization. # Optional. Hyperparameters for Preference Optimization.
3846 &quot;adapterSize&quot;: &quot;A String&quot;, # Optional. Adapter size for preference optimization.
3847 &quot;beta&quot;: 3.14, # Optional. Weight for KL Divergence regularization.
3848 &quot;epochCount&quot;: &quot;A String&quot;, # Optional. Number of complete passes the model makes over the entire training dataset during training.
3849 &quot;learningRateMultiplier&quot;: 3.14, # Optional. Multiplier for adjusting the default learning rate.
3850 },
3851 &quot;trainingDatasetUri&quot;: &quot;A String&quot;, # Required. Cloud Storage path to file containing training dataset for preference optimization tuning. The dataset must be formatted as a JSONL file.
3852 &quot;validationDatasetUri&quot;: &quot;A String&quot;, # Optional. Cloud Storage path to file containing validation dataset for preference optimization tuning. The dataset must be formatted as a JSONL file.
3853 },
3854 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent Users starting the pipeline must have the `iam.serviceAccounts.actAs` permission on this service account.
3855 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob for the first time entered the `JOB_STATE_RUNNING` state.
3856 &quot;state&quot;: &quot;A String&quot;, # Output only. The detailed state of the job.
3857 &quot;supervisedTuningSpec&quot;: { # Tuning Spec for Supervised Tuning for first party models. # Tuning Spec for Supervised Fine Tuning.
3858 &quot;evaluationConfig&quot;: { # Evaluation Config for Tuning Job. # Optional. Evaluation Config for Tuning Job.
3859 &quot;autoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Autorater config for evaluation.
3860 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
3861 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
3862 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
3863 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
3864 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
3865 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
3866 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
3867 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
3868 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
3869 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
3870 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
3871 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
3872 },
3873 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
3874 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
3875 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
3876 },
3877 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
3878 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
3879 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
3880 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
3881 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
3882 { # Configuration for the model to configure output formatting and delivery.
3883 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
3884 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
3885 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
3886 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
3887 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
3888 },
3889 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
3890 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
3891 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
3892 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
3893 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
3894 },
3895 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
3896 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
3897 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
3898 },
3899 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
3900 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
3901 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
3902 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
3903 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
3904 },
3905 },
3906 ],
3907 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
3908 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
3909 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
3910 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
3911 &quot;A String&quot;,
3912 ],
3913 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
3914 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
3915 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
3916 # Object with schema name: GoogleCloudAiplatformV1Schema
3917 ],
3918 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
3919 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
3920 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
3921 },
3922 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
3923 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
3924 &quot;A String&quot;,
3925 ],
3926 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
3927 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
3928 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
3929 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
3930 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
3931 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
3932 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
3933 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
3934 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
3935 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
3936 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
3937 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
3938 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
3939 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
3940 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
3941 },
3942 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
3943 &quot;A String&quot;,
3944 ],
3945 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
3946 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
3947 &quot;A String&quot;,
3948 ],
3949 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
3950 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
3951 },
3952 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
3953 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
3954 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
3955 },
3956 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
3957 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
3958 },
3959 },
3960 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
3961 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
3962 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
3963 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
3964 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
3965 { # Configuration for a single speaker in a multi-speaker setup.
3966 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
3967 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
3968 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
3969 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
3970 },
3971 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
3972 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
3973 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
3974 },
3975 },
3976 },
3977 ],
3978 },
3979 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
3980 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
3981 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
3982 },
3983 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
3984 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
3985 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
3986 },
3987 },
3988 },
3989 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
3990 &quot;A String&quot;,
3991 ],
3992 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
3993 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
3994 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
3995 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
3996 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
3997 },
3998 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
3999 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
4000 },
4001 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
4002 },
4003 &quot;datasetCustomMetrics&quot;: [ # Optional. Specifications for custom dataset-level aggregations.
4004 { # Defines a custom dataset-level aggregation.
4005 &quot;aggregationFunction&quot;: &quot;A String&quot;, # Required. The Python code string containing the aggregation function. Expected function signature: `def aggregate(instances: list[dict[str, Any]]) -&gt; dict[str, float]:` The `instances` argument is a list of dictionaries, where each dictionary represents a single evaluation result item. The structure of each dictionary corresponds to the fields in the `EvaluationResult` message. This includes: - `&quot;request&quot;`: Contains the original input data and model inputs (from `EvaluationResult.EvaluationRequest`). - `&quot;candidate_results&quot;`: Contains the results of any instance-level metrics (from `EvaluationResult.CandidateResults`). Example of a single item in the `instances` list: { &quot;request&quot;: { &quot;prompt&quot;: {&quot;text&quot;: &quot;What is the capital of France?&quot;}, &quot;golden_response&quot;: {&quot;text&quot;: &quot;Paris&quot;}, &quot;candidate_responses&quot;: [{&quot;candidate&quot;: &quot;model-v1&quot;, &quot;text&quot;: &quot;Paris&quot;}] }, &quot;candidate_results&quot;: [ {&quot;metric&quot;: &quot;exact_match&quot;, &quot;score&quot;: 1.0}, {&quot;metric&quot;: &quot;bleu&quot;, &quot;score&quot;: 0.9} ] }
4006 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A display name for this custom summary metric. Used to prefix keys in the output summaryMetrics map. If not provided, a default name like &quot;dataset_custom_metric_1&quot;, &quot;dataset_custom_metric_2&quot;, etc., will be generated based on the order in the repeated field.
4007 },
4008 ],
4009 &quot;inferenceGenerationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for inference generation and outputs. If not set, default generation parameters are used.
4010 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
4011 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
4012 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
4013 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
4014 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
4015 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
4016 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
4017 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
4018 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
4019 },
4020 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
4021 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
4022 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
4023 },
4024 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
4025 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
4026 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
4027 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
4028 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
4029 { # Configuration for the model to configure output formatting and delivery.
4030 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
4031 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
4032 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
4033 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
4034 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
4035 },
4036 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
4037 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
4038 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
4039 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
4040 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
4041 },
4042 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
4043 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
4044 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
4045 },
4046 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
4047 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
4048 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
4049 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
4050 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
4051 },
4052 },
4053 ],
4054 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
4055 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
4056 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
4057 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
4058 &quot;A String&quot;,
4059 ],
4060 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
4061 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
4062 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
4063 # Object with schema name: GoogleCloudAiplatformV1Schema
4064 ],
4065 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
4066 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
4067 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
4068 },
4069 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
4070 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
4071 &quot;A String&quot;,
4072 ],
4073 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
4074 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
4075 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
4076 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
4077 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
4078 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
4079 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
4080 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
4081 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
4082 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
4083 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
4084 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
4085 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
4086 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
4087 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
4088 },
4089 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
4090 &quot;A String&quot;,
4091 ],
4092 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
4093 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
4094 &quot;A String&quot;,
4095 ],
4096 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
4097 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
4098 },
4099 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
4100 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
4101 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
4102 },
4103 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
4104 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
4105 },
4106 },
4107 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
4108 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
4109 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
4110 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
4111 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
4112 { # Configuration for a single speaker in a multi-speaker setup.
4113 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
4114 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
4115 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
4116 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
4117 },
4118 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
4119 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
4120 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
4121 },
4122 },
4123 },
4124 ],
4125 },
4126 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
4127 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
4128 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
4129 },
4130 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
4131 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
4132 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
4133 },
4134 },
4135 },
4136 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
4137 &quot;A String&quot;,
4138 ],
4139 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
4140 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
4141 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
4142 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
4143 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
4144 },
4145 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
4146 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
4147 },
4148 &quot;metrics&quot;: [ # Required. The metrics used for evaluation.
4149 { # The metric used for running evaluations.
4150 &quot;aggregationMetrics&quot;: [ # Optional. The aggregation metrics to use.
4151 &quot;A String&quot;,
4152 ],
4153 &quot;bleuSpec&quot;: { # Spec for bleu score metric - calculates the precision of n-grams in the prediction as compared to reference - returns a score ranging between 0 to 1. # Spec for bleu metric.
4154 &quot;useEffectiveOrder&quot;: True or False, # Optional. Whether to use_effective_order to compute bleu score.
4155 },
4156 &quot;computationBasedMetricSpec&quot;: { # Specification for a computation based metric. # Spec for a computation based metric.
4157 &quot;parameters&quot;: { # Optional. A map of parameters for the metric, e.g. {&quot;rouge_type&quot;: &quot;rougeL&quot;}.
4158 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4159 },
4160 &quot;type&quot;: &quot;A String&quot;, # Required. The type of the computation based metric.
4161 },
4162 &quot;customCodeExecutionSpec&quot;: { # Specificies a metric that is populated by evaluating user-defined Python code. # Spec for Custom Code Execution metric.
4163 &quot;evaluationFunction&quot;: &quot;A String&quot;, # Required. Python function. Expected user to define the following function, e.g.: def evaluate(instance: dict[str, Any]) -&gt; float: Please include this function signature in the code snippet. Instance is the evaluation instance, any fields populated in the instance are available to the function as instance[field_name]. Example: Example input: ``` instance= EvaluationInstance( response=EvaluationInstance.InstanceData(text=&quot;The answer is 4.&quot;), reference=EvaluationInstance.InstanceData(text=&quot;4&quot;) ) ``` Example converted input: ``` { &#x27;response&#x27;: {&#x27;text&#x27;: &#x27;The answer is 4.&#x27;}, &#x27;reference&#x27;: {&#x27;text&#x27;: &#x27;4&#x27;} } ``` Example python function: ``` def evaluate(instance: dict[str, Any]) -&gt; float: if instance&#x27;response&#x27; == instance&#x27;reference&#x27;: return 1.0 return 0.0 ``` CustomCodeExecutionSpec is also supported in Batch Evaluation (EvalDataset RPC) and Tuning Evaluation. Each line in the input jsonl file will be converted to dict[str, Any] and passed to the evaluation function.
4164 },
4165 &quot;exactMatchSpec&quot;: { # Spec for exact match metric - returns 1 if prediction and reference exactly matches, otherwise 0. # Spec for exact match metric.
4166 },
4167 &quot;llmBasedMetricSpec&quot;: { # Specification for an LLM based metric. # Spec for an LLM based metric.
4168 &quot;additionalConfig&quot;: { # Optional. Optional additional configuration for the metric.
4169 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4170 },
4171 &quot;judgeAutoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Optional configuration for the judge LLM (Autorater).
4172 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
4173 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
4174 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
4175 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
4176 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
4177 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
4178 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
4179 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
4180 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
4181 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
4182 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
4183 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
4184 },
4185 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
4186 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
4187 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
4188 },
4189 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
4190 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
4191 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
4192 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
4193 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
4194 { # Configuration for the model to configure output formatting and delivery.
4195 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
4196 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
4197 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
4198 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
4199 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
4200 },
4201 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
4202 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
4203 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
4204 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
4205 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
4206 },
4207 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
4208 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
4209 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
4210 },
4211 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
4212 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
4213 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
4214 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
4215 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
4216 },
4217 },
4218 ],
4219 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
4220 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
4221 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
4222 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
4223 &quot;A String&quot;,
4224 ],
4225 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
4226 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
4227 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
4228 # Object with schema name: GoogleCloudAiplatformV1Schema
4229 ],
4230 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
4231 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
4232 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
4233 },
4234 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
4235 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
4236 &quot;A String&quot;,
4237 ],
4238 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
4239 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
4240 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
4241 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
4242 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
4243 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
4244 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
4245 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
4246 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
4247 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
4248 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
4249 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
4250 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
4251 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
4252 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
4253 },
4254 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
4255 &quot;A String&quot;,
4256 ],
4257 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
4258 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
4259 &quot;A String&quot;,
4260 ],
4261 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
4262 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
4263 },
4264 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
4265 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
4266 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
4267 },
4268 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
4269 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
4270 },
4271 },
4272 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
4273 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
4274 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
4275 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
4276 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
4277 { # Configuration for a single speaker in a multi-speaker setup.
4278 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
4279 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
4280 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
4281 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
4282 },
4283 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
4284 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
4285 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
4286 },
4287 },
4288 },
4289 ],
4290 },
4291 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
4292 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
4293 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
4294 },
4295 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
4296 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
4297 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
4298 },
4299 },
4300 },
4301 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
4302 &quot;A String&quot;,
4303 ],
4304 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
4305 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
4306 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
4307 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
4308 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
4309 },
4310 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
4311 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
4312 },
4313 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
4314 },
4315 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Template for the prompt sent to the judge model.
4316 &quot;predefinedRubricGenerationSpec&quot;: { # The spec for a pre-defined metric. # Dynamically generate rubrics using a predefined spec.
4317 &quot;metricSpecName&quot;: &quot;A String&quot;, # Required. The name of a pre-defined metric, such as &quot;instruction_following_v1&quot; or &quot;text_quality_v1&quot;.
4318 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
4319 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4320 },
4321 },
4322 &quot;resultParserConfig&quot;: { # Config for parsing LLM responses. It can be used to parse the LLM response to be evaluated, or the LLM response from LLM-based metrics/Autoraters. # Optional. The parser config for the metric result.
4323 &quot;customCodeParserConfig&quot;: { # Configuration for parsing the LLM response using custom code. # Optional. Use custom code to parse the LLM response.
4324 &quot;parsingFunction&quot;: &quot;A String&quot;, # Required. Python function for parsing results. The function should be defined within this string. The function takes a list of strings (LLM responses) and should return either a list of dictionaries (for rubrics) or a single dictionary (for a metric result). Example function signature: def parse(responses: list[str]) -&gt; list[dict[str, Any]] | dict[str, Any]: When parsing rubrics, return a list of dictionaries, where each dictionary represents a Rubric. Example for rubrics: [ { &quot;content&quot;: {&quot;property&quot;: {&quot;description&quot;: &quot;The response is factual.&quot;}}, &quot;type&quot;: &quot;FACTUALITY&quot;, &quot;importance&quot;: &quot;HIGH&quot; }, { &quot;content&quot;: {&quot;property&quot;: {&quot;description&quot;: &quot;The response is fluent.&quot;}}, &quot;type&quot;: &quot;FLUENCY&quot;, &quot;importance&quot;: &quot;MEDIUM&quot; } ] When parsing critique results, return a dictionary representing a MetricResult. Example for a metric result: { &quot;score&quot;: 0.8, &quot;explanation&quot;: &quot;The model followed most instructions.&quot;, &quot;rubric_verdicts&quot;: [...] } ... code for result extraction and aggregation
4325 },
4326 },
4327 &quot;rubricGenerationSpec&quot;: { # Specification for how rubrics should be generated. # Dynamically generate rubrics using this specification.
4328 &quot;modelConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Configuration for the model used in rubric generation. Configs including sampling count and base model can be specified here. Flipping is not supported for rubric generation.
4329 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
4330 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
4331 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
4332 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
4333 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
4334 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
4335 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
4336 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
4337 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
4338 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
4339 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
4340 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
4341 },
4342 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
4343 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
4344 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
4345 },
4346 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
4347 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
4348 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
4349 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
4350 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
4351 { # Configuration for the model to configure output formatting and delivery.
4352 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
4353 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
4354 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
4355 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
4356 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
4357 },
4358 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
4359 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
4360 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
4361 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
4362 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
4363 },
4364 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
4365 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
4366 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
4367 },
4368 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
4369 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
4370 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
4371 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
4372 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
4373 },
4374 },
4375 ],
4376 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
4377 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
4378 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
4379 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
4380 &quot;A String&quot;,
4381 ],
4382 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
4383 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
4384 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
4385 # Object with schema name: GoogleCloudAiplatformV1Schema
4386 ],
4387 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
4388 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
4389 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
4390 },
4391 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
4392 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
4393 &quot;A String&quot;,
4394 ],
4395 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
4396 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
4397 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
4398 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
4399 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
4400 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
4401 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
4402 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
4403 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
4404 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
4405 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
4406 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
4407 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
4408 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
4409 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
4410 },
4411 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
4412 &quot;A String&quot;,
4413 ],
4414 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
4415 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
4416 &quot;A String&quot;,
4417 ],
4418 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
4419 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
4420 },
4421 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
4422 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
4423 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
4424 },
4425 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
4426 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
4427 },
4428 },
4429 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
4430 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
4431 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
4432 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
4433 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
4434 { # Configuration for a single speaker in a multi-speaker setup.
4435 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
4436 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
4437 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
4438 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
4439 },
4440 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
4441 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
4442 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
4443 },
4444 },
4445 },
4446 ],
4447 },
4448 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
4449 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
4450 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
4451 },
4452 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
4453 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
4454 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
4455 },
4456 },
4457 },
4458 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
4459 &quot;A String&quot;,
4460 ],
4461 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
4462 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
4463 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
4464 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
4465 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
4466 },
4467 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
4468 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
4469 },
4470 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
4471 },
4472 &quot;promptTemplate&quot;: &quot;A String&quot;, # Template for the prompt used to generate rubrics. The details should be updated based on the most-recent recipe requirements.
4473 &quot;rubricContentType&quot;: &quot;A String&quot;, # The type of rubric content to be generated.
4474 &quot;rubricTypeOntology&quot;: [ # Optional. An optional, pre-defined list of allowed types for generated rubrics. If this field is provided, it implies `include_rubric_type` should be true, and the generated rubric types should be chosen from this ontology.
4475 &quot;A String&quot;,
4476 ],
4477 },
4478 &quot;rubricGroupKey&quot;: &quot;A String&quot;, # Use a pre-defined group of rubrics associated with the input. Refers to a key in the rubric_groups map of EvaluationInstance.
4479 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for the judge model.
4480 },
4481 &quot;metadata&quot;: { # Metadata about the metric, used for visualization and organization. # Optional. Metadata about the metric, used for visualization and organization.
4482 &quot;otherMetadata&quot;: { # Optional. Flexible metadata for user-defined attributes.
4483 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4484 },
4485 &quot;scoreRange&quot;: { # The range of possible scores for this metric, used for plotting. # Optional. The range of possible scores for this metric, used for plotting.
4486 &quot;description&quot;: &quot;A String&quot;, # Optional. The description of the score explaining the directionality etc.
4487 &quot;max&quot;: 3.14, # Required. The maximum value of the score range (inclusive).
4488 &quot;min&quot;: 3.14, # Required. The minimum value of the score range (inclusive).
4489 &quot;step&quot;: 3.14, # Optional. The distance between discrete steps in the range. If unset, the range is assumed to be continuous.
4490 },
4491 &quot;title&quot;: &quot;A String&quot;, # Optional. The user-friendly name for the metric. If not set for a registered metric, it will default to the metric&#x27;s display name.
4492 },
4493 &quot;pairwiseMetricSpec&quot;: { # Spec for pairwise metric. # Spec for pairwise metric.
4494 &quot;baselineResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the baseline response.
4495 &quot;candidateResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the candidate response.
4496 &quot;customOutputFormatConfig&quot;: { # Spec for custom output format configuration. # Optional. CustomOutputFormatConfig allows customization of metric output. When this config is set, the default output is replaced with the raw output string. If a custom format is chosen, the `pairwise_choice` and `explanation` fields in the corresponding metric result will be empty.
4497 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
4498 },
4499 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pairwise metric.
4500 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pairwise metric.
4501 },
4502 &quot;pointwiseMetricSpec&quot;: { # Spec for pointwise metric. # Spec for pointwise metric.
4503 &quot;customOutputFormatConfig&quot;: { # Spec for custom output format configuration. # Optional. CustomOutputFormatConfig allows customization of metric output. By default, metrics return a score and explanation. When this config is set, the default output is replaced with either: - The raw output string. - A parsed output based on a user-defined schema. If a custom format is chosen, the `score` and `explanation` fields in the corresponding metric result will be empty.
4504 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
4505 },
4506 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pointwise metric.
4507 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pointwise metric.
4508 },
4509 &quot;predefinedMetricSpec&quot;: { # The spec for a pre-defined metric. # The spec for a pre-defined metric.
4510 &quot;metricSpecName&quot;: &quot;A String&quot;, # Required. The name of a pre-defined metric, such as &quot;instruction_following_v1&quot; or &quot;text_quality_v1&quot;.
4511 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
4512 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4513 },
4514 },
4515 &quot;rougeSpec&quot;: { # Spec for rouge score metric - calculates the recall of n-grams in prediction as compared to reference - returns a score ranging between 0 and 1. # Spec for rouge metric.
4516 &quot;rougeType&quot;: &quot;A String&quot;, # Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum.
4517 &quot;splitSummaries&quot;: True or False, # Optional. Whether to split summaries while using rougeLsum.
4518 &quot;useStemmer&quot;: True or False, # Optional. Whether to use stemmer to compute rouge score.
4519 },
4520 },
4521 ],
4522 &quot;outputConfig&quot;: { # Config for evaluation output. # Required. Config for evaluation output.
4523 &quot;gcsDestination&quot;: { # The Google Cloud Storage location where the output is to be written to. # Cloud storage destination for evaluation output.
4524 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
4525 },
4526 },
4527 },
4528 &quot;exportLastCheckpointOnly&quot;: True or False, # Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. Default is false.
4529 &quot;hyperParameters&quot;: { # Hyperparameters for SFT. # Optional. Hyperparameters for SFT.
4530 &quot;adapterSize&quot;: &quot;A String&quot;, # Optional. Adapter size for tuning.
4531 &quot;epochCount&quot;: &quot;A String&quot;, # Optional. Number of complete passes the model makes over the entire training dataset during training.
4532 &quot;learningRateMultiplier&quot;: 3.14, # Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. This feature is only available for 1P models.
4533 },
4534 &quot;trainingDatasetUri&quot;: &quot;A String&quot;, # Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
4535 &quot;validationDatasetUri&quot;: &quot;A String&quot;, # Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
4536 },
4537 &quot;tunedModel&quot;: { # The Model Registry Model and Online Prediction Endpoint associated with this TuningJob. # Output only. The tuned model resources associated with this TuningJob.
4538 &quot;checkpoints&quot;: [ # Output only. The checkpoints associated with this TunedModel. This field is only populated for tuning jobs that enable intermediate checkpoints.
4539 { # TunedModelCheckpoint for the Tuned Model of a Tuning Job.
4540 &quot;checkpointId&quot;: &quot;A String&quot;, # The ID of the checkpoint.
4541 &quot;endpoint&quot;: &quot;A String&quot;, # The Endpoint resource name that the checkpoint is deployed to. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
4542 &quot;epoch&quot;: &quot;A String&quot;, # The epoch of the checkpoint.
4543 &quot;step&quot;: &quot;A String&quot;, # The step of the checkpoint.
4544 },
4545 ],
4546 &quot;endpoint&quot;: &quot;A String&quot;, # Output only. A resource name of an Endpoint. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
4547 &quot;model&quot;: &quot;A String&quot;, # Output only. The resource name of the TunedModel. Format: `projects/{project}/locations/{location}/models/{model}@{version_id}` When tuning from a base model, the version ID will be 1. For continuous tuning, if the provided tuned_model_display_name is set and different from parent model&#x27;s display name, the tuned model will have a new parent model with version 1. Otherwise the version id will be incremented by 1 from the last version ID in the parent model. E.g., `projects/{project}/locations/{location}/models/{model}@{last_version_id + 1}`
4548 },
4549 &quot;tunedModelDisplayName&quot;: &quot;A String&quot;, # Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. For continuous tuning, tuned_model_display_name will by default use the same display name as the pre-tuned model. If a new display name is provided, the tuning job will create a new model instead of a new version.
4550 &quot;tuningDataStats&quot;: { # The tuning data statistic values for TuningJob. # Output only. The tuning data statistics associated with this TuningJob.
4551 &quot;preferenceOptimizationDataStats&quot;: { # Statistics computed for datasets used for preference optimization. # Output only. Statistics for preference optimization.
4552 &quot;droppedExampleIndices&quot;: [ # Output only. A partial sample of the indices (starting from 1) of the dropped examples.
4553 &quot;A String&quot;,
4554 ],
4555 &quot;droppedExampleReasons&quot;: [ # Output only. For each index in `dropped_example_indices`, the user-facing reason why the example was dropped.
4556 &quot;A String&quot;,
4557 ],
4558 &quot;scoreVariancePerExampleDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for scores variance per example.
4559 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
4560 { # Dataset bucket used to create a histogram for the distribution given a population of values.
4561 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
4562 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
4563 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
4564 },
4565 ],
4566 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
4567 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
4568 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
4569 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
4570 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
4571 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
4572 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
4573 },
4574 &quot;scoresDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for scores.
4575 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
4576 { # Dataset bucket used to create a histogram for the distribution given a population of values.
4577 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
4578 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
4579 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
4580 },
4581 ],
4582 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
4583 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
4584 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
4585 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
4586 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
4587 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
4588 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
4589 },
4590 &quot;totalBillableTokenCount&quot;: &quot;A String&quot;, # Output only. Number of billable tokens in the tuning dataset.
4591 &quot;tuningDatasetExampleCount&quot;: &quot;A String&quot;, # Output only. Number of examples in the tuning dataset.
4592 &quot;tuningStepCount&quot;: &quot;A String&quot;, # Output only. Number of tuning steps for this Tuning Job.
4593 &quot;userDatasetExamples&quot;: [ # Output only. Sample user examples in the training dataset.
4594 { # Input example for preference optimization.
4595 &quot;completions&quot;: [ # List of completions for a given prompt.
4596 { # Completion and its preference score.
4597 &quot;completion&quot;: { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message. # Single turn completion for the given prompt.
4598 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
4599 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
4600 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
4601 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
4602 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
4603 },
4604 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
4605 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
4606 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
4607 },
4608 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
4609 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
4610 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
4611 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4612 },
4613 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
4614 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
4615 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4616 },
4617 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
4618 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
4619 { # Partial argument value of the function call.
4620 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
4621 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
4622 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
4623 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
4624 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
4625 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
4626 },
4627 ],
4628 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
4629 },
4630 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
4631 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
4632 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
4633 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
4634 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
4635 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
4636 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
4637 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4638 },
4639 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
4640 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
4641 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
4642 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4643 },
4644 },
4645 ],
4646 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
4647 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4648 },
4649 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
4650 },
4651 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
4652 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
4653 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
4654 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4655 },
4656 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
4657 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
4658 },
4659 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
4660 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
4661 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
4662 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
4663 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
4664 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
4665 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
4666 },
4667 },
4668 ],
4669 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
4670 },
4671 &quot;score&quot;: 3.14, # The score for the given completion.
4672 },
4673 ],
4674 &quot;contents&quot;: [ # Multi-turn contents that represents the Prompt.
4675 { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message.
4676 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
4677 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
4678 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
4679 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
4680 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
4681 },
4682 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
4683 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
4684 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
4685 },
4686 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
4687 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
4688 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
4689 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4690 },
4691 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
4692 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
4693 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4694 },
4695 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
4696 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
4697 { # Partial argument value of the function call.
4698 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
4699 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
4700 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
4701 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
4702 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
4703 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
4704 },
4705 ],
4706 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
4707 },
4708 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
4709 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
4710 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
4711 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
4712 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
4713 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
4714 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
4715 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4716 },
4717 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
4718 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
4719 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
4720 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4721 },
4722 },
4723 ],
4724 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
4725 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4726 },
4727 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
4728 },
4729 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
4730 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
4731 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
4732 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4733 },
4734 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
4735 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
4736 },
4737 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
4738 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
4739 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
4740 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
4741 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
4742 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
4743 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
4744 },
4745 },
4746 ],
4747 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
4748 },
4749 ],
4750 },
4751 ],
4752 &quot;userInputTokenDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for the user input tokens.
4753 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
4754 { # Dataset bucket used to create a histogram for the distribution given a population of values.
4755 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
4756 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
4757 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
4758 },
4759 ],
4760 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
4761 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
4762 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
4763 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
4764 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
4765 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
4766 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
4767 },
4768 &quot;userOutputTokenDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for the user output tokens.
4769 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
4770 { # Dataset bucket used to create a histogram for the distribution given a population of values.
4771 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
4772 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
4773 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
4774 },
4775 ],
4776 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
4777 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
4778 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
4779 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
4780 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
4781 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
4782 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
4783 },
4784 },
4785 &quot;supervisedTuningDataStats&quot;: { # Tuning data statistics for Supervised Tuning. # The SFT Tuning data stats.
4786 &quot;droppedExampleReasons&quot;: [ # Output only. For each index in `truncated_example_indices`, the user-facing reason why the example was dropped.
4787 &quot;A String&quot;,
4788 ],
4789 &quot;totalBillableCharacterCount&quot;: &quot;A String&quot;, # Output only. Number of billable characters in the tuning dataset.
4790 &quot;totalBillableTokenCount&quot;: &quot;A String&quot;, # Output only. Number of billable tokens in the tuning dataset.
4791 &quot;totalTruncatedExampleCount&quot;: &quot;A String&quot;, # Output only. The number of examples in the dataset that have been dropped. An example can be dropped for reasons including: too many tokens, contains an invalid image, contains too many images, etc.
4792 &quot;totalTuningCharacterCount&quot;: &quot;A String&quot;, # Output only. Number of tuning characters in the tuning dataset.
4793 &quot;truncatedExampleIndices&quot;: [ # Output only. A partial sample of the indices (starting from 1) of the dropped examples.
4794 &quot;A String&quot;,
4795 ],
4796 &quot;tuningDatasetExampleCount&quot;: &quot;A String&quot;, # Output only. Number of examples in the tuning dataset.
4797 &quot;tuningStepCount&quot;: &quot;A String&quot;, # Output only. Number of tuning steps for this Tuning Job.
4798 &quot;userDatasetExamples&quot;: [ # Output only. Sample user messages in the training dataset uri.
4799 { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message.
4800 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
4801 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
4802 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
4803 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
4804 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
4805 },
4806 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
4807 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
4808 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
4809 },
4810 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
4811 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
4812 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
4813 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4814 },
4815 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
4816 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
4817 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4818 },
4819 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
4820 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
4821 { # Partial argument value of the function call.
4822 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
4823 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
4824 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
4825 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
4826 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
4827 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
4828 },
4829 ],
4830 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
4831 },
4832 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
4833 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
4834 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
4835 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
4836 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
4837 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
4838 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
4839 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4840 },
4841 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
4842 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
4843 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
4844 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4845 },
4846 },
4847 ],
4848 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
4849 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4850 },
4851 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
4852 },
4853 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
4854 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
4855 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
4856 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4857 },
4858 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
4859 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
4860 },
4861 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
4862 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
4863 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
4864 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
4865 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
4866 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
4867 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
4868 },
4869 },
4870 ],
4871 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
4872 },
4873 ],
4874 &quot;userInputTokenDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the user input tokens.
4875 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
4876 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
4877 { # Dataset bucket used to create a histogram for the distribution given a population of values.
4878 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
4879 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
4880 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
4881 },
4882 ],
4883 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
4884 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
4885 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
4886 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
4887 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
4888 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
4889 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
4890 },
4891 &quot;userMessagePerExampleDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the messages per example.
4892 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
4893 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
4894 { # Dataset bucket used to create a histogram for the distribution given a population of values.
4895 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
4896 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
4897 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
4898 },
4899 ],
4900 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
4901 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
4902 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
4903 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
4904 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
4905 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
4906 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
4907 },
4908 &quot;userOutputTokenDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the user output tokens.
4909 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
4910 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
4911 { # Dataset bucket used to create a histogram for the distribution given a population of values.
4912 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
4913 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
4914 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
4915 },
4916 ],
4917 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
4918 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
4919 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
4920 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
4921 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
4922 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
4923 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
4924 },
4925 },
4926 },
4927 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob was most recently updated.
4928 },
4929 ],
4930 }</pre>
4931 </div>
4932
4933 <div class="method">
4934 <code class="details" id="list_next">list_next()</code>
4935 <pre>Retrieves the next page of results.
4936
4937 Args:
4938 previous_request: The request for the previous page. (required)
4939 previous_response: The response from the request for the previous page. (required)
4940
4941 Returns:
4942 A request object that you can call &#x27;execute()&#x27; on to request the next
4943 page. Returns None if there are no more items in the collection.
4944 </pre>
4945 </div>
4946
4947 <div class="method">
4948 <code class="details" id="rebaseTunedModel">rebaseTunedModel(parent, body=None, x__xgafv=None)</code>
4949 <pre>Rebase a tuned model. A rebase operation takes a model that was previously tuned on a base model version, and retunes it on a new base model version. The rebase operation creates a new tuning job and a new tuned model.
4950
4951 Args:
4952 parent: string, Required. The resource name of the location in which to rebase the Model. Format: `projects/{project}/locations/{location}` (required)
4953 body: object, The request body.
4954 The object takes the form of:
4955
4956 { # Request message for GenAiTuningService.RebaseTunedModel.
4957 &quot;artifactDestination&quot;: { # The Google Cloud Storage location where the output is to be written to. # Optional. The Google Cloud Storage location to write the artifacts to.
4958 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
4959 },
4960 &quot;deployToSameEndpoint&quot;: True or False, # Optional. By default, rebasing a model creates a new endpoint for the new model. If this flag is set to true, the new model will be deployed to the same endpoint as the original model. WARNING: If you deploy to the same endpoint, the original model will be un-deployed and replaced by the new model.
4961 &quot;tunedModelRef&quot;: { # TunedModel Reference for legacy model migration. # Required. A reference to the tuned model to rebase.
4962 &quot;pipelineJob&quot;: &quot;A String&quot;, # Support migration from tuning job list page, from bison model to gemini model.
4963 &quot;tunedModel&quot;: &quot;A String&quot;, # Support migration from model registry.
4964 &quot;tuningJob&quot;: &quot;A String&quot;, # Support migration from tuning job list page, from gemini-1.0-pro-002 to 1.5 and above.
4965 },
4966 &quot;tuningJob&quot;: { # Represents a TuningJob that runs with Google owned models. # Optional. The tuning job to be updated. Users can use this field to overwrite tuning configs.
4967 &quot;baseModel&quot;: &quot;A String&quot;, # The base model that is being tuned. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).
4968 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob was created.
4969 &quot;description&quot;: &quot;A String&quot;, # Optional. The description of the TuningJob.
4970 &quot;encryptionSpec&quot;: { # Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource. # Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key.
4971 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Resource name of the Cloud KMS key used to protect the resource. The Cloud KMS key must be in the same region as the resource. It must have the format `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
4972 },
4973 &quot;endTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob entered any of the following JobStates: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
4974 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when job&#x27;s state is `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
4975 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
4976 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
4977 {
4978 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
4979 },
4980 ],
4981 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
4982 },
4983 &quot;evaluateDatasetRuns&quot;: [ # Output only. Evaluation runs for the Tuning Job.
4984 { # Evaluate Dataset Run Result for Tuning Job.
4985 &quot;checkpointId&quot;: &quot;A String&quot;, # Output only. The checkpoint id used in the evaluation run. Only populated when evaluating checkpoints.
4986 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The error of the evaluation run if any.
4987 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
4988 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
4989 {
4990 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
4991 },
4992 ],
4993 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
4994 },
4995 &quot;evaluateDatasetResponse&quot;: { # The results from an evaluation run performed by the EvaluationService. # Output only. Results for EvaluationService.
4996 &quot;aggregationOutput&quot;: { # The aggregation result for the entire dataset and all metrics. # Output only. Aggregation statistics derived from results of EvaluationService.
4997 &quot;aggregationResults&quot;: [ # One AggregationResult per metric.
4998 { # The aggregation result for a single metric.
4999 &quot;aggregationMetric&quot;: &quot;A String&quot;, # Aggregation metric.
5000 &quot;bleuMetricValue&quot;: { # Bleu metric value for an instance. # Results for bleu metric.
5001 &quot;score&quot;: 3.14, # Output only. Bleu score.
5002 },
5003 &quot;customCodeExecutionResult&quot;: { # Result for custom code execution metric. # Result for code execution metric.
5004 &quot;score&quot;: 3.14, # Output only. Custom code execution score.
5005 },
5006 &quot;exactMatchMetricValue&quot;: { # Exact match metric value for an instance. # Results for exact match metric.
5007 &quot;score&quot;: 3.14, # Output only. Exact match score.
5008 },
5009 &quot;pairwiseMetricResult&quot;: { # Spec for pairwise metric result. # Result for pairwise metric.
5010 &quot;customOutput&quot;: { # Spec for custom output. # Output only. Spec for custom output.
5011 &quot;rawOutputs&quot;: { # Raw output. # Output only. List of raw output strings.
5012 &quot;rawOutput&quot;: [ # Output only. Raw output string.
5013 &quot;A String&quot;,
5014 ],
5015 },
5016 },
5017 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for pairwise metric score.
5018 &quot;pairwiseChoice&quot;: &quot;A String&quot;, # Output only. Pairwise metric choice.
5019 },
5020 &quot;pointwiseMetricResult&quot;: { # Spec for pointwise metric result. # Result for pointwise metric.
5021 &quot;customOutput&quot;: { # Spec for custom output. # Output only. Spec for custom output.
5022 &quot;rawOutputs&quot;: { # Raw output. # Output only. List of raw output strings.
5023 &quot;rawOutput&quot;: [ # Output only. Raw output string.
5024 &quot;A String&quot;,
5025 ],
5026 },
5027 },
5028 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for pointwise metric score.
5029 &quot;score&quot;: 3.14, # Output only. Pointwise metric score.
5030 },
5031 &quot;rougeMetricValue&quot;: { # Rouge metric value for an instance. # Results for rouge metric.
5032 &quot;score&quot;: 3.14, # Output only. Rouge score.
5033 },
5034 },
5035 ],
5036 &quot;dataset&quot;: { # The dataset used for evaluation. # The dataset used for evaluation &amp; aggregation.
5037 &quot;bigquerySource&quot;: { # The BigQuery location for the input content. # BigQuery source holds the dataset.
5038 &quot;inputUri&quot;: &quot;A String&quot;, # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
5039 },
5040 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Cloud storage source holds the dataset. Currently only one Cloud Storage file path is supported.
5041 &quot;uris&quot;: [ # Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/wildcards.
5042 &quot;A String&quot;,
5043 ],
5044 },
5045 },
5046 },
5047 &quot;outputInfo&quot;: { # Describes the info for output of EvaluationService. # Output only. Output info for EvaluationService.
5048 &quot;gcsOutputDirectory&quot;: &quot;A String&quot;, # Output only. The full path of the Cloud Storage directory created, into which the evaluation results and aggregation results are written.
5049 },
5050 },
5051 &quot;evaluationRun&quot;: &quot;A String&quot;, # Output only. The resource name of the evaluation run. Format: `projects/{project}/locations/{location}/evaluationRuns/{evaluation_run_id}`.
5052 &quot;operationName&quot;: &quot;A String&quot;, # Output only. Deprecated: The updated architecture uses evaluation_run instead.
5053 },
5054 ],
5055 &quot;experiment&quot;: &quot;A String&quot;, # Output only. The Experiment associated with this TuningJob.
5056 &quot;labels&quot;: { # Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
5057 &quot;a_key&quot;: &quot;A String&quot;,
5058 },
5059 &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. Resource name of a TuningJob. Format: `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
5060 &quot;preTunedModel&quot;: { # A pre-tuned model for continuous tuning. # The pre-tuned model for continuous tuning.
5061 &quot;baseModel&quot;: &quot;A String&quot;, # Output only. The name of the base model this PreTunedModel was tuned from.
5062 &quot;checkpointId&quot;: &quot;A String&quot;, # Optional. The source checkpoint id. If not specified, the default checkpoint will be used.
5063 &quot;tunedModelName&quot;: &quot;A String&quot;, # The resource name of the Model. E.g., a model resource name with a specified version id or alias: `projects/{project}/locations/{location}/models/{model}@{version_id}` `projects/{project}/locations/{location}/models/{model}@{alias}` Or, omit the version id to use the default version: `projects/{project}/locations/{location}/models/{model}`
5064 },
5065 &quot;preferenceOptimizationSpec&quot;: { # Tuning Spec for Preference Optimization. # Tuning Spec for Preference Optimization.
5066 &quot;exportLastCheckpointOnly&quot;: True or False, # Optional. If set to true, disable intermediate checkpoints for Preference Optimization and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for Preference Optimization. Default is false.
5067 &quot;hyperParameters&quot;: { # Hyperparameters for Preference Optimization. # Optional. Hyperparameters for Preference Optimization.
5068 &quot;adapterSize&quot;: &quot;A String&quot;, # Optional. Adapter size for preference optimization.
5069 &quot;beta&quot;: 3.14, # Optional. Weight for KL Divergence regularization.
5070 &quot;epochCount&quot;: &quot;A String&quot;, # Optional. Number of complete passes the model makes over the entire training dataset during training.
5071 &quot;learningRateMultiplier&quot;: 3.14, # Optional. Multiplier for adjusting the default learning rate.
5072 },
5073 &quot;trainingDatasetUri&quot;: &quot;A String&quot;, # Required. Cloud Storage path to file containing training dataset for preference optimization tuning. The dataset must be formatted as a JSONL file.
5074 &quot;validationDatasetUri&quot;: &quot;A String&quot;, # Optional. Cloud Storage path to file containing validation dataset for preference optimization tuning. The dataset must be formatted as a JSONL file.
5075 },
5076 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent Users starting the pipeline must have the `iam.serviceAccounts.actAs` permission on this service account.
5077 &quot;startTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob for the first time entered the `JOB_STATE_RUNNING` state.
5078 &quot;state&quot;: &quot;A String&quot;, # Output only. The detailed state of the job.
5079 &quot;supervisedTuningSpec&quot;: { # Tuning Spec for Supervised Tuning for first party models. # Tuning Spec for Supervised Fine Tuning.
5080 &quot;evaluationConfig&quot;: { # Evaluation Config for Tuning Job. # Optional. Evaluation Config for Tuning Job.
5081 &quot;autoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Autorater config for evaluation.
5082 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
5083 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
5084 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
5085 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
5086 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
5087 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
5088 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
5089 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
5090 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
5091 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
5092 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
5093 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
5094 },
5095 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
5096 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
5097 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
5098 },
5099 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
5100 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
5101 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
5102 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
5103 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
5104 { # Configuration for the model to configure output formatting and delivery.
5105 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
5106 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
5107 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5108 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
5109 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
5110 },
5111 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
5112 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
5113 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5114 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
5115 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
5116 },
5117 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
5118 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
5119 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
5120 },
5121 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
5122 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
5123 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5124 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
5125 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
5126 },
5127 },
5128 ],
5129 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
5130 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
5131 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
5132 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
5133 &quot;A String&quot;,
5134 ],
5135 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
5136 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
5137 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
5138 # Object with schema name: GoogleCloudAiplatformV1Schema
5139 ],
5140 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
5141 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
5142 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
5143 },
5144 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
5145 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
5146 &quot;A String&quot;,
5147 ],
5148 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
5149 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
5150 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
5151 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
5152 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
5153 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
5154 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
5155 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
5156 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
5157 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
5158 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
5159 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
5160 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
5161 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
5162 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
5163 },
5164 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
5165 &quot;A String&quot;,
5166 ],
5167 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
5168 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
5169 &quot;A String&quot;,
5170 ],
5171 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
5172 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
5173 },
5174 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
5175 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
5176 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
5177 },
5178 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
5179 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
5180 },
5181 },
5182 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
5183 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
5184 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
5185 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
5186 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
5187 { # Configuration for a single speaker in a multi-speaker setup.
5188 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
5189 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
5190 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
5191 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
5192 },
5193 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
5194 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
5195 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
5196 },
5197 },
5198 },
5199 ],
5200 },
5201 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
5202 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
5203 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
5204 },
5205 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
5206 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
5207 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
5208 },
5209 },
5210 },
5211 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
5212 &quot;A String&quot;,
5213 ],
5214 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
5215 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
5216 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
5217 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
5218 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
5219 },
5220 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
5221 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
5222 },
5223 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
5224 },
5225 &quot;datasetCustomMetrics&quot;: [ # Optional. Specifications for custom dataset-level aggregations.
5226 { # Defines a custom dataset-level aggregation.
5227 &quot;aggregationFunction&quot;: &quot;A String&quot;, # Required. The Python code string containing the aggregation function. Expected function signature: `def aggregate(instances: list[dict[str, Any]]) -&gt; dict[str, float]:` The `instances` argument is a list of dictionaries, where each dictionary represents a single evaluation result item. The structure of each dictionary corresponds to the fields in the `EvaluationResult` message. This includes: - `&quot;request&quot;`: Contains the original input data and model inputs (from `EvaluationResult.EvaluationRequest`). - `&quot;candidate_results&quot;`: Contains the results of any instance-level metrics (from `EvaluationResult.CandidateResults`). Example of a single item in the `instances` list: { &quot;request&quot;: { &quot;prompt&quot;: {&quot;text&quot;: &quot;What is the capital of France?&quot;}, &quot;golden_response&quot;: {&quot;text&quot;: &quot;Paris&quot;}, &quot;candidate_responses&quot;: [{&quot;candidate&quot;: &quot;model-v1&quot;, &quot;text&quot;: &quot;Paris&quot;}] }, &quot;candidate_results&quot;: [ {&quot;metric&quot;: &quot;exact_match&quot;, &quot;score&quot;: 1.0}, {&quot;metric&quot;: &quot;bleu&quot;, &quot;score&quot;: 0.9} ] }
5228 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A display name for this custom summary metric. Used to prefix keys in the output summaryMetrics map. If not provided, a default name like &quot;dataset_custom_metric_1&quot;, &quot;dataset_custom_metric_2&quot;, etc., will be generated based on the order in the repeated field.
5229 },
5230 ],
5231 &quot;inferenceGenerationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for inference generation and outputs. If not set, default generation parameters are used.
5232 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
5233 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
5234 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
5235 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
5236 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
5237 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
5238 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
5239 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
5240 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
5241 },
5242 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
5243 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
5244 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
5245 },
5246 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
5247 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
5248 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
5249 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
5250 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
5251 { # Configuration for the model to configure output formatting and delivery.
5252 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
5253 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
5254 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5255 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
5256 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
5257 },
5258 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
5259 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
5260 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5261 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
5262 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
5263 },
5264 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
5265 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
5266 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
5267 },
5268 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
5269 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
5270 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5271 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
5272 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
5273 },
5274 },
5275 ],
5276 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
5277 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
5278 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
5279 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
5280 &quot;A String&quot;,
5281 ],
5282 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
5283 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
5284 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
5285 # Object with schema name: GoogleCloudAiplatformV1Schema
5286 ],
5287 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
5288 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
5289 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
5290 },
5291 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
5292 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
5293 &quot;A String&quot;,
5294 ],
5295 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
5296 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
5297 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
5298 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
5299 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
5300 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
5301 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
5302 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
5303 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
5304 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
5305 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
5306 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
5307 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
5308 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
5309 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
5310 },
5311 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
5312 &quot;A String&quot;,
5313 ],
5314 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
5315 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
5316 &quot;A String&quot;,
5317 ],
5318 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
5319 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
5320 },
5321 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
5322 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
5323 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
5324 },
5325 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
5326 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
5327 },
5328 },
5329 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
5330 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
5331 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
5332 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
5333 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
5334 { # Configuration for a single speaker in a multi-speaker setup.
5335 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
5336 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
5337 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
5338 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
5339 },
5340 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
5341 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
5342 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
5343 },
5344 },
5345 },
5346 ],
5347 },
5348 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
5349 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
5350 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
5351 },
5352 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
5353 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
5354 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
5355 },
5356 },
5357 },
5358 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
5359 &quot;A String&quot;,
5360 ],
5361 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
5362 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
5363 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
5364 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
5365 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
5366 },
5367 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
5368 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
5369 },
5370 &quot;metrics&quot;: [ # Required. The metrics used for evaluation.
5371 { # The metric used for running evaluations.
5372 &quot;aggregationMetrics&quot;: [ # Optional. The aggregation metrics to use.
5373 &quot;A String&quot;,
5374 ],
5375 &quot;bleuSpec&quot;: { # Spec for bleu score metric - calculates the precision of n-grams in the prediction as compared to reference - returns a score ranging between 0 to 1. # Spec for bleu metric.
5376 &quot;useEffectiveOrder&quot;: True or False, # Optional. Whether to use_effective_order to compute bleu score.
5377 },
5378 &quot;computationBasedMetricSpec&quot;: { # Specification for a computation based metric. # Spec for a computation based metric.
5379 &quot;parameters&quot;: { # Optional. A map of parameters for the metric, e.g. {&quot;rouge_type&quot;: &quot;rougeL&quot;}.
5380 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5381 },
5382 &quot;type&quot;: &quot;A String&quot;, # Required. The type of the computation based metric.
5383 },
5384 &quot;customCodeExecutionSpec&quot;: { # Specificies a metric that is populated by evaluating user-defined Python code. # Spec for Custom Code Execution metric.
5385 &quot;evaluationFunction&quot;: &quot;A String&quot;, # Required. Python function. Expected user to define the following function, e.g.: def evaluate(instance: dict[str, Any]) -&gt; float: Please include this function signature in the code snippet. Instance is the evaluation instance, any fields populated in the instance are available to the function as instance[field_name]. Example: Example input: ``` instance= EvaluationInstance( response=EvaluationInstance.InstanceData(text=&quot;The answer is 4.&quot;), reference=EvaluationInstance.InstanceData(text=&quot;4&quot;) ) ``` Example converted input: ``` { &#x27;response&#x27;: {&#x27;text&#x27;: &#x27;The answer is 4.&#x27;}, &#x27;reference&#x27;: {&#x27;text&#x27;: &#x27;4&#x27;} } ``` Example python function: ``` def evaluate(instance: dict[str, Any]) -&gt; float: if instance&#x27;response&#x27; == instance&#x27;reference&#x27;: return 1.0 return 0.0 ``` CustomCodeExecutionSpec is also supported in Batch Evaluation (EvalDataset RPC) and Tuning Evaluation. Each line in the input jsonl file will be converted to dict[str, Any] and passed to the evaluation function.
5386 },
5387 &quot;exactMatchSpec&quot;: { # Spec for exact match metric - returns 1 if prediction and reference exactly matches, otherwise 0. # Spec for exact match metric.
5388 },
5389 &quot;llmBasedMetricSpec&quot;: { # Specification for an LLM based metric. # Spec for an LLM based metric.
5390 &quot;additionalConfig&quot;: { # Optional. Optional additional configuration for the metric.
5391 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5392 },
5393 &quot;judgeAutoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Optional configuration for the judge LLM (Autorater).
5394 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
5395 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
5396 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
5397 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
5398 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
5399 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
5400 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
5401 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
5402 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
5403 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
5404 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
5405 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
5406 },
5407 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
5408 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
5409 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
5410 },
5411 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
5412 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
5413 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
5414 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
5415 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
5416 { # Configuration for the model to configure output formatting and delivery.
5417 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
5418 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
5419 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5420 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
5421 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
5422 },
5423 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
5424 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
5425 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5426 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
5427 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
5428 },
5429 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
5430 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
5431 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
5432 },
5433 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
5434 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
5435 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5436 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
5437 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
5438 },
5439 },
5440 ],
5441 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
5442 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
5443 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
5444 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
5445 &quot;A String&quot;,
5446 ],
5447 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
5448 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
5449 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
5450 # Object with schema name: GoogleCloudAiplatformV1Schema
5451 ],
5452 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
5453 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
5454 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
5455 },
5456 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
5457 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
5458 &quot;A String&quot;,
5459 ],
5460 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
5461 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
5462 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
5463 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
5464 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
5465 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
5466 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
5467 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
5468 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
5469 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
5470 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
5471 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
5472 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
5473 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
5474 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
5475 },
5476 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
5477 &quot;A String&quot;,
5478 ],
5479 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
5480 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
5481 &quot;A String&quot;,
5482 ],
5483 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
5484 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
5485 },
5486 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
5487 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
5488 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
5489 },
5490 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
5491 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
5492 },
5493 },
5494 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
5495 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
5496 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
5497 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
5498 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
5499 { # Configuration for a single speaker in a multi-speaker setup.
5500 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
5501 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
5502 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
5503 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
5504 },
5505 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
5506 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
5507 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
5508 },
5509 },
5510 },
5511 ],
5512 },
5513 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
5514 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
5515 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
5516 },
5517 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
5518 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
5519 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
5520 },
5521 },
5522 },
5523 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
5524 &quot;A String&quot;,
5525 ],
5526 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
5527 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
5528 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
5529 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
5530 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
5531 },
5532 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
5533 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
5534 },
5535 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
5536 },
5537 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Template for the prompt sent to the judge model.
5538 &quot;predefinedRubricGenerationSpec&quot;: { # The spec for a pre-defined metric. # Dynamically generate rubrics using a predefined spec.
5539 &quot;metricSpecName&quot;: &quot;A String&quot;, # Required. The name of a pre-defined metric, such as &quot;instruction_following_v1&quot; or &quot;text_quality_v1&quot;.
5540 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
5541 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5542 },
5543 },
5544 &quot;resultParserConfig&quot;: { # Config for parsing LLM responses. It can be used to parse the LLM response to be evaluated, or the LLM response from LLM-based metrics/Autoraters. # Optional. The parser config for the metric result.
5545 &quot;customCodeParserConfig&quot;: { # Configuration for parsing the LLM response using custom code. # Optional. Use custom code to parse the LLM response.
5546 &quot;parsingFunction&quot;: &quot;A String&quot;, # Required. Python function for parsing results. The function should be defined within this string. The function takes a list of strings (LLM responses) and should return either a list of dictionaries (for rubrics) or a single dictionary (for a metric result). Example function signature: def parse(responses: list[str]) -&gt; list[dict[str, Any]] | dict[str, Any]: When parsing rubrics, return a list of dictionaries, where each dictionary represents a Rubric. Example for rubrics: [ { &quot;content&quot;: {&quot;property&quot;: {&quot;description&quot;: &quot;The response is factual.&quot;}}, &quot;type&quot;: &quot;FACTUALITY&quot;, &quot;importance&quot;: &quot;HIGH&quot; }, { &quot;content&quot;: {&quot;property&quot;: {&quot;description&quot;: &quot;The response is fluent.&quot;}}, &quot;type&quot;: &quot;FLUENCY&quot;, &quot;importance&quot;: &quot;MEDIUM&quot; } ] When parsing critique results, return a dictionary representing a MetricResult. Example for a metric result: { &quot;score&quot;: 0.8, &quot;explanation&quot;: &quot;The model followed most instructions.&quot;, &quot;rubric_verdicts&quot;: [...] } ... code for result extraction and aggregation
5547 },
5548 },
5549 &quot;rubricGenerationSpec&quot;: { # Specification for how rubrics should be generated. # Dynamically generate rubrics using this specification.
5550 &quot;modelConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Configuration for the model used in rubric generation. Configs including sampling count and base model can be specified here. Flipping is not supported for rubric generation.
5551 &quot;autoraterModel&quot;: &quot;A String&quot;, # Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
5552 &quot;flipEnabled&quot;: True or False, # Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
5553 &quot;generationConfig&quot;: { # Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. # Optional. Configuration options for model generation and outputs.
5554 &quot;audioTimestamp&quot;: True or False, # Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
5555 &quot;candidateCount&quot;: 42, # Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.
5556 &quot;enableAffectiveDialog&quot;: True or False, # Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response.
5557 &quot;frequencyPenalty&quot;: 3.14, # Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].
5558 &quot;imageConfig&quot;: { # Configuration for image generation. This message allows you to control various aspects of image generation, such as the output format, aspect ratio, and whether the model can generate images of people. # Optional. Config for image generation features. Deprecated: Use `response_format.image` instead.
5559 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported: &quot;1:1&quot; &quot;2:3&quot;, &quot;3:2&quot; &quot;3:4&quot;, &quot;4:3&quot; &quot;4:5&quot;, &quot;5:4&quot; &quot;9:16&quot;, &quot;16:9&quot; &quot;21:9&quot;
5560 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
5561 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
5562 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
5563 },
5564 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. Specifies the size of generated images. Supported values are `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`.
5565 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
5566 &quot;prominentPeople&quot;: &quot;A String&quot;, # Optional. Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people.
5567 },
5568 &quot;logprobs&quot;: 42, # Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.
5569 &quot;maxOutputTokens&quot;: 42, # Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.
5570 &quot;mediaResolution&quot;: &quot;A String&quot;, # Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
5571 &quot;presencePenalty&quot;: 3.14, # Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].
5572 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
5573 { # Configuration for the model to configure output formatting and delivery.
5574 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
5575 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
5576 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5577 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
5578 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
5579 },
5580 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
5581 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
5582 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5583 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
5584 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
5585 },
5586 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
5587 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
5588 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
5589 },
5590 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
5591 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
5592 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5593 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
5594 &quot;gcsUri&quot;: &quot;A String&quot;, # Optional. The Google Cloud Storage URI to store the video output. Required for Vertex if delivery is URI.
5595 },
5596 },
5597 ],
5598 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. When this field is set, response_schema must be omitted and response_mime_type must be set to `application/json`. Deprecated: Use `response_format` instead.
5599 &quot;responseLogprobs&quot;: True or False, # Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model&#x27;s confidence in its own output and for debugging.
5600 &quot;responseMimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include &#x27;text/plain&#x27; (default) and &#x27;application/json&#x27;. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. Deprecated: Use `response_format` instead.
5601 &quot;responseModalities&quot;: [ # Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.
5602 &quot;A String&quot;,
5603 ],
5604 &quot;responseSchema&quot;: { # Defines the schema of input and output data. This is a subset of the [OpenAPI 3.0 Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object). # Optional. Lets you to specify a schema for the model&#x27;s response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. Deprecated: Use `response_format` instead.
5605 &quot;additionalProperties&quot;: &quot;&quot;, # Optional. If `type` is `OBJECT`, specifies how to handle properties not defined in `properties`. If it is a boolean `false`, no additional properties are allowed. If it is a schema, additional properties are allowed if they conform to the schema.
5606 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
5607 # Object with schema name: GoogleCloudAiplatformV1Schema
5608 ],
5609 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
5610 &quot;defs&quot;: { # Optional. `defs` provides a map of schema definitions that can be reused by `ref` elsewhere in the schema. Only allowed at root level of the schema.
5611 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
5612 },
5613 &quot;description&quot;: &quot;A String&quot;, # Optional. Describes the data. The model uses this field to understand the purpose of the schema and how to use it. It is a best practice to provide a clear and descriptive explanation for the schema and its properties here, rather than in the prompt.
5614 &quot;enum&quot;: [ # Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[&quot;EAST&quot;, &quot;NORTH&quot;, &quot;SOUTH&quot;, &quot;WEST&quot;]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[&quot;101&quot;, &quot;201&quot;, &quot;301&quot;]}`
5615 &quot;A String&quot;,
5616 ],
5617 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
5618 &quot;format&quot;: &quot;A String&quot;, # Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.
5619 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
5620 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
5621 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
5622 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
5623 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
5624 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
5625 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
5626 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
5627 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
5628 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
5629 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
5630 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
5631 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1Schema
5632 },
5633 &quot;propertyOrdering&quot;: [ # Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.
5634 &quot;A String&quot;,
5635 ],
5636 &quot;ref&quot;: &quot;A String&quot;, # Optional. Allows referencing another schema definition to use in place of this schema. The value must be a valid reference to a schema in `defs`. For example, the following schema defines a reference to a schema node named &quot;Pet&quot;: type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the &quot;pet&quot; property is a reference to the schema node named &quot;Pet&quot;. See details in https://json-schema.org/understanding-json-schema/structuring
5637 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
5638 &quot;A String&quot;,
5639 ],
5640 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
5641 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
5642 },
5643 &quot;routingConfig&quot;: { # The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. # Optional. Routing configuration.
5644 &quot;autoMode&quot;: { # The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. # In this mode, the model is selected automatically based on the content of the request.
5645 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
5646 },
5647 &quot;manualMode&quot;: { # The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. # In this mode, the model is specified manually.
5648 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
5649 },
5650 },
5651 &quot;seed&quot;: 42, # Optional. A seed for the random number generator. By setting a seed, you can make the model&#x27;s output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it&#x27;s not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the &quot;random&quot; choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.
5652 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
5653 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
5654 &quot;multiSpeakerVoiceConfig&quot;: { # Configuration for a multi-speaker text-to-speech request. # The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`.
5655 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
5656 { # Configuration for a single speaker in a multi-speaker setup.
5657 &quot;speaker&quot;: &quot;A String&quot;, # Required. The name of the speaker. This should be the same as the speaker name used in the prompt.
5658 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
5659 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
5660 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
5661 },
5662 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
5663 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
5664 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
5665 },
5666 },
5667 },
5668 ],
5669 },
5670 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
5671 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
5672 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
5673 },
5674 &quot;replicatedVoiceConfig&quot;: { # The configuration for the replicated voice to use. # Optional. The configuration for a replicated voice. This enables users to replicate a voice from an audio sample.
5675 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The mimetype of the voice sample. The only currently supported value is `audio/wav`. This represents 16-bit signed little-endian wav data, with a 24kHz sampling rate. `mime_type` will default to `audio/wav` if not set.
5676 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
5677 },
5678 },
5679 },
5680 &quot;stopSequences&quot;: [ # Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [&quot;\n&quot;, &quot;###&quot;] to stop generation at a new line or a specific marker.
5681 &quot;A String&quot;,
5682 ],
5683 &quot;temperature&quot;: 3.14, # Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].
5684 &quot;thinkingConfig&quot;: { # Configuration for the model&#x27;s thinking features. &quot;Thinking&quot; is a process where the model breaks down a complex task into smaller, manageable steps. This allows the model to reason about the task, plan its approach, and execute the plan to generate a high-quality response. # Optional. Configuration for thinking features. An error will be returned if this field is set for models that don&#x27;t support thinking.
5685 &quot;includeThoughts&quot;: True or False, # Optional. If true, the model will include its thoughts in the response. &quot;Thoughts&quot; are the intermediate steps the model takes to arrive at the final response. They can provide insights into the model&#x27;s reasoning process and help with debugging. If this is true, thoughts are returned only when available.
5686 &quot;thinkingBudget&quot;: 42, # Optional. The token budget for the model&#x27;s thinking process. The model will make a best effort to stay within this budget. This can be used to control the trade-off between response quality and latency.
5687 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
5688 },
5689 &quot;topK&quot;: 3.14, # Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.
5690 &quot;topP&quot;: 3.14, # Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It&#x27;s recommended to adjust either temperature or `top_p`, but not both.
5691 },
5692 &quot;samplingCount&quot;: 42, # Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
5693 },
5694 &quot;promptTemplate&quot;: &quot;A String&quot;, # Template for the prompt used to generate rubrics. The details should be updated based on the most-recent recipe requirements.
5695 &quot;rubricContentType&quot;: &quot;A String&quot;, # The type of rubric content to be generated.
5696 &quot;rubricTypeOntology&quot;: [ # Optional. An optional, pre-defined list of allowed types for generated rubrics. If this field is provided, it implies `include_rubric_type` should be true, and the generated rubric types should be chosen from this ontology.
5697 &quot;A String&quot;,
5698 ],
5699 },
5700 &quot;rubricGroupKey&quot;: &quot;A String&quot;, # Use a pre-defined group of rubrics associated with the input. Refers to a key in the rubric_groups map of EvaluationInstance.
5701 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for the judge model.
5702 },
5703 &quot;metadata&quot;: { # Metadata about the metric, used for visualization and organization. # Optional. Metadata about the metric, used for visualization and organization.
5704 &quot;otherMetadata&quot;: { # Optional. Flexible metadata for user-defined attributes.
5705 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5706 },
5707 &quot;scoreRange&quot;: { # The range of possible scores for this metric, used for plotting. # Optional. The range of possible scores for this metric, used for plotting.
5708 &quot;description&quot;: &quot;A String&quot;, # Optional. The description of the score explaining the directionality etc.
5709 &quot;max&quot;: 3.14, # Required. The maximum value of the score range (inclusive).
5710 &quot;min&quot;: 3.14, # Required. The minimum value of the score range (inclusive).
5711 &quot;step&quot;: 3.14, # Optional. The distance between discrete steps in the range. If unset, the range is assumed to be continuous.
5712 },
5713 &quot;title&quot;: &quot;A String&quot;, # Optional. The user-friendly name for the metric. If not set for a registered metric, it will default to the metric&#x27;s display name.
5714 },
5715 &quot;pairwiseMetricSpec&quot;: { # Spec for pairwise metric. # Spec for pairwise metric.
5716 &quot;baselineResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the baseline response.
5717 &quot;candidateResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the candidate response.
5718 &quot;customOutputFormatConfig&quot;: { # Spec for custom output format configuration. # Optional. CustomOutputFormatConfig allows customization of metric output. When this config is set, the default output is replaced with the raw output string. If a custom format is chosen, the `pairwise_choice` and `explanation` fields in the corresponding metric result will be empty.
5719 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
5720 },
5721 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pairwise metric.
5722 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pairwise metric.
5723 },
5724 &quot;pointwiseMetricSpec&quot;: { # Spec for pointwise metric. # Spec for pointwise metric.
5725 &quot;customOutputFormatConfig&quot;: { # Spec for custom output format configuration. # Optional. CustomOutputFormatConfig allows customization of metric output. By default, metrics return a score and explanation. When this config is set, the default output is replaced with either: - The raw output string. - A parsed output based on a user-defined schema. If a custom format is chosen, the `score` and `explanation` fields in the corresponding metric result will be empty.
5726 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
5727 },
5728 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pointwise metric.
5729 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pointwise metric.
5730 },
5731 &quot;predefinedMetricSpec&quot;: { # The spec for a pre-defined metric. # The spec for a pre-defined metric.
5732 &quot;metricSpecName&quot;: &quot;A String&quot;, # Required. The name of a pre-defined metric, such as &quot;instruction_following_v1&quot; or &quot;text_quality_v1&quot;.
5733 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
5734 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5735 },
5736 },
5737 &quot;rougeSpec&quot;: { # Spec for rouge score metric - calculates the recall of n-grams in prediction as compared to reference - returns a score ranging between 0 and 1. # Spec for rouge metric.
5738 &quot;rougeType&quot;: &quot;A String&quot;, # Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum.
5739 &quot;splitSummaries&quot;: True or False, # Optional. Whether to split summaries while using rougeLsum.
5740 &quot;useStemmer&quot;: True or False, # Optional. Whether to use stemmer to compute rouge score.
5741 },
5742 },
5743 ],
5744 &quot;outputConfig&quot;: { # Config for evaluation output. # Required. Config for evaluation output.
5745 &quot;gcsDestination&quot;: { # The Google Cloud Storage location where the output is to be written to. # Cloud storage destination for evaluation output.
5746 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. If the uri doesn&#x27;t end with &#x27;/&#x27;, a &#x27;/&#x27; will be automatically appended. The directory is created if it doesn&#x27;t exist.
5747 },
5748 },
5749 },
5750 &quot;exportLastCheckpointOnly&quot;: True or False, # Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. Default is false.
5751 &quot;hyperParameters&quot;: { # Hyperparameters for SFT. # Optional. Hyperparameters for SFT.
5752 &quot;adapterSize&quot;: &quot;A String&quot;, # Optional. Adapter size for tuning.
5753 &quot;epochCount&quot;: &quot;A String&quot;, # Optional. Number of complete passes the model makes over the entire training dataset during training.
5754 &quot;learningRateMultiplier&quot;: 3.14, # Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. This feature is only available for 1P models.
5755 },
5756 &quot;trainingDatasetUri&quot;: &quot;A String&quot;, # Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
5757 &quot;validationDatasetUri&quot;: &quot;A String&quot;, # Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
5758 },
5759 &quot;tunedModel&quot;: { # The Model Registry Model and Online Prediction Endpoint associated with this TuningJob. # Output only. The tuned model resources associated with this TuningJob.
5760 &quot;checkpoints&quot;: [ # Output only. The checkpoints associated with this TunedModel. This field is only populated for tuning jobs that enable intermediate checkpoints.
5761 { # TunedModelCheckpoint for the Tuned Model of a Tuning Job.
5762 &quot;checkpointId&quot;: &quot;A String&quot;, # The ID of the checkpoint.
5763 &quot;endpoint&quot;: &quot;A String&quot;, # The Endpoint resource name that the checkpoint is deployed to. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
5764 &quot;epoch&quot;: &quot;A String&quot;, # The epoch of the checkpoint.
5765 &quot;step&quot;: &quot;A String&quot;, # The step of the checkpoint.
5766 },
5767 ],
5768 &quot;endpoint&quot;: &quot;A String&quot;, # Output only. A resource name of an Endpoint. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
5769 &quot;model&quot;: &quot;A String&quot;, # Output only. The resource name of the TunedModel. Format: `projects/{project}/locations/{location}/models/{model}@{version_id}` When tuning from a base model, the version ID will be 1. For continuous tuning, if the provided tuned_model_display_name is set and different from parent model&#x27;s display name, the tuned model will have a new parent model with version 1. Otherwise the version id will be incremented by 1 from the last version ID in the parent model. E.g., `projects/{project}/locations/{location}/models/{model}@{last_version_id + 1}`
5770 },
5771 &quot;tunedModelDisplayName&quot;: &quot;A String&quot;, # Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. For continuous tuning, tuned_model_display_name will by default use the same display name as the pre-tuned model. If a new display name is provided, the tuning job will create a new model instead of a new version.
5772 &quot;tuningDataStats&quot;: { # The tuning data statistic values for TuningJob. # Output only. The tuning data statistics associated with this TuningJob.
5773 &quot;preferenceOptimizationDataStats&quot;: { # Statistics computed for datasets used for preference optimization. # Output only. Statistics for preference optimization.
5774 &quot;droppedExampleIndices&quot;: [ # Output only. A partial sample of the indices (starting from 1) of the dropped examples.
5775 &quot;A String&quot;,
5776 ],
5777 &quot;droppedExampleReasons&quot;: [ # Output only. For each index in `dropped_example_indices`, the user-facing reason why the example was dropped.
5778 &quot;A String&quot;,
5779 ],
5780 &quot;scoreVariancePerExampleDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for scores variance per example.
5781 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
5782 { # Dataset bucket used to create a histogram for the distribution given a population of values.
5783 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
5784 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
5785 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
5786 },
5787 ],
5788 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
5789 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
5790 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
5791 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
5792 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
5793 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
5794 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
5795 },
5796 &quot;scoresDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for scores.
5797 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
5798 { # Dataset bucket used to create a histogram for the distribution given a population of values.
5799 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
5800 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
5801 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
5802 },
5803 ],
5804 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
5805 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
5806 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
5807 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
5808 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
5809 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
5810 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
5811 },
5812 &quot;totalBillableTokenCount&quot;: &quot;A String&quot;, # Output only. Number of billable tokens in the tuning dataset.
5813 &quot;tuningDatasetExampleCount&quot;: &quot;A String&quot;, # Output only. Number of examples in the tuning dataset.
5814 &quot;tuningStepCount&quot;: &quot;A String&quot;, # Output only. Number of tuning steps for this Tuning Job.
5815 &quot;userDatasetExamples&quot;: [ # Output only. Sample user examples in the training dataset.
5816 { # Input example for preference optimization.
5817 &quot;completions&quot;: [ # List of completions for a given prompt.
5818 { # Completion and its preference score.
5819 &quot;completion&quot;: { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message. # Single turn completion for the given prompt.
5820 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
5821 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
5822 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
5823 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
5824 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
5825 },
5826 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
5827 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
5828 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
5829 },
5830 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
5831 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
5832 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
5833 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5834 },
5835 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
5836 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
5837 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5838 },
5839 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
5840 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
5841 { # Partial argument value of the function call.
5842 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
5843 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
5844 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
5845 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
5846 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
5847 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
5848 },
5849 ],
5850 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
5851 },
5852 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
5853 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
5854 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
5855 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
5856 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
5857 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
5858 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
5859 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5860 },
5861 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
5862 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
5863 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
5864 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5865 },
5866 },
5867 ],
5868 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
5869 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5870 },
5871 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
5872 },
5873 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
5874 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
5875 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
5876 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5877 },
5878 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
5879 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
5880 },
5881 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
5882 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
5883 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
5884 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
5885 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
5886 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
5887 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
5888 },
5889 },
5890 ],
5891 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
5892 },
5893 &quot;score&quot;: 3.14, # The score for the given completion.
5894 },
5895 ],
5896 &quot;contents&quot;: [ # Multi-turn contents that represents the Prompt.
5897 { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message.
5898 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
5899 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
5900 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
5901 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
5902 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
5903 },
5904 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
5905 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
5906 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
5907 },
5908 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
5909 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
5910 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
5911 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5912 },
5913 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
5914 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
5915 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5916 },
5917 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
5918 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
5919 { # Partial argument value of the function call.
5920 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
5921 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
5922 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
5923 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
5924 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
5925 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
5926 },
5927 ],
5928 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
5929 },
5930 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
5931 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
5932 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
5933 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
5934 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
5935 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
5936 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
5937 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5938 },
5939 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
5940 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
5941 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
5942 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5943 },
5944 },
5945 ],
5946 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
5947 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5948 },
5949 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
5950 },
5951 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
5952 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
5953 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
5954 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5955 },
5956 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
5957 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
5958 },
5959 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
5960 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
5961 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
5962 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
5963 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
5964 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
5965 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
5966 },
5967 },
5968 ],
5969 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
5970 },
5971 ],
5972 },
5973 ],
5974 &quot;userInputTokenDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for the user input tokens.
5975 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
5976 { # Dataset bucket used to create a histogram for the distribution given a population of values.
5977 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
5978 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
5979 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
5980 },
5981 ],
5982 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
5983 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
5984 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
5985 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
5986 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
5987 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
5988 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
5989 },
5990 &quot;userOutputTokenDistribution&quot;: { # Distribution computed over a tuning dataset. # Output only. Dataset distributions for the user output tokens.
5991 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
5992 { # Dataset bucket used to create a histogram for the distribution given a population of values.
5993 &quot;count&quot;: &quot;A String&quot;, # Output only. Number of values in the bucket.
5994 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
5995 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
5996 },
5997 ],
5998 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
5999 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
6000 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
6001 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
6002 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
6003 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
6004 &quot;sum&quot;: 3.14, # Output only. Sum of a given population of values.
6005 },
6006 },
6007 &quot;supervisedTuningDataStats&quot;: { # Tuning data statistics for Supervised Tuning. # The SFT Tuning data stats.
6008 &quot;droppedExampleReasons&quot;: [ # Output only. For each index in `truncated_example_indices`, the user-facing reason why the example was dropped.
6009 &quot;A String&quot;,
6010 ],
6011 &quot;totalBillableCharacterCount&quot;: &quot;A String&quot;, # Output only. Number of billable characters in the tuning dataset.
6012 &quot;totalBillableTokenCount&quot;: &quot;A String&quot;, # Output only. Number of billable tokens in the tuning dataset.
6013 &quot;totalTruncatedExampleCount&quot;: &quot;A String&quot;, # Output only. The number of examples in the dataset that have been dropped. An example can be dropped for reasons including: too many tokens, contains an invalid image, contains too many images, etc.
6014 &quot;totalTuningCharacterCount&quot;: &quot;A String&quot;, # Output only. Number of tuning characters in the tuning dataset.
6015 &quot;truncatedExampleIndices&quot;: [ # Output only. A partial sample of the indices (starting from 1) of the dropped examples.
6016 &quot;A String&quot;,
6017 ],
6018 &quot;tuningDatasetExampleCount&quot;: &quot;A String&quot;, # Output only. Number of examples in the tuning dataset.
6019 &quot;tuningStepCount&quot;: &quot;A String&quot;, # Output only. Number of tuning steps for this Tuning Job.
6020 &quot;userDatasetExamples&quot;: [ # Output only. Sample user messages in the training dataset uri.
6021 { # The structured data content of a message. A Content message contains a `role` field, which indicates the producer of the content, and a `parts` field, which contains the multi-part data of the message.
6022 &quot;parts&quot;: [ # Required. A list of Part objects that make up a single message. Parts of a message can have different MIME types. A Content message must have at least one Part.
6023 { # A datatype containing media that is part of a multi-part Content message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. For media types that are not text, `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
6024 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
6025 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
6026 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
6027 },
6028 &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. # Optional. Code generated by the model that is intended to be executed.
6029 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
6030 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
6031 },
6032 &quot;fileData&quot;: { # URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. # Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
6033 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
6034 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
6035 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
6036 },
6037 &quot;functionCall&quot;: { # A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. # Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
6038 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
6039 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
6040 },
6041 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
6042 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
6043 { # Partial argument value of the function call.
6044 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
6045 &quot;jsonPath&quot;: &quot;A String&quot;, # Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. &quot;$.foo.bar[0].data&quot;.
6046 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
6047 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
6048 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
6049 &quot;willContinue&quot;: True or False, # Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
6050 },
6051 ],
6052 &quot;willContinue&quot;: True or False, # Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow.
6053 },
6054 &quot;functionResponse&quot;: { # The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a `FunctionCall` made based on model prediction. # Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
6055 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
6056 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
6057 { # A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
6058 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
6059 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
6060 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
6061 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
6062 },
6063 &quot;inlineData&quot;: { # Raw media bytes for function response. Text should not be sent as raw bytes, use the &#x27;text&#x27; field. # Inline media bytes.
6064 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
6065 &quot;displayName&quot;: &quot;A String&quot;, # Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
6066 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
6067 },
6068 },
6069 ],
6070 &quot;response&quot;: { # Required. The function response in JSON object format. Use &quot;output&quot; key to specify function output and &quot;error&quot; key to specify error details (if any). If &quot;output&quot; and &quot;error&quot; keys are not specified, then whole &quot;response&quot; is treated as function output.
6071 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
6072 },
6073 &quot;scheduling&quot;: &quot;A String&quot;, # Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
6074 },
6075 &quot;inlineData&quot;: { # A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. # Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
6076 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
6077 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled.
6078 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
6079 },
6080 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
6081 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
6082 },
6083 &quot;text&quot;: &quot;A String&quot;, # Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
6084 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
6085 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
6086 &quot;videoMetadata&quot;: { # Provides metadata for a video, including the start and end offsets for clipping and the frame rate. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
6087 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
6088 &quot;fps&quot;: 3.14, # Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].
6089 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
6090 },
6091 },
6092 ],
6093 &quot;role&quot;: &quot;A String&quot;, # Optional. The producer of the content. Must be either &#x27;user&#x27; or &#x27;model&#x27;. If not set, the service will default to &#x27;user&#x27;.
6094 },
6095 ],
6096 &quot;userInputTokenDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the user input tokens.
6097 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
6098 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
6099 { # Dataset bucket used to create a histogram for the distribution given a population of values.
6100 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
6101 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
6102 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
6103 },
6104 ],
6105 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
6106 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
6107 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
6108 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
6109 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
6110 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
6111 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
6112 },
6113 &quot;userMessagePerExampleDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the messages per example.
6114 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
6115 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
6116 { # Dataset bucket used to create a histogram for the distribution given a population of values.
6117 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
6118 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
6119 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
6120 },
6121 ],
6122 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
6123 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
6124 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
6125 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
6126 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
6127 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
6128 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
6129 },
6130 &quot;userOutputTokenDistribution&quot;: { # Dataset distribution for Supervised Tuning. # Output only. Dataset distributions for the user output tokens.
6131 &quot;billableSum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values that are billable.
6132 &quot;buckets&quot;: [ # Output only. Defines the histogram bucket.
6133 { # Dataset bucket used to create a histogram for the distribution given a population of values.
6134 &quot;count&quot;: 3.14, # Output only. Number of values in the bucket.
6135 &quot;left&quot;: 3.14, # Output only. Left bound of the bucket.
6136 &quot;right&quot;: 3.14, # Output only. Right bound of the bucket.
6137 },
6138 ],
6139 &quot;max&quot;: 3.14, # Output only. The maximum of the population values.
6140 &quot;mean&quot;: 3.14, # Output only. The arithmetic mean of the values in the population.
6141 &quot;median&quot;: 3.14, # Output only. The median of the values in the population.
6142 &quot;min&quot;: 3.14, # Output only. The minimum of the population values.
6143 &quot;p5&quot;: 3.14, # Output only. The 5th percentile of the values in the population.
6144 &quot;p95&quot;: 3.14, # Output only. The 95th percentile of the values in the population.
6145 &quot;sum&quot;: &quot;A String&quot;, # Output only. Sum of a given population of values.
6146 },
6147 },
6148 },
6149 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Time when the TuningJob was most recently updated.
6150 },
6151 }
6152
6153 x__xgafv: string, V1 error format.
6154 Allowed values
6155 1 - v1 error format
6156 2 - v2 error format
6157
6158 Returns:
6159 An object of the form:
6160
6161 { # This resource represents a long-running operation that is the result of a network API call.
6162 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
6163 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
6164 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
6165 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
6166 {
6167 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
6168 },
6169 ],
6170 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
6171 },
6172 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
6173 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
6174 },
6175 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
6176 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
6177 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
6178 },
6179 }</pre>
6180 </div>
6181
6182 </body></html>