Debian Codegraph @

docs/dyn/aiplatform_v1beta1.projects.locations.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_v1beta1.html">Agent Platform API</a> . <a href="aiplatform_v1beta1.projects.html">projects</a> . <a href="aiplatform_v1beta1.projects.locations.html">locations</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="aiplatform_v1beta1.projects.locations.agentAnomalyDetectionScopes.html">agentAnomalyDetectionScopes()</a></code>
79 </p>
80 <p class="firstline">Returns the agentAnomalyDetectionScopes Resource.</p>
81
82 <p class="toc_element">
83 <code><a href="aiplatform_v1beta1.projects.locations.agents.html">agents()</a></code>
84 </p>
85 <p class="firstline">Returns the agents Resource.</p>
86
87 <p class="toc_element">
88 <code><a href="aiplatform_v1beta1.projects.locations.apps.html">apps()</a></code>
89 </p>
90 <p class="firstline">Returns the apps Resource.</p>
91
92 <p class="toc_element">
93 <code><a href="aiplatform_v1beta1.projects.locations.batchPredictionJobs.html">batchPredictionJobs()</a></code>
94 </p>
95 <p class="firstline">Returns the batchPredictionJobs Resource.</p>
96
97 <p class="toc_element">
98 <code><a href="aiplatform_v1beta1.projects.locations.cachedContents.html">cachedContents()</a></code>
99 </p>
100 <p class="firstline">Returns the cachedContents Resource.</p>
101
102 <p class="toc_element">
103 <code><a href="aiplatform_v1beta1.projects.locations.customJobs.html">customJobs()</a></code>
104 </p>
105 <p class="firstline">Returns the customJobs Resource.</p>
106
107 <p class="toc_element">
108 <code><a href="aiplatform_v1beta1.projects.locations.dataLabelingJobs.html">dataLabelingJobs()</a></code>
109 </p>
110 <p class="firstline">Returns the dataLabelingJobs Resource.</p>
111
112 <p class="toc_element">
113 <code><a href="aiplatform_v1beta1.projects.locations.datasets.html">datasets()</a></code>
114 </p>
115 <p class="firstline">Returns the datasets Resource.</p>
116
117 <p class="toc_element">
118 <code><a href="aiplatform_v1beta1.projects.locations.deploymentResourcePools.html">deploymentResourcePools()</a></code>
119 </p>
120 <p class="firstline">Returns the deploymentResourcePools Resource.</p>
121
122 <p class="toc_element">
123 <code><a href="aiplatform_v1beta1.projects.locations.edgeDevices.html">edgeDevices()</a></code>
124 </p>
125 <p class="firstline">Returns the edgeDevices Resource.</p>
126
127 <p class="toc_element">
128 <code><a href="aiplatform_v1beta1.projects.locations.endpoints.html">endpoints()</a></code>
129 </p>
130 <p class="firstline">Returns the endpoints Resource.</p>
131
132 <p class="toc_element">
133 <code><a href="aiplatform_v1beta1.projects.locations.evaluationItems.html">evaluationItems()</a></code>
134 </p>
135 <p class="firstline">Returns the evaluationItems Resource.</p>
136
137 <p class="toc_element">
138 <code><a href="aiplatform_v1beta1.projects.locations.evaluationMetrics.html">evaluationMetrics()</a></code>
139 </p>
140 <p class="firstline">Returns the evaluationMetrics Resource.</p>
141
142 <p class="toc_element">
143 <code><a href="aiplatform_v1beta1.projects.locations.evaluationRuns.html">evaluationRuns()</a></code>
144 </p>
145 <p class="firstline">Returns the evaluationRuns Resource.</p>
146
147 <p class="toc_element">
148 <code><a href="aiplatform_v1beta1.projects.locations.evaluationSets.html">evaluationSets()</a></code>
149 </p>
150 <p class="firstline">Returns the evaluationSets Resource.</p>
151
152 <p class="toc_element">
153 <code><a href="aiplatform_v1beta1.projects.locations.evaluationTasks.html">evaluationTasks()</a></code>
154 </p>
155 <p class="firstline">Returns the evaluationTasks Resource.</p>
156
157 <p class="toc_element">
158 <code><a href="aiplatform_v1beta1.projects.locations.exampleStores.html">exampleStores()</a></code>
159 </p>
160 <p class="firstline">Returns the exampleStores Resource.</p>
161
162 <p class="toc_element">
163 <code><a href="aiplatform_v1beta1.projects.locations.extensionControllers.html">extensionControllers()</a></code>
164 </p>
165 <p class="firstline">Returns the extensionControllers Resource.</p>
166
167 <p class="toc_element">
168 <code><a href="aiplatform_v1beta1.projects.locations.extensions.html">extensions()</a></code>
169 </p>
170 <p class="firstline">Returns the extensions Resource.</p>
171
172 <p class="toc_element">
173 <code><a href="aiplatform_v1beta1.projects.locations.featureGroups.html">featureGroups()</a></code>
174 </p>
175 <p class="firstline">Returns the featureGroups Resource.</p>
176
177 <p class="toc_element">
178 <code><a href="aiplatform_v1beta1.projects.locations.featureOnlineStores.html">featureOnlineStores()</a></code>
179 </p>
180 <p class="firstline">Returns the featureOnlineStores Resource.</p>
181
182 <p class="toc_element">
183 <code><a href="aiplatform_v1beta1.projects.locations.featurestores.html">featurestores()</a></code>
184 </p>
185 <p class="firstline">Returns the featurestores Resource.</p>
186
187 <p class="toc_element">
188 <code><a href="aiplatform_v1beta1.projects.locations.hyperparameterTuningJobs.html">hyperparameterTuningJobs()</a></code>
189 </p>
190 <p class="firstline">Returns the hyperparameterTuningJobs Resource.</p>
191
192 <p class="toc_element">
193 <code><a href="aiplatform_v1beta1.projects.locations.indexEndpoints.html">indexEndpoints()</a></code>
194 </p>
195 <p class="firstline">Returns the indexEndpoints Resource.</p>
196
197 <p class="toc_element">
198 <code><a href="aiplatform_v1beta1.projects.locations.indexes.html">indexes()</a></code>
199 </p>
200 <p class="firstline">Returns the indexes Resource.</p>
201
202 <p class="toc_element">
203 <code><a href="aiplatform_v1beta1.projects.locations.interactions.html">interactions()</a></code>
204 </p>
205 <p class="firstline">Returns the interactions Resource.</p>
206
207 <p class="toc_element">
208 <code><a href="aiplatform_v1beta1.projects.locations.metadataStores.html">metadataStores()</a></code>
209 </p>
210 <p class="firstline">Returns the metadataStores Resource.</p>
211
212 <p class="toc_element">
213 <code><a href="aiplatform_v1beta1.projects.locations.migratableResources.html">migratableResources()</a></code>
214 </p>
215 <p class="firstline">Returns the migratableResources Resource.</p>
216
217 <p class="toc_element">
218 <code><a href="aiplatform_v1beta1.projects.locations.modelDeploymentMonitoringJobs.html">modelDeploymentMonitoringJobs()</a></code>
219 </p>
220 <p class="firstline">Returns the modelDeploymentMonitoringJobs Resource.</p>
221
222 <p class="toc_element">
223 <code><a href="aiplatform_v1beta1.projects.locations.modelMonitors.html">modelMonitors()</a></code>
224 </p>
225 <p class="firstline">Returns the modelMonitors Resource.</p>
226
227 <p class="toc_element">
228 <code><a href="aiplatform_v1beta1.projects.locations.models.html">models()</a></code>
229 </p>
230 <p class="firstline">Returns the models Resource.</p>
231
232 <p class="toc_element">
233 <code><a href="aiplatform_v1beta1.projects.locations.monitoredAgents.html">monitoredAgents()</a></code>
234 </p>
235 <p class="firstline">Returns the monitoredAgents Resource.</p>
236
237 <p class="toc_element">
238 <code><a href="aiplatform_v1beta1.projects.locations.nasJobs.html">nasJobs()</a></code>
239 </p>
240 <p class="firstline">Returns the nasJobs Resource.</p>
241
242 <p class="toc_element">
243 <code><a href="aiplatform_v1beta1.projects.locations.notebookExecutionJobs.html">notebookExecutionJobs()</a></code>
244 </p>
245 <p class="firstline">Returns the notebookExecutionJobs Resource.</p>
246
247 <p class="toc_element">
248 <code><a href="aiplatform_v1beta1.projects.locations.notebookRuntimeTemplates.html">notebookRuntimeTemplates()</a></code>
249 </p>
250 <p class="firstline">Returns the notebookRuntimeTemplates Resource.</p>
251
252 <p class="toc_element">
253 <code><a href="aiplatform_v1beta1.projects.locations.notebookRuntimes.html">notebookRuntimes()</a></code>
254 </p>
255 <p class="firstline">Returns the notebookRuntimes Resource.</p>
256
257 <p class="toc_element">
258 <code><a href="aiplatform_v1beta1.projects.locations.onlineEvaluators.html">onlineEvaluators()</a></code>
259 </p>
260 <p class="firstline">Returns the onlineEvaluators Resource.</p>
261
262 <p class="toc_element">
263 <code><a href="aiplatform_v1beta1.projects.locations.operations.html">operations()</a></code>
264 </p>
265 <p class="firstline">Returns the operations Resource.</p>
266
267 <p class="toc_element">
268 <code><a href="aiplatform_v1beta1.projects.locations.persistentResources.html">persistentResources()</a></code>
269 </p>
270 <p class="firstline">Returns the persistentResources Resource.</p>
271
272 <p class="toc_element">
273 <code><a href="aiplatform_v1beta1.projects.locations.pipelineJobs.html">pipelineJobs()</a></code>
274 </p>
275 <p class="firstline">Returns the pipelineJobs Resource.</p>
276
277 <p class="toc_element">
278 <code><a href="aiplatform_v1beta1.projects.locations.publishers.html">publishers()</a></code>
279 </p>
280 <p class="firstline">Returns the publishers Resource.</p>
281
282 <p class="toc_element">
283 <code><a href="aiplatform_v1beta1.projects.locations.ragCorpora.html">ragCorpora()</a></code>
284 </p>
285 <p class="firstline">Returns the ragCorpora Resource.</p>
286
287 <p class="toc_element">
288 <code><a href="aiplatform_v1beta1.projects.locations.ragEngineConfig.html">ragEngineConfig()</a></code>
289 </p>
290 <p class="firstline">Returns the ragEngineConfig Resource.</p>
291
292 <p class="toc_element">
293 <code><a href="aiplatform_v1beta1.projects.locations.reasoningEngines.html">reasoningEngines()</a></code>
294 </p>
295 <p class="firstline">Returns the reasoningEngines Resource.</p>
296
297 <p class="toc_element">
298 <code><a href="aiplatform_v1beta1.projects.locations.schedules.html">schedules()</a></code>
299 </p>
300 <p class="firstline">Returns the schedules Resource.</p>
301
302 <p class="toc_element">
303 <code><a href="aiplatform_v1beta1.projects.locations.semanticGovernancePolicies.html">semanticGovernancePolicies()</a></code>
304 </p>
305 <p class="firstline">Returns the semanticGovernancePolicies Resource.</p>
306
307 <p class="toc_element">
308 <code><a href="aiplatform_v1beta1.projects.locations.semanticGovernancePolicyEngine.html">semanticGovernancePolicyEngine()</a></code>
309 </p>
310 <p class="firstline">Returns the semanticGovernancePolicyEngine Resource.</p>
311
312 <p class="toc_element">
313 <code><a href="aiplatform_v1beta1.projects.locations.servingProfiles.html">servingProfiles()</a></code>
314 </p>
315 <p class="firstline">Returns the servingProfiles Resource.</p>
316
317 <p class="toc_element">
318 <code><a href="aiplatform_v1beta1.projects.locations.skills.html">skills()</a></code>
319 </p>
320 <p class="firstline">Returns the skills Resource.</p>
321
322 <p class="toc_element">
323 <code><a href="aiplatform_v1beta1.projects.locations.solvers.html">solvers()</a></code>
324 </p>
325 <p class="firstline">Returns the solvers Resource.</p>
326
327 <p class="toc_element">
328 <code><a href="aiplatform_v1beta1.projects.locations.specialistPools.html">specialistPools()</a></code>
329 </p>
330 <p class="firstline">Returns the specialistPools Resource.</p>
331
332 <p class="toc_element">
333 <code><a href="aiplatform_v1beta1.projects.locations.studies.html">studies()</a></code>
334 </p>
335 <p class="firstline">Returns the studies Resource.</p>
336
337 <p class="toc_element">
338 <code><a href="aiplatform_v1beta1.projects.locations.tensorboards.html">tensorboards()</a></code>
339 </p>
340 <p class="firstline">Returns the tensorboards Resource.</p>
341
342 <p class="toc_element">
343 <code><a href="aiplatform_v1beta1.projects.locations.trainingPipelines.html">trainingPipelines()</a></code>
344 </p>
345 <p class="firstline">Returns the trainingPipelines Resource.</p>
346
347 <p class="toc_element">
348 <code><a href="aiplatform_v1beta1.projects.locations.tuningJobs.html">tuningJobs()</a></code>
349 </p>
350 <p class="firstline">Returns the tuningJobs Resource.</p>
351
352 <p class="toc_element">
353 <code><a href="#askContexts">askContexts(parent, body=None, x__xgafv=None)</a></code></p>
354 <p class="firstline">Agentic Retrieval Ask API for RAG.</p>
355 <p class="toc_element">
356 <code><a href="#asyncRetrieveContexts">asyncRetrieveContexts(parent, body=None, x__xgafv=None)</a></code></p>
357 <p class="firstline">Asynchronous API to retrieves relevant contexts for a query.</p>
358 <p class="toc_element">
359 <code><a href="#augmentPrompt">augmentPrompt(parent, body=None, x__xgafv=None)</a></code></p>
360 <p class="firstline">Given an input prompt, it returns augmented prompt from vertex rag store to guide LLM towards generating grounded responses.</p>
361 <p class="toc_element">
362 <code><a href="#close">close()</a></code></p>
363 <p class="firstline">Close httplib2 connections.</p>
364 <p class="toc_element">
365 <code><a href="#corroborateContent">corroborateContent(parent, body=None, x__xgafv=None)</a></code></p>
366 <p class="firstline">Given an input text, it returns a score that evaluates the factuality of the text. It also extracts and returns claims from the text and provides supporting facts.</p>
367 <p class="toc_element">
368 <code><a href="#deploy">deploy(destination, body=None, x__xgafv=None)</a></code></p>
369 <p class="firstline">Deploys a model to a new endpoint.</p>
370 <p class="toc_element">
371 <code><a href="#deployPublisherModel">deployPublisherModel(destination, body=None, x__xgafv=None)</a></code></p>
372 <p class="firstline">Deploys publisher models.</p>
373 <p class="toc_element">
374 <code><a href="#evaluateDataset">evaluateDataset(location, body=None, x__xgafv=None)</a></code></p>
375 <p class="firstline">Evaluates a dataset based on a set of given metrics.</p>
376 <p class="toc_element">
377 <code><a href="#evaluateInstances">evaluateInstances(location, body=None, x__xgafv=None)</a></code></p>
378 <p class="firstline">Evaluates instances based on a given metric.</p>
379 <p class="toc_element">
380 <code><a href="#generateInstanceRubrics">generateInstanceRubrics(location, body=None, x__xgafv=None)</a></code></p>
381 <p class="firstline">Generates rubrics for a given prompt. A rubric represents a single testable criterion for evaluation. One input prompt could have multiple rubrics This RPC allows users to get suggested rubrics based on provided prompt, which can then be reviewed and used for subsequent evaluations.</p>
382 <p class="toc_element">
383 <code><a href="#generateLossClusters">generateLossClusters(location, body=None, x__xgafv=None)</a></code></p>
384 <p class="firstline">Generates loss clusters from evaluation results. This is a statelss API method that would not modify the EvaluationSet resource.</p>
385 <p class="toc_element">
386 <code><a href="#generateSyntheticData">generateSyntheticData(location, body=None, x__xgafv=None)</a></code></p>
387 <p class="firstline">Generates synthetic (artificial) data based on a description</p>
388 <p class="toc_element">
389 <code><a href="#generateUserScenarios">generateUserScenarios(location, body=None, x__xgafv=None)</a></code></p>
390 <p class="firstline">Generates user scenarios for agent evaluation.</p>
391 <p class="toc_element">
392 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
393 <p class="firstline">Gets information about a location.</p>
394 <p class="toc_element">
395 <code><a href="#getRagEngineConfig">getRagEngineConfig(name, x__xgafv=None)</a></code></p>
396 <p class="firstline">Gets a RagEngineConfig.</p>
397 <p class="toc_element">
398 <code><a href="#getSemanticGovernancePolicyEngine">getSemanticGovernancePolicyEngine(name, x__xgafv=None)</a></code></p>
399 <p class="firstline">Gets a SemanticGovernancePolicyEngine. A SemanticGovernancePolicyEngine is a singleton resource that is created when its parent is created, and deleted when its parent is deleted. This method retrieves the current state of the Semantic Governance Policy Engine.</p>
400 <p class="toc_element">
401 <code><a href="#list">list(name, extraLocationTypes=None, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
402 <p class="firstline">Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: * **Global locations**: If `name` is empty, the method lists the public locations available to all projects. * **Project-specific locations**: If `name` follows the format `projects/{project}`, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project. For gRPC and client library implementations, the resource name is passed as the `name` field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.</p>
403 <p class="toc_element">
404 <code><a href="#list_next">list_next()</a></code></p>
405 <p class="firstline">Retrieves the next page of results.</p>
406 <p class="toc_element">
407 <code><a href="#recommendSpec">recommendSpec(parent, body=None, x__xgafv=None)</a></code></p>
408 <p class="firstline">Gets a Model's spec recommendations. This API is called by UI, SDK, and internal.</p>
409 <p class="toc_element">
410 <code><a href="#retrieveContexts">retrieveContexts(parent, body=None, x__xgafv=None)</a></code></p>
411 <p class="firstline">Retrieves relevant contexts for a query.</p>
412 <p class="toc_element">
413 <code><a href="#updateRagEngineConfig">updateRagEngineConfig(name, body=None, x__xgafv=None)</a></code></p>
414 <p class="firstline">Updates a RagEngineConfig.</p>
415 <p class="toc_element">
416 <code><a href="#updateSemanticGovernancePolicyEngine">updateSemanticGovernancePolicyEngine(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
417 <p class="firstline">Updates a SemanticGovernancePolicyEngine. This method performs an upsert operation. If the SemanticGovernancePolicyEngine resource does not exist, it will be created. Otherwise, it will be updated.</p>
418 <h3>Method Details</h3>
419 <div class="method">
420 <code class="details" id="askContexts">askContexts(parent, body=None, x__xgafv=None)</code>
421 <pre>Agentic Retrieval Ask API for RAG.
422
423 Args:
424 parent: string, Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. (required)
425 body: object, The request body.
426 The object takes the form of:
427
428 { # Agentic Retrieval Ask API for RAG. Request message for VertexRagService.AskContexts.
429 &quot;query&quot;: { # A query to retrieve relevant contexts. # Required. Single RAG retrieve query.
430 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the query.
431 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
432 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
433 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
434 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
435 },
436 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
437 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
438 },
439 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
440 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
441 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
442 },
443 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
444 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
445 },
446 },
447 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
448 },
449 &quot;ranking&quot;: { # Configurations for hybrid search results ranking. # Optional. Configurations for hybrid search results ranking.
450 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
451 },
452 &quot;similarityTopK&quot;: 42, # Optional. The number of contexts to retrieve.
453 &quot;text&quot;: &quot;A String&quot;, # Optional. The query in text format to get relevant contexts.
454 },
455 &quot;tools&quot;: [ # Optional. The tools to use for AskContexts.
456 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
457 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
458 },
459 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
460 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
461 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
462 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
463 &quot;A String&quot;,
464 ],
465 },
466 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
467 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
468 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
469 &quot;A String&quot;,
470 ],
471 },
472 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
473 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
474 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
475 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
476 },
477 },
478 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
479 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
480 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
481 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
482 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
483 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
484 &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.
485 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
486 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
487 ],
488 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
489 &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.
490 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
491 },
492 &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.
493 &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;]}`
494 &quot;A String&quot;,
495 ],
496 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
497 &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.
498 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
499 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
500 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
501 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
502 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
503 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
504 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
505 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
506 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
507 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
508 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
509 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
510 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
511 },
512 &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.
513 &quot;A String&quot;,
514 ],
515 &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
516 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
517 &quot;A String&quot;,
518 ],
519 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
520 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
521 },
522 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
523 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
524 &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.
525 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
526 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
527 ],
528 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
529 &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.
530 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
531 },
532 &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.
533 &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;]}`
534 &quot;A String&quot;,
535 ],
536 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
537 &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.
538 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
539 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
540 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
541 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
542 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
543 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
544 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
545 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
546 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
547 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
548 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
549 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
550 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
551 },
552 &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.
553 &quot;A String&quot;,
554 ],
555 &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
556 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
557 &quot;A String&quot;,
558 ],
559 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
560 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
561 },
562 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
563 },
564 ],
565 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
566 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
567 },
568 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
569 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
570 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
571 &quot;A String&quot;,
572 ],
573 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
574 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
575 },
576 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
577 },
578 },
579 },
580 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
581 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
582 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
583 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
584 },
585 },
586 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
587 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
588 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
589 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
590 },
591 },
592 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
593 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
594 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
595 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
596 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
597 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
598 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
599 },
600 },
601 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
602 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
603 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
604 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
605 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
606 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
607 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
608 },
609 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
610 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
611 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
612 },
613 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
614 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
615 },
616 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
617 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
618 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
619 },
620 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
621 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
622 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
623 },
624 },
625 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
626 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
627 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
628 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
629 },
630 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
631 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
632 },
633 },
634 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
635 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
636 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
637 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
638 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
639 },
640 ],
641 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
642 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
643 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
644 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
645 },
646 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
647 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
648 &quot;A String&quot;,
649 ],
650 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
651 { # The definition of the Rag resource.
652 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
653 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
654 &quot;A String&quot;,
655 ],
656 },
657 ],
658 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
659 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
660 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
661 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
662 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
663 },
664 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
665 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
666 },
667 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
668 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
669 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
670 },
671 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
672 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
673 },
674 },
675 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
676 },
677 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
678 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
679 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
680 },
681 },
682 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
683 },
684 },
685 ],
686 }
687
688 x__xgafv: string, V1 error format.
689 Allowed values
690 1 - v1 error format
691 2 - v2 error format
692
693 Returns:
694 An object of the form:
695
696 { # Response message for VertexRagService.AskContexts.
697 &quot;contexts&quot;: { # Relevant contexts for one query. # The contexts of the query.
698 &quot;contexts&quot;: [ # All its contexts.
699 { # A context of the query.
700 &quot;chunk&quot;: { # A RagChunk includes the content of a chunk of a RagFile, and associated metadata. # Context of the retrieved chunk.
701 &quot;chunkId&quot;: &quot;A String&quot;, # The ID of the chunk.
702 &quot;fileId&quot;: &quot;A String&quot;, # The ID of the file that the chunk belongs to.
703 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # If populated, represents where the chunk starts and ends in the document.
704 &quot;firstPage&quot;: 42, # Page where chunk starts in the document. Inclusive. 1-indexed.
705 &quot;lastPage&quot;: 42, # Page where chunk ends in the document. Inclusive. 1-indexed.
706 },
707 &quot;text&quot;: &quot;A String&quot;, # The content of the chunk.
708 },
709 &quot;distance&quot;: 3.14, # The distance between the query dense embedding vector and the context text vector.
710 &quot;score&quot;: 3.14, # According to the underlying Vector DB and the selected metric type, the score can be either the distance or the similarity between the query and the context and its range depends on the metric type. For example, if the metric type is COSINE_DISTANCE, it represents the distance between the query and the context. The larger the distance, the less relevant the context is to the query. The range is [0, 2], while 0 means the most relevant and 2 means the least relevant.
711 &quot;sourceDisplayName&quot;: &quot;A String&quot;, # The file display name.
712 &quot;sourceUri&quot;: &quot;A String&quot;, # If the file is imported from Cloud Storage or Google Drive, source_uri will be original file URI in Cloud Storage or Google Drive; if file is uploaded, source_uri will be file display name.
713 &quot;sparseDistance&quot;: 3.14, # The distance between the query sparse embedding vector and the context text vector.
714 &quot;text&quot;: &quot;A String&quot;, # The text chunk.
715 },
716 ],
717 },
718 &quot;response&quot;: &quot;A String&quot;, # The Retrieval Response.
719 }</pre>
720 </div>
721
722 <div class="method">
723 <code class="details" id="asyncRetrieveContexts">asyncRetrieveContexts(parent, body=None, x__xgafv=None)</code>
724 <pre>Asynchronous API to retrieves relevant contexts for a query.
725
726 Args:
727 parent: string, Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. (required)
728 body: object, The request body.
729 The object takes the form of:
730
731 { # Request message for VertexRagService.AsyncRetrieveContexts.
732 &quot;query&quot;: { # A query to retrieve relevant contexts. # Required. Single RAG retrieve query.
733 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the query.
734 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
735 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
736 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
737 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
738 },
739 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
740 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
741 },
742 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
743 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
744 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
745 },
746 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
747 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
748 },
749 },
750 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
751 },
752 &quot;ranking&quot;: { # Configurations for hybrid search results ranking. # Optional. Configurations for hybrid search results ranking.
753 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
754 },
755 &quot;similarityTopK&quot;: 42, # Optional. The number of contexts to retrieve.
756 &quot;text&quot;: &quot;A String&quot;, # Optional. The query in text format to get relevant contexts.
757 },
758 &quot;tools&quot;: [ # Optional. The tools to use for AskContexts.
759 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
760 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
761 },
762 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
763 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
764 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
765 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
766 &quot;A String&quot;,
767 ],
768 },
769 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
770 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
771 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
772 &quot;A String&quot;,
773 ],
774 },
775 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
776 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
777 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
778 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
779 },
780 },
781 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
782 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
783 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
784 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
785 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
786 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
787 &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.
788 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
789 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
790 ],
791 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
792 &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.
793 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
794 },
795 &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.
796 &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;]}`
797 &quot;A String&quot;,
798 ],
799 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
800 &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.
801 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
802 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
803 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
804 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
805 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
806 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
807 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
808 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
809 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
810 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
811 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
812 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
813 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
814 },
815 &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.
816 &quot;A String&quot;,
817 ],
818 &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
819 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
820 &quot;A String&quot;,
821 ],
822 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
823 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
824 },
825 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
826 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
827 &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.
828 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
829 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
830 ],
831 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
832 &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.
833 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
834 },
835 &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.
836 &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;]}`
837 &quot;A String&quot;,
838 ],
839 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
840 &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.
841 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
842 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
843 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
844 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
845 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
846 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
847 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
848 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
849 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
850 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
851 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
852 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
853 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
854 },
855 &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.
856 &quot;A String&quot;,
857 ],
858 &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
859 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
860 &quot;A String&quot;,
861 ],
862 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
863 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
864 },
865 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
866 },
867 ],
868 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
869 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
870 },
871 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
872 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
873 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
874 &quot;A String&quot;,
875 ],
876 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
877 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
878 },
879 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
880 },
881 },
882 },
883 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
884 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
885 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
886 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
887 },
888 },
889 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
890 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
891 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
892 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
893 },
894 },
895 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
896 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
897 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
898 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
899 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
900 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
901 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
902 },
903 },
904 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
905 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
906 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
907 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
908 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
909 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
910 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
911 },
912 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
913 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
914 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
915 },
916 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
917 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
918 },
919 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
920 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
921 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
922 },
923 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
924 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
925 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
926 },
927 },
928 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
929 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
930 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
931 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
932 },
933 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
934 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
935 },
936 },
937 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
938 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
939 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
940 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
941 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
942 },
943 ],
944 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
945 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
946 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
947 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
948 },
949 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
950 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
951 &quot;A String&quot;,
952 ],
953 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
954 { # The definition of the Rag resource.
955 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
956 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
957 &quot;A String&quot;,
958 ],
959 },
960 ],
961 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
962 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
963 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
964 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
965 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
966 },
967 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
968 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
969 },
970 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
971 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
972 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
973 },
974 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
975 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
976 },
977 },
978 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
979 },
980 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
981 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
982 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
983 },
984 },
985 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
986 },
987 },
988 ],
989 }
990
991 x__xgafv: string, V1 error format.
992 Allowed values
993 1 - v1 error format
994 2 - v2 error format
995
996 Returns:
997 An object of the form:
998
999 { # This resource represents a long-running operation that is the result of a network API call.
1000 &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.
1001 &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.
1002 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1003 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
1004 {
1005 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1006 },
1007 ],
1008 &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.
1009 },
1010 &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.
1011 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1012 },
1013 &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}`.
1014 &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`.
1015 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1016 },
1017 }</pre>
1018 </div>
1019
1020 <div class="method">
1021 <code class="details" id="augmentPrompt">augmentPrompt(parent, body=None, x__xgafv=None)</code>
1022 <pre>Given an input prompt, it returns augmented prompt from vertex rag store to guide LLM towards generating grounded responses.
1023
1024 Args:
1025 parent: string, Required. The resource name of the Location from which to augment prompt. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. (required)
1026 body: object, The request body.
1027 The object takes the form of:
1028
1029 { # Request message for AugmentPrompt.
1030 &quot;contents&quot;: [ # Optional. Input content to augment, only text format is supported for now.
1031 { # 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.
1032 &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.
1033 { # 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.
1034 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
1035 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
1036 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
1037 },
1038 &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.
1039 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
1040 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
1041 },
1042 &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.
1043 &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.
1044 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
1045 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1046 },
1047 &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.
1048 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
1049 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1050 },
1051 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
1052 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
1053 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
1054 { # Partial argument value of the function call.
1055 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
1056 &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;.
1057 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
1058 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
1059 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
1060 &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.
1061 },
1062 ],
1063 &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.
1064 },
1065 &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.
1066 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
1067 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
1068 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
1069 { # 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.
1070 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
1071 &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.
1072 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
1073 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1074 },
1075 &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.
1076 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
1077 &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.
1078 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1079 },
1080 },
1081 ],
1082 &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.
1083 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1084 },
1085 &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.
1086 },
1087 &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.
1088 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
1089 &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.
1090 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1091 },
1092 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
1093 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
1094 },
1095 &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.
1096 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
1097 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
1098 &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.
1099 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
1100 &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].
1101 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
1102 },
1103 },
1104 ],
1105 &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;.
1106 },
1107 ],
1108 &quot;model&quot;: { # Metadata of the backend deployed model. # Optional. Metadata of the backend deployed model.
1109 &quot;model&quot;: &quot;A String&quot;, # Optional. The model that the user will send the augmented prompt for content generation.
1110 &quot;modelVersion&quot;: &quot;A String&quot;, # Optional. The model version of the backend deployed model.
1111 },
1112 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Optional. Retrieves contexts from the Vertex RagStore.
1113 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
1114 &quot;A String&quot;,
1115 ],
1116 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
1117 { # The definition of the Rag resource.
1118 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
1119 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
1120 &quot;A String&quot;,
1121 ],
1122 },
1123 ],
1124 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
1125 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
1126 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
1127 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
1128 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
1129 },
1130 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
1131 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
1132 },
1133 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
1134 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
1135 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
1136 },
1137 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
1138 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
1139 },
1140 },
1141 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
1142 },
1143 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
1144 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
1145 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
1146 },
1147 }
1148
1149 x__xgafv: string, V1 error format.
1150 Allowed values
1151 1 - v1 error format
1152 2 - v2 error format
1153
1154 Returns:
1155 An object of the form:
1156
1157 { # Response message for AugmentPrompt.
1158 &quot;augmentedPrompt&quot;: [ # Augmented prompt, only text format is supported for now.
1159 { # 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.
1160 &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.
1161 { # 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.
1162 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
1163 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
1164 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
1165 },
1166 &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.
1167 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
1168 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
1169 },
1170 &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.
1171 &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.
1172 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
1173 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1174 },
1175 &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.
1176 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
1177 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1178 },
1179 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
1180 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
1181 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
1182 { # Partial argument value of the function call.
1183 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
1184 &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;.
1185 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
1186 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
1187 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
1188 &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.
1189 },
1190 ],
1191 &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.
1192 },
1193 &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.
1194 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
1195 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
1196 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
1197 { # 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.
1198 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
1199 &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.
1200 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
1201 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1202 },
1203 &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.
1204 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
1205 &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.
1206 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1207 },
1208 },
1209 ],
1210 &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.
1211 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1212 },
1213 &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.
1214 },
1215 &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.
1216 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
1217 &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.
1218 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1219 },
1220 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
1221 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
1222 },
1223 &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.
1224 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
1225 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
1226 &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.
1227 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
1228 &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].
1229 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
1230 },
1231 },
1232 ],
1233 &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;.
1234 },
1235 ],
1236 &quot;facts&quot;: [ # Retrieved facts from RAG data sources.
1237 { # The fact used in grounding.
1238 &quot;chunk&quot;: { # A RagChunk includes the content of a chunk of a RagFile, and associated metadata. # If present, chunk properties.
1239 &quot;chunkId&quot;: &quot;A String&quot;, # The ID of the chunk.
1240 &quot;fileId&quot;: &quot;A String&quot;, # The ID of the file that the chunk belongs to.
1241 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # If populated, represents where the chunk starts and ends in the document.
1242 &quot;firstPage&quot;: 42, # Page where chunk starts in the document. Inclusive. 1-indexed.
1243 &quot;lastPage&quot;: 42, # Page where chunk ends in the document. Inclusive. 1-indexed.
1244 },
1245 &quot;text&quot;: &quot;A String&quot;, # The content of the chunk.
1246 },
1247 &quot;query&quot;: &quot;A String&quot;, # Query that is used to retrieve this fact.
1248 &quot;score&quot;: 3.14, # If present, according to the underlying Vector DB and the selected metric type, the score can be either the distance or the similarity between the query and the fact and its range depends on the metric type. For example, if the metric type is COSINE_DISTANCE, it represents the distance between the query and the fact. The larger the distance, the less relevant the fact is to the query. The range is [0, 2], while 0 means the most relevant and 2 means the least relevant.
1249 &quot;summary&quot;: &quot;A String&quot;, # If present, the summary/snippet of the fact.
1250 &quot;title&quot;: &quot;A String&quot;, # If present, it refers to the title of this fact.
1251 &quot;uri&quot;: &quot;A String&quot;, # If present, this uri links to the source of the fact.
1252 &quot;vectorDistance&quot;: 3.14, # If present, the distance between the query vector and this fact vector.
1253 },
1254 ],
1255 }</pre>
1256 </div>
1257
1258 <div class="method">
1259 <code class="details" id="close">close()</code>
1260 <pre>Close httplib2 connections.</pre>
1261 </div>
1262
1263 <div class="method">
1264 <code class="details" id="corroborateContent">corroborateContent(parent, body=None, x__xgafv=None)</code>
1265 <pre>Given an input text, it returns a score that evaluates the factuality of the text. It also extracts and returns claims from the text and provides supporting facts.
1266
1267 Args:
1268 parent: string, Required. The resource name of the Location from which to corroborate text. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. (required)
1269 body: object, The request body.
1270 The object takes the form of:
1271
1272 { # Request message for CorroborateContent.
1273 &quot;content&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. # Optional. Input content to corroborate, only text format is supported for now.
1274 &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.
1275 { # 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.
1276 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
1277 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
1278 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
1279 },
1280 &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.
1281 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
1282 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
1283 },
1284 &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.
1285 &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.
1286 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
1287 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1288 },
1289 &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.
1290 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
1291 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1292 },
1293 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
1294 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
1295 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
1296 { # Partial argument value of the function call.
1297 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
1298 &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;.
1299 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
1300 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
1301 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
1302 &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.
1303 },
1304 ],
1305 &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.
1306 },
1307 &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.
1308 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
1309 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
1310 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
1311 { # 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.
1312 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
1313 &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.
1314 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
1315 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1316 },
1317 &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.
1318 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
1319 &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.
1320 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1321 },
1322 },
1323 ],
1324 &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.
1325 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1326 },
1327 &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.
1328 },
1329 &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.
1330 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
1331 &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.
1332 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1333 },
1334 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
1335 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
1336 },
1337 &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.
1338 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
1339 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
1340 &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.
1341 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
1342 &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].
1343 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
1344 },
1345 },
1346 ],
1347 &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;.
1348 },
1349 &quot;facts&quot;: [ # Optional. Facts used to generate the text can also be used to corroborate the text.
1350 { # The fact used in grounding.
1351 &quot;chunk&quot;: { # A RagChunk includes the content of a chunk of a RagFile, and associated metadata. # If present, chunk properties.
1352 &quot;chunkId&quot;: &quot;A String&quot;, # The ID of the chunk.
1353 &quot;fileId&quot;: &quot;A String&quot;, # The ID of the file that the chunk belongs to.
1354 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # If populated, represents where the chunk starts and ends in the document.
1355 &quot;firstPage&quot;: 42, # Page where chunk starts in the document. Inclusive. 1-indexed.
1356 &quot;lastPage&quot;: 42, # Page where chunk ends in the document. Inclusive. 1-indexed.
1357 },
1358 &quot;text&quot;: &quot;A String&quot;, # The content of the chunk.
1359 },
1360 &quot;query&quot;: &quot;A String&quot;, # Query that is used to retrieve this fact.
1361 &quot;score&quot;: 3.14, # If present, according to the underlying Vector DB and the selected metric type, the score can be either the distance or the similarity between the query and the fact and its range depends on the metric type. For example, if the metric type is COSINE_DISTANCE, it represents the distance between the query and the fact. The larger the distance, the less relevant the fact is to the query. The range is [0, 2], while 0 means the most relevant and 2 means the least relevant.
1362 &quot;summary&quot;: &quot;A String&quot;, # If present, the summary/snippet of the fact.
1363 &quot;title&quot;: &quot;A String&quot;, # If present, it refers to the title of this fact.
1364 &quot;uri&quot;: &quot;A String&quot;, # If present, this uri links to the source of the fact.
1365 &quot;vectorDistance&quot;: 3.14, # If present, the distance between the query vector and this fact vector.
1366 },
1367 ],
1368 &quot;parameters&quot;: { # Parameters that can be overrided per request. # Optional. Parameters that can be set to override default settings per request.
1369 &quot;citationThreshold&quot;: 3.14, # Optional. Only return claims with citation score larger than the threshold.
1370 },
1371 }
1372
1373 x__xgafv: string, V1 error format.
1374 Allowed values
1375 1 - v1 error format
1376 2 - v2 error format
1377
1378 Returns:
1379 An object of the form:
1380
1381 { # Response message for CorroborateContent.
1382 &quot;claims&quot;: [ # Claims that are extracted from the input content and facts that support the claims.
1383 { # Claim that is extracted from the input text and facts that support it.
1384 &quot;endIndex&quot;: 42, # Index in the input text where the claim ends (exclusive).
1385 &quot;factIndexes&quot;: [ # Indexes of the facts supporting this claim.
1386 42,
1387 ],
1388 &quot;score&quot;: 3.14, # Confidence score of this corroboration.
1389 &quot;startIndex&quot;: 42, # Index in the input text where the claim starts (inclusive).
1390 },
1391 ],
1392 &quot;corroborationScore&quot;: 3.14, # Confidence score of corroborating content. Value is [0,1] with 1 is the most confidence.
1393 }</pre>
1394 </div>
1395
1396 <div class="method">
1397 <code class="details" id="deploy">deploy(destination, body=None, x__xgafv=None)</code>
1398 <pre>Deploys a model to a new endpoint.
1399
1400 Args:
1401 destination: string, Required. The resource name of the Location to deploy the model in. Format: `projects/{project}/locations/{location}` (required)
1402 body: object, The request body.
1403 The object takes the form of:
1404
1405 { # Request message for ModelGardenService.Deploy.
1406 &quot;customModel&quot;: { # The custom model to deploy from model weights in a Google Cloud Storage URI or Model Registry model. # The custom model to deploy from a Google Cloud Storage URI.
1407 &quot;gcsUri&quot;: &quot;A String&quot;, # Immutable. The Google Cloud Storage URI of the custom model, storing weights and config files (which can be used to infer the base model).
1408 &quot;modelId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use ModelConfig.model_user_id instead.
1409 },
1410 &quot;deployConfig&quot;: { # The deploy config to use for the deployment. # Optional. The deploy config to use for the deployment. If not specified, the default deploy config will be used.
1411 &quot;dedicatedResources&quot;: { # A description of resources that are dedicated to a DeployedModel or DeployedIndex, and that need a higher degree of manual configuration. # Optional. The dedicated resources to use for the endpoint. If not set, the default resources will be used.
1412 &quot;autoscalingMetricSpecs&quot;: [ # Immutable. The metric specifications that overrides a resource utilization metric (CPU utilization, accelerator&#x27;s duty cycle, and so on) target value (default to 60 if not set). At most one entry is allowed per metric. If machine_spec.accelerator_count is above 0, the autoscaling will be based on both CPU utilization and accelerator&#x27;s duty cycle metrics and scale up when either metrics exceeds its target value while scale down if both metrics are under their target value. The default target value is 60 for both metrics. If machine_spec.accelerator_count is 0, the autoscaling will be based on CPU utilization metric only with default target value 60 if not explicitly set. For example, in the case of Online Prediction, if you want to override target CPU utilization to 80, you should set autoscaling_metric_specs.metric_name to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and autoscaling_metric_specs.target to `80`.
1413 { # The metric specification that defines the target resource utilization (CPU utilization, accelerator&#x27;s duty cycle, and so on) for calculating the desired replica count.
1414 &quot;metricName&quot;: &quot;A String&quot;, # Required. The resource metric name. Supported metrics: * For Online Prediction: * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` * `aiplatform.googleapis.com/prediction/online/cpu/utilization` * `aiplatform.googleapis.com/prediction/online/request_count` * `pubsub.googleapis.com/subscription/num_undelivered_messages` * `prometheus.googleapis.com/vertex_dcgm_fi_dev_gpu_util` * `prometheus.googleapis.com/vertex_vllm_gpu_cache_usage_perc` * `prometheus.googleapis.com/vertex_vllm_num_requests_waiting`
1415 &quot;monitoredResourceLabels&quot;: { # Optional. The Cloud Monitoring monitored resource labels as key value pairs used for metrics filtering. See Cloud Monitoring Labels https://cloud.google.com/monitoring/api/v3/metric-model#generic-label-info
1416 &quot;a_key&quot;: &quot;A String&quot;,
1417 },
1418 &quot;target&quot;: 42, # The target resource utilization in percentage (1% - 100%) for the given metric; once the real usage deviates from the target by a certain percentage, the machine replicas change. The default value is 60 (representing 60%) if not provided.
1419 },
1420 ],
1421 &quot;flexStart&quot;: { # FlexStart is used to schedule the deployment workload on DWS resource. It contains the max duration of the deployment. # Optional. Immutable. If set, use DWS resource to schedule the deployment workload. reference: (https://cloud.google.com/blog/products/compute/introducing-dynamic-workload-scheduler)
1422 &quot;maxRuntimeDuration&quot;: &quot;A String&quot;, # The max duration of the deployment is max_runtime_duration. The deployment will be terminated after the duration. The max_runtime_duration can be set up to 7 days.
1423 },
1424 &quot;initialReplicaCount&quot;: 42, # Immutable. Number of initial replicas being deployed on when scaling the workload up from zero or when creating the workload in case min_replica_count = 0. When min_replica_count &gt; 0 (meaning that the scale-to-zero feature is not enabled), initial_replica_count should not be set. When min_replica_count = 0 (meaning that the scale-to-zero feature is enabled), initial_replica_count should be larger than zero, but no greater than max_replica_count.
1425 &quot;machineSpec&quot;: { # Specification of a single machine. # Required. Immutable. The specification of a single machine being used.
1426 &quot;acceleratorCount&quot;: 42, # The number of accelerators to attach to the machine. For [accelerator optimized machine types](https://cloud.google.com/compute/docs/accelerator-optimized-machines), One may set the accelerator_count from 1 to N for machine with N GPUs. If accelerator_count is less than or equal to N / 2, Agent Platform co-schedules the replicas of the model into the same VM to save cost. For example, if the machine type is a3-highgpu-8g, which has 8 H100 GPUs, one can set accelerator_count to 1 to 8. If accelerator_count is 1, 2, 3, or 4, Agent Platform co-schedules 8, 4, 2, or 2 replicas of the model into the same VM to save cost. When co-scheduling, CPU, memory and storage on the VM will be distributed to replicas on the VM. For example, one can expect a co-scheduled replica requesting 2 GPUs out of a 8-GPU VM will receive 25% of the CPU, memory and storage of the VM. Note that the feature is not compatible with multihost_gpu_node_count. When multihost_gpu_node_count is set, the co-scheduling will not be enabled.
1427 &quot;acceleratorType&quot;: &quot;A String&quot;, # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count.
1428 &quot;gpuPartitionSize&quot;: &quot;A String&quot;, # Optional. Immutable. The Nvidia GPU partition size. When specified, the requested accelerators will be partitioned into smaller GPU partitions. For example, if the request is for 8 units of NVIDIA A100 GPUs, and gpu_partition_size=&quot;1g.10gb&quot;, the service will create 8 * 7 = 56 partitioned MIG instances. The partition size must be a value supported by the requested accelerator. Refer to [Nvidia GPU Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions) for the available partition sizes. If set, the accelerator_count should be set to 1.
1429 &quot;machineType&quot;: &quot;A String&quot;, # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/gemini-enterprise-agent-platform/machine-learning/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/gemini-enterprise-agent-platform/machine-learning/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required.
1430 &quot;minGpuDriverVersion&quot;: &quot;A String&quot;, # Optional. Immutable. The minimum GPU driver version that this machine requires. For example, &quot;535.104.06&quot;. If not specified, the default GPU driver version will be used by the underlying infrastructure.
1431 &quot;multihostGpuNodeCount&quot;: 42, # Optional. Immutable. The number of nodes per replica for multihost GPU deployments.
1432 &quot;reservationAffinity&quot;: { # A ReservationAffinity can be used to configure a Vertex AI resource (e.g., a DeployedModel) to draw its Compute Engine resources from a Shared Reservation, or exclusively from on-demand capacity. # Optional. Immutable. Configuration controlling how this resource pool consumes reservation.
1433 &quot;key&quot;: &quot;A String&quot;, # Optional. Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, use `compute.googleapis.com/reservation-name` as the key and specify the name of your reservation as its value.
1434 &quot;reservationAffinityType&quot;: &quot;A String&quot;, # Required. Specifies the reservation affinity type.
1435 &quot;values&quot;: [ # Optional. Corresponds to the label values of a reservation resource. This must be the full resource name of the reservation or reservation block.
1436 &quot;A String&quot;,
1437 ],
1438 },
1439 &quot;tpuTopology&quot;: &quot;A String&quot;, # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: &quot;2x2x1&quot;).
1440 },
1441 &quot;maxReplicaCount&quot;: 42, # Immutable. The maximum number of replicas that may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale to that many replicas is guaranteed (barring service outages). If traffic increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Agent Platform CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type).
1442 &quot;minReplicaCount&quot;: 42, # Required. Immutable. The minimum number of machine replicas that will be always deployed on. This value must be greater than or equal to 1. If traffic increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed.
1443 &quot;requiredReplicaCount&quot;: 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial deployment/mutation is desired. If set, the deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count.
1444 &quot;scaleToZeroSpec&quot;: { # Specification for scale-to-zero feature. # Optional. Specification for scale-to-zero feature.
1445 &quot;idleScaledownPeriod&quot;: &quot;A String&quot;, # Optional. Duration of no traffic before scaling to zero. [MinValue=300] (5 minutes) [MaxValue=28800] (8 hours)
1446 &quot;minScaleupPeriod&quot;: &quot;A String&quot;, # Optional. Minimum duration that a deployment will be scaled up before traffic is evaluated for potential scale-down. [MinValue=300] (5 minutes) [MaxValue=28800] (8 hours)
1447 },
1448 &quot;spot&quot;: True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms).
1449 },
1450 &quot;fastTryoutEnabled&quot;: True or False, # Optional. If true, enable the QMT fast tryout feature for this model if possible.
1451 &quot;systemLabels&quot;: { # Optional. System labels for Model Garden deployments. These labels are managed by Google and for tracking purposes only.
1452 &quot;a_key&quot;: &quot;A String&quot;,
1453 },
1454 },
1455 &quot;endpointConfig&quot;: { # The endpoint config to use for the deployment. # Optional. The endpoint config to use for the deployment. If not specified, the default endpoint config will be used.
1456 &quot;dedicatedEndpointDisabled&quot;: True or False, # Optional. By default, if dedicated endpoint is enabled and private service connect config is not set, the endpoint will be exposed through a dedicated DNS [Endpoint.dedicated_endpoint_dns]. If private service connect config is set, the endpoint will be exposed through private service connect. Your request to the dedicated DNS will be isolated from other users&#x27; traffic and will have better performance and reliability. Note: Once you enabled dedicated endpoint, you won&#x27;t be able to send request to the shared DNS {region}-aiplatform.googleapis.com. The limitations will be removed soon. If this field is set to true, the dedicated endpoint will be disabled and the deployed model will be exposed through the shared DNS {region}-aiplatform.googleapis.com.
1457 &quot;dedicatedEndpointEnabled&quot;: True or False, # Optional. Deprecated. Use dedicated_endpoint_disabled instead. If true, the endpoint will be exposed through a dedicated DNS [Endpoint.dedicated_endpoint_dns]. Your request to the dedicated DNS will be isolated from other users&#x27; traffic and will have better performance and reliability. Note: Once you enabled dedicated endpoint, you won&#x27;t be able to send request to the shared DNS {region}-aiplatform.googleapis.com. The limitations will be removed soon.
1458 &quot;endpointDisplayName&quot;: &quot;A String&quot;, # Optional. The user-specified display name of the endpoint. If not set, a default name will be used.
1459 &quot;endpointUserId&quot;: &quot;A String&quot;, # Optional. Immutable. The ID to use for endpoint, which will become the final component of the endpoint resource name. If not provided, Vertex AI will generate a value for this ID. If the first character is a letter, this value may be up to 63 characters, and valid characters are `[a-z0-9-]`. The last character must be a letter or number. If the first character is a number, this value may be up to 9 characters, and valid characters are `[0-9]` with no leading zeros. When using HTTP/JSON, this field is populated based on a query string argument, such as `?endpoint_id=12345`. This is the fallback for fields that are not included in either the URI or the body.
1460 &quot;labels&quot;: { # Optional. The labels with user-defined metadata to organize your Endpoints. 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.
1461 &quot;a_key&quot;: &quot;A String&quot;,
1462 },
1463 &quot;privateServiceConnectConfig&quot;: { # Represents configuration for private service connect. # Optional. Configuration for private service connect. If set, the endpoint will be exposed through private service connect.
1464 &quot;enablePrivateServiceConnect&quot;: True or False, # Required. If true, expose the IndexEndpoint via private service connect.
1465 &quot;enableSecurePrivateServiceConnect&quot;: True or False, # Optional. If set to true, enable secure private service connect with IAM authorization. Otherwise, private service connect will be done without authorization. Note latency will be slightly increased if authorization is enabled.
1466 &quot;projectAllowlist&quot;: [ # A list of Projects from which the forwarding rule will target the service attachment.
1467 &quot;A String&quot;,
1468 ],
1469 &quot;pscAutomationConfigs&quot;: [ # Optional. List of projects and networks where the PSC endpoints will be created. This field is used by Online Inference(Prediction) only.
1470 { # PSC config that is used to automatically create PSC endpoints in the user projects.
1471 &quot;errorMessage&quot;: &quot;A String&quot;, # Output only. Error message if the PSC service automation failed.
1472 &quot;forwardingRule&quot;: &quot;A String&quot;, # Output only. Forwarding rule created by the PSC service automation.
1473 &quot;ipAddress&quot;: &quot;A String&quot;, # Output only. IP address rule created by the PSC service automation.
1474 &quot;network&quot;: &quot;A String&quot;, # Required. The full name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get): `projects/{project}/global/networks/{network}`.
1475 &quot;projectId&quot;: &quot;A String&quot;, # Required. Project id used to create forwarding rule.
1476 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the PSC service automation.
1477 },
1478 ],
1479 &quot;serviceAttachment&quot;: &quot;A String&quot;, # Output only. The name of the generated service attachment resource. This is only populated if the endpoint is deployed with PrivateServiceConnect.
1480 },
1481 },
1482 &quot;huggingFaceModelId&quot;: &quot;A String&quot;, # The Hugging Face model to deploy. Format: Hugging Face model ID like `google/gemma-2-2b-it`.
1483 &quot;modelConfig&quot;: { # The model config to use for the deployment. # Optional. The model config to use for the deployment. If not specified, the default model config will be used.
1484 &quot;acceptEula&quot;: True or False, # Optional. Whether the user accepts the End User License Agreement (EULA) for the model.
1485 &quot;containerSpec&quot;: { # Specification of a container for serving predictions. Some fields in this message correspond to fields in the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). # Optional. The specification of the container that is to be used when deploying. If not set, the default container spec will be used.
1486 &quot;args&quot;: [ # Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container&#x27;s [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify this field as an array of executable and arguments, similar to a Docker `CMD`&#x27;s &quot;default parameters&quot; form. If you don&#x27;t specify this field but do specify the command field, then the command from the `command` field runs without any additional arguments. See the [Kubernetes documentation about how the `command` and `args` fields interact with a container&#x27;s `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don&#x27;t specify this field and don&#x27;t specify the `command` field, then the container&#x27;s [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the env field. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field corresponds to the `args` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
1487 &quot;A String&quot;,
1488 ],
1489 &quot;command&quot;: [ # Immutable. Specifies the command that runs when the container starts. This overrides the container&#x27;s [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint). Specify this field as an array of executable and arguments, similar to a Docker `ENTRYPOINT`&#x27;s &quot;exec&quot; form, not its &quot;shell&quot; form. If you do not specify this field, then the container&#x27;s `ENTRYPOINT` runs, in conjunction with the args field or the container&#x27;s [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd), if either exists. If this field is not specified and the container does not have an `ENTRYPOINT`, then refer to the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). If you specify this field, then you can also specify the `args` field to provide additional arguments for this command. However, if you specify this field, then the container&#x27;s `CMD` is ignored. See the [Kubernetes documentation about how the `command` and `args` fields interact with a container&#x27;s `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the env field. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field corresponds to the `command` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
1490 &quot;A String&quot;,
1491 ],
1492 &quot;deploymentTimeout&quot;: &quot;A String&quot;, # Immutable. Deployment timeout. Limit for deployment timeout is 2 hours.
1493 &quot;env&quot;: [ # Immutable. List of environment variables to set in the container. After the container starts running, code running in the container can read these environment variables. Additionally, the command and args fields can reference these variables. Later entries in this list can also reference earlier entries. For example, the following example sets the variable `VAR_2` to have the value `foo bar`: ```json [ { &quot;name&quot;: &quot;VAR_1&quot;, &quot;value&quot;: &quot;foo&quot; }, { &quot;name&quot;: &quot;VAR_2&quot;, &quot;value&quot;: &quot;$(VAR_1) bar&quot; } ] ``` If you switch the order of the variables in the example, then the expansion does not occur. This field corresponds to the `env` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
1494 { # Represents an environment variable present in a Container or Python Module.
1495 &quot;name&quot;: &quot;A String&quot;, # Required. Name of the environment variable. Must be a valid C identifier.
1496 &quot;value&quot;: &quot;A String&quot;, # Required. Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
1497 },
1498 ],
1499 &quot;grpcPorts&quot;: [ # Immutable. List of ports to expose from the container. Vertex AI sends gRPC prediction requests that it receives to the first port on this list. Vertex AI also sends liveness and health checks to this port. If you do not specify this field, gRPC requests to the container will be disabled. Vertex AI does not use ports other than the first one listed. This field corresponds to the `ports` field of the Kubernetes Containers v1 core API.
1500 { # Represents a network port in a container.
1501 &quot;containerPort&quot;: 42, # The number of the port to expose on the pod&#x27;s IP address. Must be a valid port number, between 1 and 65535 inclusive.
1502 },
1503 ],
1504 &quot;healthProbe&quot;: { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes readiness probe.
1505 &quot;exec&quot;: { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command.
1506 &quot;command&quot;: [ # Command is the command line to execute inside the container, the working directory for the command is root (&#x27;/&#x27;) in the container&#x27;s filesystem. The command is simply exec&#x27;d, it is not run inside a shell, so traditional shell instructions (&#x27;|&#x27;, etc) won&#x27;t work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
1507 &quot;A String&quot;,
1508 ],
1509 },
1510 &quot;failureThreshold&quot;: 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument &#x27;failureThreshold&#x27;.
1511 &quot;grpc&quot;: { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request.
1512 &quot;port&quot;: 42, # Port number of the gRPC service. Number must be in the range 1 to 65535.
1513 &quot;service&quot;: &quot;A String&quot;, # Service is the name of the service to place in the gRPC HealthCheckRequest. See https://github.com/grpc/grpc/blob/master/doc/health-checking.md. If this is not specified, the default behavior is defined by gRPC.
1514 },
1515 &quot;httpGet&quot;: { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request.
1516 &quot;host&quot;: &quot;A String&quot;, # Host name to connect to, defaults to the model serving container&#x27;s IP. You probably want to set &quot;Host&quot; in httpHeaders instead.
1517 &quot;httpHeaders&quot;: [ # Custom headers to set in the request. HTTP allows repeated headers.
1518 { # HttpHeader describes a custom header to be used in HTTP probes
1519 &quot;name&quot;: &quot;A String&quot;, # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
1520 &quot;value&quot;: &quot;A String&quot;, # The header field value
1521 },
1522 ],
1523 &quot;path&quot;: &quot;A String&quot;, # Path to access on the HTTP server.
1524 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
1525 &quot;scheme&quot;: &quot;A String&quot;, # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are &quot;HTTP&quot; or &quot;HTTPS&quot;.
1526 },
1527 &quot;initialDelaySeconds&quot;: 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument &#x27;initialDelaySeconds&#x27;.
1528 &quot;periodSeconds&quot;: 42, # How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeout_seconds. Maps to Kubernetes probe argument &#x27;periodSeconds&#x27;.
1529 &quot;successThreshold&quot;: 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument &#x27;successThreshold&#x27;.
1530 &quot;tcpSocket&quot;: { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection.
1531 &quot;host&quot;: &quot;A String&quot;, # Optional: Host name to connect to, defaults to the model serving container&#x27;s IP.
1532 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
1533 },
1534 &quot;timeoutSeconds&quot;: 42, # Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to period_seconds. Maps to Kubernetes probe argument &#x27;timeoutSeconds&#x27;.
1535 },
1536 &quot;healthRoute&quot;: &quot;A String&quot;, # Immutable. HTTP path on the container to send health checks to. Vertex AI intermittently sends GET requests to this path on the container&#x27;s IP address and port to check that the container is healthy. Read more about [health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). For example, if you set this field to `/bar`, then Vertex AI intermittently sends a GET request to the `/bar` path on the port of your container specified by the first value of this `ModelContainerSpec`&#x27;s ports field. If you don&#x27;t specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/ DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)
1537 &quot;imageUri&quot;: &quot;A String&quot;, # Required. Immutable. URI of the Docker image to be used as the custom container for serving predictions. This URI must identify an image in Artifact Registry or Container Registry. Learn more about the [container publishing requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon ModelService.UploadModel, stored internally, and this original path is afterwards not used. To learn about the requirements for the Docker image itself, see [Custom container requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI&#x27;s [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field.
1538 &quot;invokeRoutePrefix&quot;: &quot;A String&quot;, # Immutable. Invoke route prefix for the custom container. &quot;/*&quot; is the only supported value right now. By setting this field, any non-root route on this model will be accessible with invoke http call eg: &quot;/invoke/foo/bar&quot;, however the [PredictionService.Invoke] RPC is not supported yet. Only one of `predict_route` or `invoke_route_prefix` can be set, and we default to using `predict_route` if this field is not set. If this field is set, the Model can only be deployed to dedicated endpoint.
1539 &quot;livenessProbe&quot;: { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes liveness probe.
1540 &quot;exec&quot;: { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command.
1541 &quot;command&quot;: [ # Command is the command line to execute inside the container, the working directory for the command is root (&#x27;/&#x27;) in the container&#x27;s filesystem. The command is simply exec&#x27;d, it is not run inside a shell, so traditional shell instructions (&#x27;|&#x27;, etc) won&#x27;t work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
1542 &quot;A String&quot;,
1543 ],
1544 },
1545 &quot;failureThreshold&quot;: 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument &#x27;failureThreshold&#x27;.
1546 &quot;grpc&quot;: { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request.
1547 &quot;port&quot;: 42, # Port number of the gRPC service. Number must be in the range 1 to 65535.
1548 &quot;service&quot;: &quot;A String&quot;, # Service is the name of the service to place in the gRPC HealthCheckRequest. See https://github.com/grpc/grpc/blob/master/doc/health-checking.md. If this is not specified, the default behavior is defined by gRPC.
1549 },
1550 &quot;httpGet&quot;: { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request.
1551 &quot;host&quot;: &quot;A String&quot;, # Host name to connect to, defaults to the model serving container&#x27;s IP. You probably want to set &quot;Host&quot; in httpHeaders instead.
1552 &quot;httpHeaders&quot;: [ # Custom headers to set in the request. HTTP allows repeated headers.
1553 { # HttpHeader describes a custom header to be used in HTTP probes
1554 &quot;name&quot;: &quot;A String&quot;, # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
1555 &quot;value&quot;: &quot;A String&quot;, # The header field value
1556 },
1557 ],
1558 &quot;path&quot;: &quot;A String&quot;, # Path to access on the HTTP server.
1559 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
1560 &quot;scheme&quot;: &quot;A String&quot;, # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are &quot;HTTP&quot; or &quot;HTTPS&quot;.
1561 },
1562 &quot;initialDelaySeconds&quot;: 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument &#x27;initialDelaySeconds&#x27;.
1563 &quot;periodSeconds&quot;: 42, # How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeout_seconds. Maps to Kubernetes probe argument &#x27;periodSeconds&#x27;.
1564 &quot;successThreshold&quot;: 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument &#x27;successThreshold&#x27;.
1565 &quot;tcpSocket&quot;: { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection.
1566 &quot;host&quot;: &quot;A String&quot;, # Optional: Host name to connect to, defaults to the model serving container&#x27;s IP.
1567 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
1568 },
1569 &quot;timeoutSeconds&quot;: 42, # Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to period_seconds. Maps to Kubernetes probe argument &#x27;timeoutSeconds&#x27;.
1570 },
1571 &quot;ports&quot;: [ # Immutable. List of ports to expose from the container. Vertex AI sends any prediction requests that it receives to the first port on this list. Vertex AI also sends [liveness and health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```json [ { &quot;containerPort&quot;: 8080 } ] ``` Vertex AI does not use ports other than the first one listed. This field corresponds to the `ports` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
1572 { # Represents a network port in a container.
1573 &quot;containerPort&quot;: 42, # The number of the port to expose on the pod&#x27;s IP address. Must be a valid port number, between 1 and 65535 inclusive.
1574 },
1575 ],
1576 &quot;predictRoute&quot;: &quot;A String&quot;, # Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.predict to this path on the container&#x27;s IP address and port. Vertex AI then returns the container&#x27;s response in the API response. For example, if you set this field to `/foo`, then when Vertex AI receives a prediction request, it forwards the request body in a POST request to the `/foo` path on the port of your container specified by the first value of this `ModelContainerSpec`&#x27;s ports field. If you don&#x27;t specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)
1577 &quot;sharedMemorySizeMb&quot;: &quot;A String&quot;, # Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes.
1578 &quot;startupProbe&quot;: { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes startup probe.
1579 &quot;exec&quot;: { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command.
1580 &quot;command&quot;: [ # Command is the command line to execute inside the container, the working directory for the command is root (&#x27;/&#x27;) in the container&#x27;s filesystem. The command is simply exec&#x27;d, it is not run inside a shell, so traditional shell instructions (&#x27;|&#x27;, etc) won&#x27;t work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
1581 &quot;A String&quot;,
1582 ],
1583 },
1584 &quot;failureThreshold&quot;: 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument &#x27;failureThreshold&#x27;.
1585 &quot;grpc&quot;: { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request.
1586 &quot;port&quot;: 42, # Port number of the gRPC service. Number must be in the range 1 to 65535.
1587 &quot;service&quot;: &quot;A String&quot;, # Service is the name of the service to place in the gRPC HealthCheckRequest. See https://github.com/grpc/grpc/blob/master/doc/health-checking.md. If this is not specified, the default behavior is defined by gRPC.
1588 },
1589 &quot;httpGet&quot;: { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request.
1590 &quot;host&quot;: &quot;A String&quot;, # Host name to connect to, defaults to the model serving container&#x27;s IP. You probably want to set &quot;Host&quot; in httpHeaders instead.
1591 &quot;httpHeaders&quot;: [ # Custom headers to set in the request. HTTP allows repeated headers.
1592 { # HttpHeader describes a custom header to be used in HTTP probes
1593 &quot;name&quot;: &quot;A String&quot;, # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
1594 &quot;value&quot;: &quot;A String&quot;, # The header field value
1595 },
1596 ],
1597 &quot;path&quot;: &quot;A String&quot;, # Path to access on the HTTP server.
1598 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
1599 &quot;scheme&quot;: &quot;A String&quot;, # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are &quot;HTTP&quot; or &quot;HTTPS&quot;.
1600 },
1601 &quot;initialDelaySeconds&quot;: 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument &#x27;initialDelaySeconds&#x27;.
1602 &quot;periodSeconds&quot;: 42, # How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeout_seconds. Maps to Kubernetes probe argument &#x27;periodSeconds&#x27;.
1603 &quot;successThreshold&quot;: 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument &#x27;successThreshold&#x27;.
1604 &quot;tcpSocket&quot;: { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection.
1605 &quot;host&quot;: &quot;A String&quot;, # Optional: Host name to connect to, defaults to the model serving container&#x27;s IP.
1606 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
1607 },
1608 &quot;timeoutSeconds&quot;: 42, # Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to period_seconds. Maps to Kubernetes probe argument &#x27;timeoutSeconds&#x27;.
1609 },
1610 },
1611 &quot;huggingFaceAccessToken&quot;: &quot;A String&quot;, # Optional. The Hugging Face read access token used to access the model artifacts of gated models.
1612 &quot;huggingFaceCacheEnabled&quot;: True or False, # Optional. If true, the model will deploy with a cached version instead of directly downloading the model artifacts from Hugging Face. This is suitable for VPC-SC users with limited internet access.
1613 &quot;modelDisplayName&quot;: &quot;A String&quot;, # Optional. The user-specified display name of the uploaded model. If not set, a default name will be used.
1614 &quot;modelUserId&quot;: &quot;A String&quot;, # Optional. The ID to use for the uploaded Model, which will become the final component of the model resource name. When not provided, Vertex AI will generate a value for this ID. When Model Registry model is provided, this field will be ignored. This value may be up to 63 characters, and valid characters are `[a-z0-9_-]`. The first character cannot be a number or hyphen.
1615 },
1616 &quot;publisherModelName&quot;: &quot;A String&quot;, # The Model Garden model to deploy. Format: `publishers/{publisher}/models/{publisher_model}@{version_id}`, or `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001`.
1617 }
1618
1619 x__xgafv: string, V1 error format.
1620 Allowed values
1621 1 - v1 error format
1622 2 - v2 error format
1623
1624 Returns:
1625 An object of the form:
1626
1627 { # This resource represents a long-running operation that is the result of a network API call.
1628 &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.
1629 &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.
1630 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1631 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
1632 {
1633 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1634 },
1635 ],
1636 &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.
1637 },
1638 &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.
1639 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1640 },
1641 &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}`.
1642 &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`.
1643 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1644 },
1645 }</pre>
1646 </div>
1647
1648 <div class="method">
1649 <code class="details" id="deployPublisherModel">deployPublisherModel(destination, body=None, x__xgafv=None)</code>
1650 <pre>Deploys publisher models.
1651
1652 Args:
1653 destination: string, Required. The resource name of the Location to deploy the model in. Format: `projects/{project}/locations/{location}` (required)
1654 body: object, The request body.
1655 The object takes the form of:
1656
1657 { # Request message for ModelGardenService.DeployPublisherModel.
1658 &quot;acceptEula&quot;: True or False, # Optional. Whether the user accepts the End User License Agreement (EULA) for the model.
1659 &quot;dedicatedResources&quot;: { # A description of resources that are dedicated to a DeployedModel or DeployedIndex, and that need a higher degree of manual configuration. # Optional. The dedicated resources to use for the endpoint. If not set, the default resources will be used.
1660 &quot;autoscalingMetricSpecs&quot;: [ # Immutable. The metric specifications that overrides a resource utilization metric (CPU utilization, accelerator&#x27;s duty cycle, and so on) target value (default to 60 if not set). At most one entry is allowed per metric. If machine_spec.accelerator_count is above 0, the autoscaling will be based on both CPU utilization and accelerator&#x27;s duty cycle metrics and scale up when either metrics exceeds its target value while scale down if both metrics are under their target value. The default target value is 60 for both metrics. If machine_spec.accelerator_count is 0, the autoscaling will be based on CPU utilization metric only with default target value 60 if not explicitly set. For example, in the case of Online Prediction, if you want to override target CPU utilization to 80, you should set autoscaling_metric_specs.metric_name to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and autoscaling_metric_specs.target to `80`.
1661 { # The metric specification that defines the target resource utilization (CPU utilization, accelerator&#x27;s duty cycle, and so on) for calculating the desired replica count.
1662 &quot;metricName&quot;: &quot;A String&quot;, # Required. The resource metric name. Supported metrics: * For Online Prediction: * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` * `aiplatform.googleapis.com/prediction/online/cpu/utilization` * `aiplatform.googleapis.com/prediction/online/request_count` * `pubsub.googleapis.com/subscription/num_undelivered_messages` * `prometheus.googleapis.com/vertex_dcgm_fi_dev_gpu_util` * `prometheus.googleapis.com/vertex_vllm_gpu_cache_usage_perc` * `prometheus.googleapis.com/vertex_vllm_num_requests_waiting`
1663 &quot;monitoredResourceLabels&quot;: { # Optional. The Cloud Monitoring monitored resource labels as key value pairs used for metrics filtering. See Cloud Monitoring Labels https://cloud.google.com/monitoring/api/v3/metric-model#generic-label-info
1664 &quot;a_key&quot;: &quot;A String&quot;,
1665 },
1666 &quot;target&quot;: 42, # The target resource utilization in percentage (1% - 100%) for the given metric; once the real usage deviates from the target by a certain percentage, the machine replicas change. The default value is 60 (representing 60%) if not provided.
1667 },
1668 ],
1669 &quot;flexStart&quot;: { # FlexStart is used to schedule the deployment workload on DWS resource. It contains the max duration of the deployment. # Optional. Immutable. If set, use DWS resource to schedule the deployment workload. reference: (https://cloud.google.com/blog/products/compute/introducing-dynamic-workload-scheduler)
1670 &quot;maxRuntimeDuration&quot;: &quot;A String&quot;, # The max duration of the deployment is max_runtime_duration. The deployment will be terminated after the duration. The max_runtime_duration can be set up to 7 days.
1671 },
1672 &quot;initialReplicaCount&quot;: 42, # Immutable. Number of initial replicas being deployed on when scaling the workload up from zero or when creating the workload in case min_replica_count = 0. When min_replica_count &gt; 0 (meaning that the scale-to-zero feature is not enabled), initial_replica_count should not be set. When min_replica_count = 0 (meaning that the scale-to-zero feature is enabled), initial_replica_count should be larger than zero, but no greater than max_replica_count.
1673 &quot;machineSpec&quot;: { # Specification of a single machine. # Required. Immutable. The specification of a single machine being used.
1674 &quot;acceleratorCount&quot;: 42, # The number of accelerators to attach to the machine. For [accelerator optimized machine types](https://cloud.google.com/compute/docs/accelerator-optimized-machines), One may set the accelerator_count from 1 to N for machine with N GPUs. If accelerator_count is less than or equal to N / 2, Agent Platform co-schedules the replicas of the model into the same VM to save cost. For example, if the machine type is a3-highgpu-8g, which has 8 H100 GPUs, one can set accelerator_count to 1 to 8. If accelerator_count is 1, 2, 3, or 4, Agent Platform co-schedules 8, 4, 2, or 2 replicas of the model into the same VM to save cost. When co-scheduling, CPU, memory and storage on the VM will be distributed to replicas on the VM. For example, one can expect a co-scheduled replica requesting 2 GPUs out of a 8-GPU VM will receive 25% of the CPU, memory and storage of the VM. Note that the feature is not compatible with multihost_gpu_node_count. When multihost_gpu_node_count is set, the co-scheduling will not be enabled.
1675 &quot;acceleratorType&quot;: &quot;A String&quot;, # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count.
1676 &quot;gpuPartitionSize&quot;: &quot;A String&quot;, # Optional. Immutable. The Nvidia GPU partition size. When specified, the requested accelerators will be partitioned into smaller GPU partitions. For example, if the request is for 8 units of NVIDIA A100 GPUs, and gpu_partition_size=&quot;1g.10gb&quot;, the service will create 8 * 7 = 56 partitioned MIG instances. The partition size must be a value supported by the requested accelerator. Refer to [Nvidia GPU Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions) for the available partition sizes. If set, the accelerator_count should be set to 1.
1677 &quot;machineType&quot;: &quot;A String&quot;, # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/gemini-enterprise-agent-platform/machine-learning/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/gemini-enterprise-agent-platform/machine-learning/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required.
1678 &quot;minGpuDriverVersion&quot;: &quot;A String&quot;, # Optional. Immutable. The minimum GPU driver version that this machine requires. For example, &quot;535.104.06&quot;. If not specified, the default GPU driver version will be used by the underlying infrastructure.
1679 &quot;multihostGpuNodeCount&quot;: 42, # Optional. Immutable. The number of nodes per replica for multihost GPU deployments.
1680 &quot;reservationAffinity&quot;: { # A ReservationAffinity can be used to configure a Vertex AI resource (e.g., a DeployedModel) to draw its Compute Engine resources from a Shared Reservation, or exclusively from on-demand capacity. # Optional. Immutable. Configuration controlling how this resource pool consumes reservation.
1681 &quot;key&quot;: &quot;A String&quot;, # Optional. Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, use `compute.googleapis.com/reservation-name` as the key and specify the name of your reservation as its value.
1682 &quot;reservationAffinityType&quot;: &quot;A String&quot;, # Required. Specifies the reservation affinity type.
1683 &quot;values&quot;: [ # Optional. Corresponds to the label values of a reservation resource. This must be the full resource name of the reservation or reservation block.
1684 &quot;A String&quot;,
1685 ],
1686 },
1687 &quot;tpuTopology&quot;: &quot;A String&quot;, # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: &quot;2x2x1&quot;).
1688 },
1689 &quot;maxReplicaCount&quot;: 42, # Immutable. The maximum number of replicas that may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale to that many replicas is guaranteed (barring service outages). If traffic increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Agent Platform CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type).
1690 &quot;minReplicaCount&quot;: 42, # Required. Immutable. The minimum number of machine replicas that will be always deployed on. This value must be greater than or equal to 1. If traffic increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed.
1691 &quot;requiredReplicaCount&quot;: 42, # Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial deployment/mutation is desired. If set, the deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count.
1692 &quot;scaleToZeroSpec&quot;: { # Specification for scale-to-zero feature. # Optional. Specification for scale-to-zero feature.
1693 &quot;idleScaledownPeriod&quot;: &quot;A String&quot;, # Optional. Duration of no traffic before scaling to zero. [MinValue=300] (5 minutes) [MaxValue=28800] (8 hours)
1694 &quot;minScaleupPeriod&quot;: &quot;A String&quot;, # Optional. Minimum duration that a deployment will be scaled up before traffic is evaluated for potential scale-down. [MinValue=300] (5 minutes) [MaxValue=28800] (8 hours)
1695 },
1696 &quot;spot&quot;: True or False, # Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms).
1697 },
1698 &quot;endpointDisplayName&quot;: &quot;A String&quot;, # Optional. The user-specified display name of the endpoint. If not set, a default name will be used.
1699 &quot;huggingFaceAccessToken&quot;: &quot;A String&quot;, # Optional. The Hugging Face read access token used to access the model artifacts of gated models.
1700 &quot;model&quot;: &quot;A String&quot;, # Required. The model to deploy. Format: 1. `publishers/{publisher}/models/{publisher_model}@{version_id}`, or `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001`. 2. Hugging Face model ID like `google/gemma-2-2b-it`. 3. Custom model Google Cloud Storage URI like `gs://bucket`. 4. Custom model zip file like `https://example.com/a.zip`.
1701 &quot;modelDisplayName&quot;: &quot;A String&quot;, # Optional. The user-specified display name of the uploaded model. If not set, a default name will be used.
1702 }
1703
1704 x__xgafv: string, V1 error format.
1705 Allowed values
1706 1 - v1 error format
1707 2 - v2 error format
1708
1709 Returns:
1710 An object of the form:
1711
1712 { # This resource represents a long-running operation that is the result of a network API call.
1713 &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.
1714 &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.
1715 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1716 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
1717 {
1718 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1719 },
1720 ],
1721 &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.
1722 },
1723 &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.
1724 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1725 },
1726 &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}`.
1727 &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`.
1728 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1729 },
1730 }</pre>
1731 </div>
1732
1733 <div class="method">
1734 <code class="details" id="evaluateDataset">evaluateDataset(location, body=None, x__xgafv=None)</code>
1735 <pre>Evaluates a dataset based on a set of given metrics.
1736
1737 Args:
1738 location: string, Required. The resource name of the Location to evaluate the dataset. Format: `projects/{project}/locations/{location}` (required)
1739 body: object, The request body.
1740 The object takes the form of:
1741
1742 { # Request message for EvaluationService.EvaluateDataset.
1743 &quot;autoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Autorater config used for evaluation. Currently only publisher Gemini models are supported. Format: `projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}.`
1744 &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}`
1745 &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.
1746 &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.
1747 &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.
1748 &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.
1749 &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.
1750 &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].
1751 &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.
1752 &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;
1753 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
1754 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
1755 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
1756 },
1757 &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`.
1758 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
1759 &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.
1760 },
1761 &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.
1762 &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.
1763 &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.
1764 &quot;modelConfig&quot;: { # Config for model selection. # Optional. Config for model selection.
1765 &quot;featureSelectionPreference&quot;: &quot;A String&quot;, # Required. Feature selection preference.
1766 },
1767 &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].
1768 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
1769 { # Configuration for the model to configure output formatting and delivery.
1770 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
1771 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
1772 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1773 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
1774 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
1775 },
1776 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
1777 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
1778 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1779 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
1780 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
1781 },
1782 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
1783 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
1784 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
1785 },
1786 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
1787 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
1788 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1789 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
1790 &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.
1791 },
1792 },
1793 ],
1794 &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.
1795 &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.
1796 &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.
1797 &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.
1798 &quot;A String&quot;,
1799 ],
1800 &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.
1801 &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.
1802 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
1803 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
1804 ],
1805 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
1806 &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.
1807 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
1808 },
1809 &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.
1810 &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;]}`
1811 &quot;A String&quot;,
1812 ],
1813 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
1814 &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.
1815 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
1816 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
1817 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
1818 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
1819 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
1820 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
1821 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
1822 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
1823 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
1824 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
1825 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
1826 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
1827 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
1828 },
1829 &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.
1830 &quot;A String&quot;,
1831 ],
1832 &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
1833 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
1834 &quot;A String&quot;,
1835 ],
1836 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
1837 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
1838 },
1839 &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.
1840 &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.
1841 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
1842 },
1843 &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.
1844 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
1845 },
1846 },
1847 &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.
1848 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
1849 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
1850 &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`.
1851 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
1852 { # Configuration for a single speaker in a multi-speaker setup.
1853 &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.
1854 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
1855 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
1856 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
1857 },
1858 &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.
1859 &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.
1860 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
1861 },
1862 },
1863 },
1864 ],
1865 },
1866 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
1867 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
1868 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
1869 },
1870 &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.
1871 &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.
1872 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
1873 },
1874 },
1875 },
1876 &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.
1877 &quot;A String&quot;,
1878 ],
1879 &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].
1880 &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.
1881 &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.
1882 &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.
1883 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
1884 },
1885 &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.
1886 &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.
1887 },
1888 &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.
1889 },
1890 &quot;dataset&quot;: { # The dataset used for evaluation. # Required. The dataset used for evaluation.
1891 &quot;bigquerySource&quot;: { # The BigQuery location for the input content. # BigQuery source holds the dataset.
1892 &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`.
1893 },
1894 &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.
1895 &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.
1896 &quot;A String&quot;,
1897 ],
1898 },
1899 },
1900 &quot;location&quot;: &quot;A String&quot;, # Required. The resource name of the Location to evaluate the dataset. Format: `projects/{project}/locations/{location}`
1901 &quot;metrics&quot;: [ # Required. The metrics used for evaluation.
1902 { # The metric used for running evaluations.
1903 &quot;aggregationMetrics&quot;: [ # Optional. The aggregation metrics to use.
1904 &quot;A String&quot;,
1905 ],
1906 &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.
1907 &quot;useEffectiveOrder&quot;: True or False, # Optional. Whether to use_effective_order to compute bleu score.
1908 },
1909 &quot;computationBasedMetricSpec&quot;: { # Specification for a computation based metric. # Spec for a computation based metric.
1910 &quot;parameters&quot;: { # Optional. A map of parameters for the metric, e.g. {&quot;rouge_type&quot;: &quot;rougeL&quot;}.
1911 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1912 },
1913 &quot;type&quot;: &quot;A String&quot;, # Required. The type of the computation based metric.
1914 },
1915 &quot;customCodeExecutionSpec&quot;: { # Specificies a metric that is populated by evaluating user-defined Python code. # Spec for Custom Code Execution metric.
1916 &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.
1917 },
1918 &quot;exactMatchSpec&quot;: { # Spec for exact match metric - returns 1 if prediction and reference exactly matches, otherwise 0. # Spec for exact match metric.
1919 },
1920 &quot;llmBasedMetricSpec&quot;: { # Specification for an LLM based metric. # Spec for an LLM based metric.
1921 &quot;additionalConfig&quot;: { # Optional. Optional additional configuration for the metric.
1922 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1923 },
1924 &quot;judgeAutoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Optional configuration for the judge LLM (Autorater).
1925 &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}`
1926 &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.
1927 &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.
1928 &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.
1929 &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.
1930 &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.
1931 &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].
1932 &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.
1933 &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;
1934 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
1935 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
1936 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
1937 },
1938 &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`.
1939 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
1940 &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.
1941 },
1942 &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.
1943 &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.
1944 &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.
1945 &quot;modelConfig&quot;: { # Config for model selection. # Optional. Config for model selection.
1946 &quot;featureSelectionPreference&quot;: &quot;A String&quot;, # Required. Feature selection preference.
1947 },
1948 &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].
1949 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
1950 { # Configuration for the model to configure output formatting and delivery.
1951 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
1952 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
1953 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1954 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
1955 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
1956 },
1957 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
1958 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
1959 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1960 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
1961 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
1962 },
1963 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
1964 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
1965 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
1966 },
1967 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
1968 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
1969 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
1970 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
1971 &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.
1972 },
1973 },
1974 ],
1975 &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.
1976 &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.
1977 &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.
1978 &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.
1979 &quot;A String&quot;,
1980 ],
1981 &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.
1982 &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.
1983 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
1984 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
1985 ],
1986 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
1987 &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.
1988 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
1989 },
1990 &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.
1991 &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;]}`
1992 &quot;A String&quot;,
1993 ],
1994 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
1995 &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.
1996 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
1997 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
1998 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
1999 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
2000 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
2001 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
2002 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
2003 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
2004 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
2005 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
2006 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
2007 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
2008 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2009 },
2010 &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.
2011 &quot;A String&quot;,
2012 ],
2013 &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
2014 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
2015 &quot;A String&quot;,
2016 ],
2017 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
2018 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
2019 },
2020 &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.
2021 &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.
2022 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
2023 },
2024 &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.
2025 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
2026 },
2027 },
2028 &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.
2029 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
2030 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
2031 &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`.
2032 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
2033 { # Configuration for a single speaker in a multi-speaker setup.
2034 &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.
2035 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
2036 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
2037 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
2038 },
2039 &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.
2040 &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.
2041 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
2042 },
2043 },
2044 },
2045 ],
2046 },
2047 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
2048 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
2049 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
2050 },
2051 &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.
2052 &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.
2053 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
2054 },
2055 },
2056 },
2057 &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.
2058 &quot;A String&quot;,
2059 ],
2060 &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].
2061 &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.
2062 &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.
2063 &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.
2064 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
2065 },
2066 &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.
2067 &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.
2068 },
2069 &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.
2070 },
2071 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Template for the prompt sent to the judge model.
2072 &quot;predefinedRubricGenerationSpec&quot;: { # The spec for a pre-defined metric. # Dynamically generate rubrics using a predefined spec.
2073 &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;.
2074 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
2075 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2076 },
2077 },
2078 &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.
2079 &quot;customCodeParserConfig&quot;: { # Configuration for parsing the LLM response using custom code. # Optional. Use custom code to parse the LLM response.
2080 &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
2081 },
2082 },
2083 &quot;rubricGenerationSpec&quot;: { # Specification for how rubrics should be generated. # Dynamically generate rubrics using this specification.
2084 &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.
2085 &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}`
2086 &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.
2087 &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.
2088 &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.
2089 &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.
2090 &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.
2091 &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].
2092 &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.
2093 &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;
2094 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
2095 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
2096 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
2097 },
2098 &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`.
2099 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
2100 &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.
2101 },
2102 &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.
2103 &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.
2104 &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.
2105 &quot;modelConfig&quot;: { # Config for model selection. # Optional. Config for model selection.
2106 &quot;featureSelectionPreference&quot;: &quot;A String&quot;, # Required. Feature selection preference.
2107 },
2108 &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].
2109 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
2110 { # Configuration for the model to configure output formatting and delivery.
2111 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
2112 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
2113 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
2114 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
2115 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
2116 },
2117 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
2118 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
2119 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
2120 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
2121 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
2122 },
2123 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
2124 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
2125 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
2126 },
2127 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
2128 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
2129 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
2130 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
2131 &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.
2132 },
2133 },
2134 ],
2135 &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.
2136 &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.
2137 &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.
2138 &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.
2139 &quot;A String&quot;,
2140 ],
2141 &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.
2142 &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.
2143 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
2144 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2145 ],
2146 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
2147 &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.
2148 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2149 },
2150 &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.
2151 &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;]}`
2152 &quot;A String&quot;,
2153 ],
2154 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
2155 &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.
2156 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
2157 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
2158 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
2159 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
2160 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
2161 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
2162 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
2163 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
2164 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
2165 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
2166 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
2167 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
2168 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2169 },
2170 &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.
2171 &quot;A String&quot;,
2172 ],
2173 &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
2174 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
2175 &quot;A String&quot;,
2176 ],
2177 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
2178 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
2179 },
2180 &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.
2181 &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.
2182 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
2183 },
2184 &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.
2185 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
2186 },
2187 },
2188 &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.
2189 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
2190 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
2191 &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`.
2192 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
2193 { # Configuration for a single speaker in a multi-speaker setup.
2194 &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.
2195 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
2196 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
2197 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
2198 },
2199 &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.
2200 &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.
2201 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
2202 },
2203 },
2204 },
2205 ],
2206 },
2207 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
2208 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
2209 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
2210 },
2211 &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.
2212 &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.
2213 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
2214 },
2215 },
2216 },
2217 &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.
2218 &quot;A String&quot;,
2219 ],
2220 &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].
2221 &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.
2222 &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.
2223 &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.
2224 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
2225 },
2226 &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.
2227 &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.
2228 },
2229 &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.
2230 },
2231 &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.
2232 &quot;rubricContentType&quot;: &quot;A String&quot;, # The type of rubric content to be generated.
2233 &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.
2234 &quot;A String&quot;,
2235 ],
2236 },
2237 &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.
2238 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for the judge model.
2239 },
2240 &quot;metadata&quot;: { # Metadata about the metric, used for visualization and organization. # Optional. Metadata about the metric, used for visualization and organization.
2241 &quot;otherMetadata&quot;: { # Optional. Flexible metadata for user-defined attributes.
2242 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2243 },
2244 &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.
2245 &quot;description&quot;: &quot;A String&quot;, # Optional. The description of the score explaining the directionality etc.
2246 &quot;max&quot;: 3.14, # Required. The maximum value of the score range (inclusive).
2247 &quot;min&quot;: 3.14, # Required. The minimum value of the score range (inclusive).
2248 &quot;step&quot;: 3.14, # Optional. The distance between discrete steps in the range. If unset, the range is assumed to be continuous.
2249 },
2250 &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.
2251 },
2252 &quot;pairwiseMetricSpec&quot;: { # Spec for pairwise metric. # Spec for pairwise metric.
2253 &quot;baselineResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the baseline response.
2254 &quot;candidateResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the candidate response.
2255 &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.
2256 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
2257 },
2258 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pairwise metric.
2259 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pairwise metric.
2260 },
2261 &quot;pointwiseMetricSpec&quot;: { # Spec for pointwise metric. # Spec for pointwise metric.
2262 &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.
2263 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
2264 },
2265 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pointwise metric.
2266 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pointwise metric.
2267 },
2268 &quot;predefinedMetricSpec&quot;: { # The spec for a pre-defined metric. # The spec for a pre-defined metric.
2269 &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;.
2270 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
2271 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2272 },
2273 },
2274 &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.
2275 &quot;rougeType&quot;: &quot;A String&quot;, # Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum.
2276 &quot;splitSummaries&quot;: True or False, # Optional. Whether to split summaries while using rougeLsum.
2277 &quot;useStemmer&quot;: True or False, # Optional. Whether to use stemmer to compute rouge score.
2278 },
2279 },
2280 ],
2281 &quot;outputConfig&quot;: { # Config for evaluation output. # Required. Config for evaluation output.
2282 &quot;gcsDestination&quot;: { # The Google Cloud Storage location where the output is to be written to. # Cloud storage destination for evaluation output.
2283 &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.
2284 },
2285 },
2286 }
2287
2288 x__xgafv: string, V1 error format.
2289 Allowed values
2290 1 - v1 error format
2291 2 - v2 error format
2292
2293 Returns:
2294 An object of the form:
2295
2296 { # This resource represents a long-running operation that is the result of a network API call.
2297 &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.
2298 &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.
2299 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2300 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
2301 {
2302 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2303 },
2304 ],
2305 &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.
2306 },
2307 &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.
2308 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2309 },
2310 &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}`.
2311 &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`.
2312 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2313 },
2314 }</pre>
2315 </div>
2316
2317 <div class="method">
2318 <code class="details" id="evaluateInstances">evaluateInstances(location, body=None, x__xgafv=None)</code>
2319 <pre>Evaluates instances based on a given metric.
2320
2321 Args:
2322 location: string, Required. The resource name of the Location to evaluate the instances. Format: `projects/{project}/locations/{location}` (required)
2323 body: object, The request body.
2324 The object takes the form of:
2325
2326 { # Request message for EvaluationService.EvaluateInstances.
2327 &quot;autoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Autorater config used for evaluation. Not applicable for predefined metrics (PredefinedMetricSpec); the server uses its own model configuration for predefined metrics and this field is ignored.
2328 &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}`
2329 &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.
2330 &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.
2331 &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.
2332 &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.
2333 &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.
2334 &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].
2335 &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.
2336 &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;
2337 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
2338 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
2339 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
2340 },
2341 &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`.
2342 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
2343 &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.
2344 },
2345 &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.
2346 &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.
2347 &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.
2348 &quot;modelConfig&quot;: { # Config for model selection. # Optional. Config for model selection.
2349 &quot;featureSelectionPreference&quot;: &quot;A String&quot;, # Required. Feature selection preference.
2350 },
2351 &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].
2352 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
2353 { # Configuration for the model to configure output formatting and delivery.
2354 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
2355 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
2356 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
2357 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
2358 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
2359 },
2360 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
2361 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
2362 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
2363 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
2364 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
2365 },
2366 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
2367 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
2368 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
2369 },
2370 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
2371 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
2372 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
2373 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
2374 &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.
2375 },
2376 },
2377 ],
2378 &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.
2379 &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.
2380 &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.
2381 &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.
2382 &quot;A String&quot;,
2383 ],
2384 &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.
2385 &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.
2386 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
2387 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2388 ],
2389 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
2390 &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.
2391 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2392 },
2393 &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.
2394 &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;]}`
2395 &quot;A String&quot;,
2396 ],
2397 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
2398 &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.
2399 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
2400 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
2401 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
2402 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
2403 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
2404 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
2405 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
2406 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
2407 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
2408 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
2409 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
2410 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
2411 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2412 },
2413 &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.
2414 &quot;A String&quot;,
2415 ],
2416 &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
2417 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
2418 &quot;A String&quot;,
2419 ],
2420 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
2421 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
2422 },
2423 &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.
2424 &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.
2425 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
2426 },
2427 &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.
2428 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
2429 },
2430 },
2431 &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.
2432 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
2433 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
2434 &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`.
2435 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
2436 { # Configuration for a single speaker in a multi-speaker setup.
2437 &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.
2438 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
2439 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
2440 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
2441 },
2442 &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.
2443 &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.
2444 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
2445 },
2446 },
2447 },
2448 ],
2449 },
2450 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
2451 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
2452 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
2453 },
2454 &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.
2455 &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.
2456 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
2457 },
2458 },
2459 },
2460 &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.
2461 &quot;A String&quot;,
2462 ],
2463 &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].
2464 &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.
2465 &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.
2466 &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.
2467 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
2468 },
2469 &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.
2470 &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.
2471 },
2472 &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.
2473 },
2474 &quot;bleuInput&quot;: { # Input for bleu metric. # Instances and metric spec for bleu metric.
2475 &quot;instances&quot;: [ # Required. Repeated bleu instances.
2476 { # Spec for bleu instance.
2477 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
2478 &quot;reference&quot;: &quot;A String&quot;, # Required. Ground truth used to compare against the prediction.
2479 },
2480 ],
2481 &quot;metricSpec&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. # Required. Spec for bleu score metric.
2482 &quot;useEffectiveOrder&quot;: True or False, # Optional. Whether to use_effective_order to compute bleu score.
2483 },
2484 },
2485 &quot;coherenceInput&quot;: { # Input for coherence metric. # Input for coherence metric.
2486 &quot;instance&quot;: { # Spec for coherence instance. # Required. Coherence instance.
2487 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
2488 },
2489 &quot;metricSpec&quot;: { # Spec for coherence score metric. # Required. Spec for coherence score metric.
2490 &quot;version&quot;: 42, # Optional. Which version to use for evaluation.
2491 },
2492 },
2493 &quot;cometInput&quot;: { # Input for Comet metric. # Translation metrics. Input for Comet metric.
2494 &quot;instance&quot;: { # Spec for Comet instance - The fields used for evaluation are dependent on the comet version. # Required. Comet instance.
2495 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
2496 &quot;reference&quot;: &quot;A String&quot;, # Optional. Ground truth used to compare against the prediction.
2497 &quot;source&quot;: &quot;A String&quot;, # Optional. Source text in original language.
2498 },
2499 &quot;metricSpec&quot;: { # Spec for Comet metric. # Required. Spec for comet metric.
2500 &quot;sourceLanguage&quot;: &quot;A String&quot;, # Optional. Source language in BCP-47 format.
2501 &quot;targetLanguage&quot;: &quot;A String&quot;, # Optional. Target language in BCP-47 format. Covers both prediction and reference.
2502 &quot;version&quot;: &quot;A String&quot;, # Required. Which version to use for evaluation.
2503 },
2504 },
2505 &quot;exactMatchInput&quot;: { # Input for exact match metric. # Auto metric instances. Instances and metric spec for exact match metric.
2506 &quot;instances&quot;: [ # Required. Repeated exact match instances.
2507 { # Spec for exact match instance.
2508 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
2509 &quot;reference&quot;: &quot;A String&quot;, # Required. Ground truth used to compare against the prediction.
2510 },
2511 ],
2512 &quot;metricSpec&quot;: { # Spec for exact match metric - returns 1 if prediction and reference exactly matches, otherwise 0. # Required. Spec for exact match metric.
2513 },
2514 },
2515 &quot;fluencyInput&quot;: { # Input for fluency metric. # LLM-based metric instance. General text generation metrics, applicable to other categories. Input for fluency metric.
2516 &quot;instance&quot;: { # Spec for fluency instance. # Required. Fluency instance.
2517 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
2518 },
2519 &quot;metricSpec&quot;: { # Spec for fluency score metric. # Required. Spec for fluency score metric.
2520 &quot;version&quot;: 42, # Optional. Which version to use for evaluation.
2521 },
2522 },
2523 &quot;fulfillmentInput&quot;: { # Input for fulfillment metric. # Input for fulfillment metric.
2524 &quot;instance&quot;: { # Spec for fulfillment instance. # Required. Fulfillment instance.
2525 &quot;instruction&quot;: &quot;A String&quot;, # Required. Inference instruction prompt to compare prediction with.
2526 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
2527 },
2528 &quot;metricSpec&quot;: { # Spec for fulfillment metric. # Required. Spec for fulfillment score metric.
2529 &quot;version&quot;: 42, # Optional. Which version to use for evaluation.
2530 },
2531 },
2532 &quot;groundednessInput&quot;: { # Input for groundedness metric. # Input for groundedness metric.
2533 &quot;instance&quot;: { # Spec for groundedness instance. # Required. Groundedness instance.
2534 &quot;context&quot;: &quot;A String&quot;, # Required. Background information provided in context used to compare against the prediction.
2535 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
2536 },
2537 &quot;metricSpec&quot;: { # Spec for groundedness metric. # Required. Spec for groundedness metric.
2538 &quot;version&quot;: 42, # Optional. Which version to use for evaluation.
2539 },
2540 },
2541 &quot;instance&quot;: { # A single instance to be evaluated. Instances are used to specify the input data for evaluation, from simple string comparisons to complex, multi-turn model evaluations # The instance to be evaluated.
2542 &quot;agentData&quot;: { # Deprecated: Use `agent_eval_data` instead. Contains data specific to agent evaluations. # Optional. Deprecated: Use `agent_eval_data` instead. Data used for agent evaluation.
2543 &quot;agentConfig&quot;: { # Deprecated: Use `google.cloud.aiplatform.master.AgentConfig` in `agent_eval_data` instead. Configuration for an Agent. # Optional. Deprecated: Use `agent_eval_data` instead. Agent configuration.
2544 &quot;agentId&quot;: &quot;A String&quot;, # Optional. Unique identifier of the agent. This ID is used to refer to this agent, e.g., in AgentEvent.author, or in the `sub_agents` field. It must be unique within the `agents` map.
2545 &quot;agentType&quot;: &quot;A String&quot;, # Optional. The type or class of the agent (e.g., &quot;LlmAgent&quot;, &quot;RouterAgent&quot;, &quot;ToolUseAgent&quot;). Useful for the autorater to understand the expected behavior of the agent.
2546 &quot;description&quot;: &quot;A String&quot;, # Optional. A high-level description of the agent&#x27;s role and responsibilities. Critical for evaluating if the agent is routing tasks correctly.
2547 &quot;developerInstruction&quot;: { # Instance data used to populate placeholders in a metric prompt template. # Optional. Contains instructions from the developer for the agent. Can be static or a dynamic prompt template used with the `AgentEvent.state_delta` field.
2548 &quot;contents&quot;: { # List of standard Content messages from Gemini API. # List of Gemini content data.
2549 &quot;contents&quot;: [ # Optional. Repeated contents.
2550 { # 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.
2551 &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.
2552 { # 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.
2553 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
2554 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
2555 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
2556 },
2557 &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.
2558 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
2559 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
2560 },
2561 &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.
2562 &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.
2563 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
2564 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2565 },
2566 &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.
2567 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
2568 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2569 },
2570 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
2571 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
2572 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
2573 { # Partial argument value of the function call.
2574 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
2575 &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;.
2576 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
2577 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
2578 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
2579 &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.
2580 },
2581 ],
2582 &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.
2583 },
2584 &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.
2585 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
2586 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
2587 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
2588 { # 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.
2589 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
2590 &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.
2591 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
2592 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2593 },
2594 &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.
2595 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
2596 &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.
2597 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2598 },
2599 },
2600 ],
2601 &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.
2602 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2603 },
2604 &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.
2605 },
2606 &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.
2607 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
2608 &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.
2609 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2610 },
2611 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
2612 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
2613 },
2614 &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.
2615 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
2616 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
2617 &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.
2618 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
2619 &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].
2620 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
2621 },
2622 },
2623 ],
2624 &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;.
2625 },
2626 ],
2627 },
2628 &quot;text&quot;: &quot;A String&quot;, # Text data.
2629 },
2630 &quot;subAgents&quot;: [ # Optional. The list of valid agent IDs (names) that this agent can delegate to. This defines the directed edges in the agent system graph topology.
2631 &quot;A String&quot;,
2632 ],
2633 &quot;tools&quot;: { # Represents a list of tools for an agent. # List of tools.
2634 &quot;tool&quot;: [ # Optional. List of tools: each tool can have multiple function declarations.
2635 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
2636 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
2637 },
2638 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
2639 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
2640 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
2641 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
2642 &quot;A String&quot;,
2643 ],
2644 },
2645 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
2646 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
2647 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
2648 &quot;A String&quot;,
2649 ],
2650 },
2651 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
2652 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
2653 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
2654 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2655 },
2656 },
2657 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
2658 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
2659 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
2660 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
2661 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
2662 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
2663 &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.
2664 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
2665 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2666 ],
2667 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
2668 &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.
2669 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2670 },
2671 &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.
2672 &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;]}`
2673 &quot;A String&quot;,
2674 ],
2675 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
2676 &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.
2677 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
2678 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
2679 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
2680 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
2681 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
2682 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
2683 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
2684 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
2685 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
2686 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
2687 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
2688 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
2689 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2690 },
2691 &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.
2692 &quot;A String&quot;,
2693 ],
2694 &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
2695 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
2696 &quot;A String&quot;,
2697 ],
2698 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
2699 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
2700 },
2701 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
2702 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
2703 &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.
2704 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
2705 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2706 ],
2707 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
2708 &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.
2709 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2710 },
2711 &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.
2712 &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;]}`
2713 &quot;A String&quot;,
2714 ],
2715 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
2716 &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.
2717 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
2718 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
2719 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
2720 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
2721 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
2722 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
2723 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
2724 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
2725 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
2726 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
2727 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
2728 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
2729 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2730 },
2731 &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.
2732 &quot;A String&quot;,
2733 ],
2734 &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
2735 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
2736 &quot;A String&quot;,
2737 ],
2738 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
2739 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
2740 },
2741 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
2742 },
2743 ],
2744 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
2745 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
2746 },
2747 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
2748 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
2749 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
2750 &quot;A String&quot;,
2751 ],
2752 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
2753 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
2754 },
2755 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
2756 },
2757 },
2758 },
2759 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
2760 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
2761 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
2762 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
2763 },
2764 },
2765 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
2766 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
2767 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
2768 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2769 },
2770 },
2771 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
2772 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
2773 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
2774 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
2775 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
2776 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
2777 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
2778 },
2779 },
2780 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
2781 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
2782 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
2783 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
2784 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
2785 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
2786 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
2787 },
2788 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
2789 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
2790 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
2791 },
2792 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
2793 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
2794 },
2795 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
2796 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
2797 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
2798 },
2799 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
2800 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
2801 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
2802 },
2803 },
2804 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
2805 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
2806 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
2807 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
2808 },
2809 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
2810 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
2811 },
2812 },
2813 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
2814 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
2815 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
2816 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
2817 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
2818 },
2819 ],
2820 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
2821 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
2822 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
2823 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
2824 },
2825 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
2826 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
2827 &quot;A String&quot;,
2828 ],
2829 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
2830 { # The definition of the Rag resource.
2831 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
2832 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
2833 &quot;A String&quot;,
2834 ],
2835 },
2836 ],
2837 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
2838 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
2839 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
2840 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
2841 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
2842 },
2843 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
2844 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
2845 },
2846 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
2847 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
2848 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
2849 },
2850 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
2851 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
2852 },
2853 },
2854 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
2855 },
2856 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
2857 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
2858 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
2859 },
2860 },
2861 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
2862 },
2863 },
2864 ],
2865 },
2866 &quot;toolsText&quot;: &quot;A String&quot;, # A JSON string containing a list of tools available to an agent with info such as name, description, parameters and required parameters.
2867 },
2868 &quot;agents&quot;: { # Optional. The static Agent Configuration. This map defines the graph structure of the agent system. Key: agent_id (matches the `author` field in events). Value: The static configuration of the agent (tools, instructions, sub-agents).
2869 &quot;a_key&quot;: { # Deprecated: Use `google.cloud.aiplatform.master.AgentConfig` in `agent_eval_data` instead. Configuration for an Agent.
2870 &quot;agentId&quot;: &quot;A String&quot;, # Optional. Unique identifier of the agent. This ID is used to refer to this agent, e.g., in AgentEvent.author, or in the `sub_agents` field. It must be unique within the `agents` map.
2871 &quot;agentType&quot;: &quot;A String&quot;, # Optional. The type or class of the agent (e.g., &quot;LlmAgent&quot;, &quot;RouterAgent&quot;, &quot;ToolUseAgent&quot;). Useful for the autorater to understand the expected behavior of the agent.
2872 &quot;description&quot;: &quot;A String&quot;, # Optional. A high-level description of the agent&#x27;s role and responsibilities. Critical for evaluating if the agent is routing tasks correctly.
2873 &quot;developerInstruction&quot;: { # Instance data used to populate placeholders in a metric prompt template. # Optional. Contains instructions from the developer for the agent. Can be static or a dynamic prompt template used with the `AgentEvent.state_delta` field.
2874 &quot;contents&quot;: { # List of standard Content messages from Gemini API. # List of Gemini content data.
2875 &quot;contents&quot;: [ # Optional. Repeated contents.
2876 { # 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.
2877 &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.
2878 { # 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.
2879 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
2880 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
2881 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
2882 },
2883 &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.
2884 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
2885 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
2886 },
2887 &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.
2888 &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.
2889 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
2890 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2891 },
2892 &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.
2893 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
2894 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2895 },
2896 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
2897 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
2898 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
2899 { # Partial argument value of the function call.
2900 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
2901 &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;.
2902 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
2903 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
2904 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
2905 &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.
2906 },
2907 ],
2908 &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.
2909 },
2910 &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.
2911 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
2912 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
2913 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
2914 { # 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.
2915 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
2916 &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.
2917 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
2918 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2919 },
2920 &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.
2921 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
2922 &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.
2923 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2924 },
2925 },
2926 ],
2927 &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.
2928 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2929 },
2930 &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.
2931 },
2932 &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.
2933 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
2934 &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.
2935 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
2936 },
2937 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
2938 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
2939 },
2940 &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.
2941 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
2942 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
2943 &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.
2944 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
2945 &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].
2946 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
2947 },
2948 },
2949 ],
2950 &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;.
2951 },
2952 ],
2953 },
2954 &quot;text&quot;: &quot;A String&quot;, # Text data.
2955 },
2956 &quot;subAgents&quot;: [ # Optional. The list of valid agent IDs (names) that this agent can delegate to. This defines the directed edges in the agent system graph topology.
2957 &quot;A String&quot;,
2958 ],
2959 &quot;tools&quot;: { # Represents a list of tools for an agent. # List of tools.
2960 &quot;tool&quot;: [ # Optional. List of tools: each tool can have multiple function declarations.
2961 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
2962 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
2963 },
2964 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
2965 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
2966 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
2967 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
2968 &quot;A String&quot;,
2969 ],
2970 },
2971 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
2972 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
2973 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
2974 &quot;A String&quot;,
2975 ],
2976 },
2977 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
2978 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
2979 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
2980 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
2981 },
2982 },
2983 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
2984 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
2985 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
2986 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
2987 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
2988 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
2989 &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.
2990 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
2991 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2992 ],
2993 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
2994 &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.
2995 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
2996 },
2997 &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.
2998 &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;]}`
2999 &quot;A String&quot;,
3000 ],
3001 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
3002 &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.
3003 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
3004 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
3005 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
3006 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
3007 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
3008 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
3009 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
3010 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
3011 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
3012 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
3013 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
3014 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
3015 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3016 },
3017 &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.
3018 &quot;A String&quot;,
3019 ],
3020 &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
3021 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
3022 &quot;A String&quot;,
3023 ],
3024 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
3025 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
3026 },
3027 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
3028 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
3029 &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.
3030 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
3031 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3032 ],
3033 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
3034 &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.
3035 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3036 },
3037 &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.
3038 &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;]}`
3039 &quot;A String&quot;,
3040 ],
3041 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
3042 &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.
3043 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
3044 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
3045 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
3046 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
3047 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
3048 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
3049 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
3050 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
3051 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
3052 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
3053 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
3054 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
3055 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3056 },
3057 &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.
3058 &quot;A String&quot;,
3059 ],
3060 &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
3061 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
3062 &quot;A String&quot;,
3063 ],
3064 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
3065 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
3066 },
3067 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
3068 },
3069 ],
3070 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
3071 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
3072 },
3073 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
3074 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
3075 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
3076 &quot;A String&quot;,
3077 ],
3078 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
3079 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
3080 },
3081 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
3082 },
3083 },
3084 },
3085 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
3086 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
3087 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
3088 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
3089 },
3090 },
3091 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
3092 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
3093 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
3094 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3095 },
3096 },
3097 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
3098 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
3099 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
3100 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
3101 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
3102 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
3103 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
3104 },
3105 },
3106 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
3107 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
3108 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
3109 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
3110 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
3111 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
3112 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
3113 },
3114 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
3115 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
3116 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
3117 },
3118 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
3119 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
3120 },
3121 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
3122 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
3123 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
3124 },
3125 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
3126 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
3127 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
3128 },
3129 },
3130 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
3131 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
3132 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
3133 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
3134 },
3135 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
3136 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
3137 },
3138 },
3139 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
3140 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
3141 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
3142 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
3143 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
3144 },
3145 ],
3146 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
3147 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
3148 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
3149 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
3150 },
3151 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
3152 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
3153 &quot;A String&quot;,
3154 ],
3155 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
3156 { # The definition of the Rag resource.
3157 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
3158 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
3159 &quot;A String&quot;,
3160 ],
3161 },
3162 ],
3163 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
3164 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
3165 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
3166 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
3167 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
3168 },
3169 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
3170 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
3171 },
3172 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
3173 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
3174 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
3175 },
3176 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
3177 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
3178 },
3179 },
3180 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
3181 },
3182 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
3183 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
3184 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
3185 },
3186 },
3187 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
3188 },
3189 },
3190 ],
3191 },
3192 &quot;toolsText&quot;: &quot;A String&quot;, # A JSON string containing a list of tools available to an agent with info such as name, description, parameters and required parameters.
3193 },
3194 },
3195 &quot;developerInstruction&quot;: { # Instance data used to populate placeholders in a metric prompt template. # Optional. Deprecated: Use `agents.developer_instruction` or `turns.events.active_instruction` instead. A field containing instructions from the developer for the agent.
3196 &quot;contents&quot;: { # List of standard Content messages from Gemini API. # List of Gemini content data.
3197 &quot;contents&quot;: [ # Optional. Repeated contents.
3198 { # 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.
3199 &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.
3200 { # 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.
3201 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
3202 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
3203 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
3204 },
3205 &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.
3206 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
3207 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
3208 },
3209 &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.
3210 &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.
3211 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
3212 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3213 },
3214 &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.
3215 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
3216 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3217 },
3218 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
3219 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
3220 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
3221 { # Partial argument value of the function call.
3222 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
3223 &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;.
3224 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
3225 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
3226 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
3227 &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.
3228 },
3229 ],
3230 &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.
3231 },
3232 &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.
3233 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
3234 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
3235 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
3236 { # 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.
3237 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
3238 &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.
3239 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
3240 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3241 },
3242 &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.
3243 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
3244 &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.
3245 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3246 },
3247 },
3248 ],
3249 &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.
3250 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3251 },
3252 &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.
3253 },
3254 &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.
3255 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
3256 &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.
3257 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3258 },
3259 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
3260 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
3261 },
3262 &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.
3263 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
3264 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
3265 &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.
3266 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
3267 &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].
3268 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
3269 },
3270 },
3271 ],
3272 &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;.
3273 },
3274 ],
3275 },
3276 &quot;text&quot;: &quot;A String&quot;, # Text data.
3277 },
3278 &quot;events&quot;: { # Represents a list of events for an agent. # A list of events.
3279 &quot;event&quot;: [ # Optional. A list of events.
3280 { # 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.
3281 &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.
3282 { # 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.
3283 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
3284 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
3285 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
3286 },
3287 &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.
3288 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
3289 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
3290 },
3291 &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.
3292 &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.
3293 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
3294 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3295 },
3296 &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.
3297 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
3298 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3299 },
3300 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
3301 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
3302 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
3303 { # Partial argument value of the function call.
3304 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
3305 &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;.
3306 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
3307 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
3308 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
3309 &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.
3310 },
3311 ],
3312 &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.
3313 },
3314 &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.
3315 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
3316 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
3317 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
3318 { # 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.
3319 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
3320 &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.
3321 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
3322 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3323 },
3324 &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.
3325 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
3326 &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.
3327 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3328 },
3329 },
3330 ],
3331 &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.
3332 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3333 },
3334 &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.
3335 },
3336 &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.
3337 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
3338 &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.
3339 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3340 },
3341 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
3342 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
3343 },
3344 &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.
3345 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
3346 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
3347 &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.
3348 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
3349 &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].
3350 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
3351 },
3352 },
3353 ],
3354 &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;.
3355 },
3356 ],
3357 },
3358 &quot;tools&quot;: { # Deprecated: Use `agent_eval_data` instead. Represents a list of tools for an agent. # List of tools.
3359 &quot;tool&quot;: [ # Optional. List of tools: each tool can have multiple function declarations.
3360 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
3361 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
3362 },
3363 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
3364 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
3365 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
3366 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
3367 &quot;A String&quot;,
3368 ],
3369 },
3370 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
3371 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
3372 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
3373 &quot;A String&quot;,
3374 ],
3375 },
3376 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
3377 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
3378 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
3379 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3380 },
3381 },
3382 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
3383 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
3384 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
3385 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
3386 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
3387 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
3388 &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.
3389 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
3390 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3391 ],
3392 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
3393 &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.
3394 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3395 },
3396 &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.
3397 &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;]}`
3398 &quot;A String&quot;,
3399 ],
3400 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
3401 &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.
3402 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
3403 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
3404 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
3405 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
3406 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
3407 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
3408 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
3409 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
3410 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
3411 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
3412 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
3413 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
3414 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3415 },
3416 &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.
3417 &quot;A String&quot;,
3418 ],
3419 &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
3420 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
3421 &quot;A String&quot;,
3422 ],
3423 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
3424 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
3425 },
3426 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
3427 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
3428 &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.
3429 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
3430 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3431 ],
3432 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
3433 &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.
3434 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3435 },
3436 &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.
3437 &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;]}`
3438 &quot;A String&quot;,
3439 ],
3440 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
3441 &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.
3442 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
3443 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
3444 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
3445 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
3446 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
3447 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
3448 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
3449 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
3450 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
3451 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
3452 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
3453 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
3454 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3455 },
3456 &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.
3457 &quot;A String&quot;,
3458 ],
3459 &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
3460 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
3461 &quot;A String&quot;,
3462 ],
3463 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
3464 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
3465 },
3466 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
3467 },
3468 ],
3469 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
3470 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
3471 },
3472 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
3473 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
3474 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
3475 &quot;A String&quot;,
3476 ],
3477 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
3478 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
3479 },
3480 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
3481 },
3482 },
3483 },
3484 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
3485 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
3486 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
3487 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
3488 },
3489 },
3490 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
3491 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
3492 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
3493 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3494 },
3495 },
3496 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
3497 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
3498 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
3499 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
3500 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
3501 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
3502 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
3503 },
3504 },
3505 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
3506 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
3507 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
3508 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
3509 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
3510 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
3511 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
3512 },
3513 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
3514 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
3515 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
3516 },
3517 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
3518 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
3519 },
3520 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
3521 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
3522 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
3523 },
3524 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
3525 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
3526 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
3527 },
3528 },
3529 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
3530 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
3531 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
3532 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
3533 },
3534 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
3535 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
3536 },
3537 },
3538 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
3539 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
3540 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
3541 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
3542 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
3543 },
3544 ],
3545 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
3546 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
3547 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
3548 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
3549 },
3550 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
3551 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
3552 &quot;A String&quot;,
3553 ],
3554 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
3555 { # The definition of the Rag resource.
3556 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
3557 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
3558 &quot;A String&quot;,
3559 ],
3560 },
3561 ],
3562 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
3563 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
3564 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
3565 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
3566 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
3567 },
3568 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
3569 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
3570 },
3571 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
3572 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
3573 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
3574 },
3575 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
3576 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
3577 },
3578 },
3579 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
3580 },
3581 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
3582 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
3583 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
3584 },
3585 },
3586 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
3587 },
3588 },
3589 ],
3590 },
3591 &quot;toolsText&quot;: &quot;A String&quot;, # A JSON string containing a list of tools available to an agent with info such as name, description, parameters and required parameters.
3592 &quot;turns&quot;: [ # Optional. The chronological list of conversation turns. Each turn represents a logical execution cycle (e.g., User Input -&gt; Agent Response).
3593 { # Represents a single turn/invocation in the conversation.
3594 &quot;events&quot;: [ # Optional. The list of events that occurred during this turn.
3595 { # A single event in the execution trace.
3596 &quot;activeTools&quot;: [ # Optional. The list of tools that were active/available to the agent at the time of this event. This overrides the `AgentConfig.tools` if set.
3597 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
3598 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
3599 },
3600 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
3601 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
3602 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
3603 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
3604 &quot;A String&quot;,
3605 ],
3606 },
3607 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
3608 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
3609 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
3610 &quot;A String&quot;,
3611 ],
3612 },
3613 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
3614 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
3615 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
3616 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3617 },
3618 },
3619 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
3620 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
3621 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
3622 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
3623 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
3624 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
3625 &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.
3626 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
3627 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3628 ],
3629 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
3630 &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.
3631 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3632 },
3633 &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.
3634 &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;]}`
3635 &quot;A String&quot;,
3636 ],
3637 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
3638 &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.
3639 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
3640 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
3641 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
3642 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
3643 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
3644 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
3645 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
3646 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
3647 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
3648 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
3649 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
3650 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
3651 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3652 },
3653 &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.
3654 &quot;A String&quot;,
3655 ],
3656 &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
3657 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
3658 &quot;A String&quot;,
3659 ],
3660 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
3661 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
3662 },
3663 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
3664 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
3665 &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.
3666 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
3667 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3668 ],
3669 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
3670 &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.
3671 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3672 },
3673 &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.
3674 &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;]}`
3675 &quot;A String&quot;,
3676 ],
3677 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
3678 &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.
3679 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
3680 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
3681 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
3682 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
3683 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
3684 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
3685 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
3686 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
3687 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
3688 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
3689 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
3690 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
3691 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3692 },
3693 &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.
3694 &quot;A String&quot;,
3695 ],
3696 &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
3697 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
3698 &quot;A String&quot;,
3699 ],
3700 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
3701 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
3702 },
3703 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
3704 },
3705 ],
3706 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
3707 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
3708 },
3709 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
3710 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
3711 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
3712 &quot;A String&quot;,
3713 ],
3714 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
3715 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
3716 },
3717 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
3718 },
3719 },
3720 },
3721 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
3722 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
3723 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
3724 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
3725 },
3726 },
3727 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
3728 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
3729 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
3730 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3731 },
3732 },
3733 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
3734 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
3735 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
3736 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
3737 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
3738 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
3739 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
3740 },
3741 },
3742 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
3743 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
3744 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
3745 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
3746 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
3747 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
3748 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
3749 },
3750 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
3751 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
3752 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
3753 },
3754 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
3755 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
3756 },
3757 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
3758 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
3759 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
3760 },
3761 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
3762 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
3763 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
3764 },
3765 },
3766 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
3767 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
3768 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
3769 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
3770 },
3771 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
3772 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
3773 },
3774 },
3775 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
3776 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
3777 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
3778 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
3779 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
3780 },
3781 ],
3782 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
3783 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
3784 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
3785 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
3786 },
3787 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
3788 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
3789 &quot;A String&quot;,
3790 ],
3791 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
3792 { # The definition of the Rag resource.
3793 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
3794 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
3795 &quot;A String&quot;,
3796 ],
3797 },
3798 ],
3799 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
3800 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
3801 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
3802 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
3803 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
3804 },
3805 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
3806 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
3807 },
3808 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
3809 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
3810 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
3811 },
3812 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
3813 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
3814 },
3815 },
3816 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
3817 },
3818 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
3819 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
3820 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
3821 },
3822 },
3823 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
3824 },
3825 },
3826 ],
3827 &quot;author&quot;: &quot;A String&quot;, # Required. The ID of the agent or entity that generated this event.
3828 &quot;content&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. # Required. The content of the event (e.g., text response, tool call, tool response).
3829 &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.
3830 { # 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.
3831 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
3832 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
3833 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
3834 },
3835 &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.
3836 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
3837 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
3838 },
3839 &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.
3840 &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.
3841 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
3842 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3843 },
3844 &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.
3845 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
3846 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3847 },
3848 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
3849 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
3850 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
3851 { # Partial argument value of the function call.
3852 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
3853 &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;.
3854 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
3855 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
3856 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
3857 &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.
3858 },
3859 ],
3860 &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.
3861 },
3862 &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.
3863 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
3864 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
3865 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
3866 { # 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.
3867 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
3868 &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.
3869 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
3870 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3871 },
3872 &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.
3873 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
3874 &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.
3875 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3876 },
3877 },
3878 ],
3879 &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.
3880 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3881 },
3882 &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.
3883 },
3884 &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.
3885 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
3886 &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.
3887 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
3888 },
3889 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
3890 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
3891 },
3892 &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.
3893 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
3894 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
3895 &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.
3896 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
3897 &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].
3898 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
3899 },
3900 },
3901 ],
3902 &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;.
3903 },
3904 &quot;eventTime&quot;: &quot;A String&quot;, # Optional. The timestamp when the event occurred.
3905 &quot;stateDelta&quot;: { # Optional. The change in the session state caused by this event. This is a key-value map of fields that were modified or added by the event.
3906 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3907 },
3908 },
3909 ],
3910 &quot;turnId&quot;: &quot;A String&quot;, # Optional. A unique identifier for the turn. Useful for referencing specific turns across systems.
3911 &quot;turnIndex&quot;: 42, # Required. The 0-based index of the turn in the conversation sequence.
3912 },
3913 ],
3914 },
3915 &quot;agentEvalData&quot;: { # Represents data specific to multi-turn agent evaluations. # Optional. Data used for agent evaluation.
3916 &quot;agents&quot;: { # Optional. A map containing the static configurations for each agent in the system. Key: agent_id (matches the `author` field in events). Value: The static configuration of the agent.
3917 &quot;a_key&quot;: { # Represents configuration for an Agent.
3918 &quot;agentId&quot;: &quot;A String&quot;, # Required. Unique identifier of the agent. This ID is used to refer to this agent, e.g., in AgentEvent.author, or in the `sub_agents` field. It must be unique within the `agents` map.
3919 &quot;agentType&quot;: &quot;A String&quot;, # Optional. The type or class of the agent (e.g., &quot;LlmAgent&quot;, &quot;RouterAgent&quot;, &quot;ToolUseAgent&quot;). Useful for the autorater to understand the expected behavior of the agent.
3920 &quot;description&quot;: &quot;A String&quot;, # Optional. A high-level description of the agent&#x27;s role and responsibilities. Critical for evaluating if the agent is routing tasks correctly.
3921 &quot;instruction&quot;: &quot;A String&quot;, # Optional. Provides instructions for the LLM model, guiding the agent&#x27;s behavior. Can be static or dynamic. Dynamic instructions can contain placeholders like {variable_name} that will be resolved at runtime using the `AgentEvent.state_delta` field.
3922 &quot;subAgents&quot;: [ # Optional. The list of valid agent IDs that this agent can delegate to. This defines the directed edges in the multi-agent system graph topology.
3923 &quot;A String&quot;,
3924 ],
3925 &quot;tools&quot;: [ # Optional. The list of tools available to this agent.
3926 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
3927 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
3928 },
3929 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
3930 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
3931 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
3932 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
3933 &quot;A String&quot;,
3934 ],
3935 },
3936 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
3937 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
3938 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
3939 &quot;A String&quot;,
3940 ],
3941 },
3942 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
3943 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
3944 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
3945 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
3946 },
3947 },
3948 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
3949 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
3950 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
3951 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
3952 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
3953 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
3954 &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.
3955 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
3956 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3957 ],
3958 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
3959 &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.
3960 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3961 },
3962 &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.
3963 &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;]}`
3964 &quot;A String&quot;,
3965 ],
3966 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
3967 &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.
3968 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
3969 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
3970 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
3971 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
3972 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
3973 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
3974 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
3975 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
3976 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
3977 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
3978 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
3979 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
3980 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3981 },
3982 &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.
3983 &quot;A String&quot;,
3984 ],
3985 &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
3986 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
3987 &quot;A String&quot;,
3988 ],
3989 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
3990 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
3991 },
3992 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
3993 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
3994 &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.
3995 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
3996 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
3997 ],
3998 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
3999 &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.
4000 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
4001 },
4002 &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.
4003 &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;]}`
4004 &quot;A String&quot;,
4005 ],
4006 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
4007 &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.
4008 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
4009 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
4010 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
4011 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
4012 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
4013 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
4014 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
4015 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
4016 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
4017 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
4018 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
4019 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
4020 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
4021 },
4022 &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.
4023 &quot;A String&quot;,
4024 ],
4025 &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
4026 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
4027 &quot;A String&quot;,
4028 ],
4029 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
4030 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
4031 },
4032 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
4033 },
4034 ],
4035 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
4036 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
4037 },
4038 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
4039 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
4040 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
4041 &quot;A String&quot;,
4042 ],
4043 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
4044 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
4045 },
4046 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
4047 },
4048 },
4049 },
4050 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
4051 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
4052 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
4053 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
4054 },
4055 },
4056 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
4057 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
4058 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
4059 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4060 },
4061 },
4062 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
4063 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
4064 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
4065 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
4066 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
4067 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
4068 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
4069 },
4070 },
4071 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
4072 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
4073 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
4074 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
4075 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
4076 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
4077 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
4078 },
4079 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
4080 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
4081 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
4082 },
4083 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
4084 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
4085 },
4086 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
4087 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
4088 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
4089 },
4090 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
4091 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
4092 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
4093 },
4094 },
4095 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
4096 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
4097 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
4098 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
4099 },
4100 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
4101 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
4102 },
4103 },
4104 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
4105 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
4106 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
4107 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
4108 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
4109 },
4110 ],
4111 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
4112 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
4113 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
4114 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
4115 },
4116 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
4117 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
4118 &quot;A String&quot;,
4119 ],
4120 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
4121 { # The definition of the Rag resource.
4122 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
4123 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
4124 &quot;A String&quot;,
4125 ],
4126 },
4127 ],
4128 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
4129 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
4130 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
4131 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
4132 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
4133 },
4134 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
4135 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
4136 },
4137 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
4138 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
4139 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
4140 },
4141 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
4142 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
4143 },
4144 },
4145 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
4146 },
4147 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
4148 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
4149 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
4150 },
4151 },
4152 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
4153 },
4154 },
4155 ],
4156 },
4157 },
4158 &quot;turns&quot;: [ # Optional. A chronological list of conversation turns. Each turn represents a logical execution cycle (e.g., User Input -&gt; Agent Response).
4159 { # Represents a single turn/invocation in the conversation.
4160 &quot;events&quot;: [ # Optional. The list of events that occurred during this turn.
4161 { # Represents a single event in the execution trace.
4162 &quot;activeTools&quot;: [ # Optional. The list of tools that were active/available to the agent at the time of this event. This overrides the `AgentConfig.tools` if set.
4163 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
4164 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
4165 },
4166 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
4167 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
4168 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
4169 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
4170 &quot;A String&quot;,
4171 ],
4172 },
4173 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
4174 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
4175 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
4176 &quot;A String&quot;,
4177 ],
4178 },
4179 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
4180 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
4181 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
4182 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4183 },
4184 },
4185 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
4186 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
4187 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
4188 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
4189 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
4190 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
4191 &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.
4192 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
4193 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
4194 ],
4195 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
4196 &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.
4197 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
4198 },
4199 &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.
4200 &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;]}`
4201 &quot;A String&quot;,
4202 ],
4203 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
4204 &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.
4205 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
4206 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
4207 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
4208 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
4209 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
4210 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
4211 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
4212 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
4213 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
4214 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
4215 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
4216 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
4217 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
4218 },
4219 &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.
4220 &quot;A String&quot;,
4221 ],
4222 &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
4223 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
4224 &quot;A String&quot;,
4225 ],
4226 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
4227 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
4228 },
4229 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
4230 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
4231 &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.
4232 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
4233 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
4234 ],
4235 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
4236 &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.
4237 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
4238 },
4239 &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.
4240 &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;]}`
4241 &quot;A String&quot;,
4242 ],
4243 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
4244 &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.
4245 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
4246 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
4247 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
4248 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
4249 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
4250 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
4251 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
4252 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
4253 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
4254 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
4255 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
4256 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
4257 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
4258 },
4259 &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.
4260 &quot;A String&quot;,
4261 ],
4262 &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
4263 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
4264 &quot;A String&quot;,
4265 ],
4266 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
4267 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
4268 },
4269 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
4270 },
4271 ],
4272 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
4273 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
4274 },
4275 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
4276 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
4277 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
4278 &quot;A String&quot;,
4279 ],
4280 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
4281 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
4282 },
4283 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
4284 },
4285 },
4286 },
4287 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
4288 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
4289 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
4290 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
4291 },
4292 },
4293 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
4294 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
4295 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
4296 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4297 },
4298 },
4299 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
4300 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
4301 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
4302 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
4303 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
4304 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
4305 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
4306 },
4307 },
4308 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
4309 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
4310 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
4311 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
4312 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
4313 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
4314 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
4315 },
4316 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
4317 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
4318 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
4319 },
4320 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
4321 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
4322 },
4323 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
4324 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
4325 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
4326 },
4327 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
4328 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
4329 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
4330 },
4331 },
4332 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
4333 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
4334 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
4335 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
4336 },
4337 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
4338 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
4339 },
4340 },
4341 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
4342 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
4343 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
4344 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
4345 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
4346 },
4347 ],
4348 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
4349 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
4350 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
4351 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
4352 },
4353 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
4354 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
4355 &quot;A String&quot;,
4356 ],
4357 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
4358 { # The definition of the Rag resource.
4359 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
4360 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
4361 &quot;A String&quot;,
4362 ],
4363 },
4364 ],
4365 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
4366 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
4367 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
4368 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
4369 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
4370 },
4371 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
4372 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
4373 },
4374 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
4375 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
4376 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
4377 },
4378 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
4379 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
4380 },
4381 },
4382 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
4383 },
4384 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
4385 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
4386 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
4387 },
4388 },
4389 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
4390 },
4391 },
4392 ],
4393 &quot;author&quot;: &quot;A String&quot;, # Required. The ID of the agent or entity that generated this event. Use &quot;user&quot; to denote events generated by the end-user.
4394 &quot;content&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. # Required. The content of the event (e.g., text response, tool call, tool response).
4395 &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.
4396 { # 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.
4397 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
4398 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
4399 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
4400 },
4401 &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.
4402 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
4403 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
4404 },
4405 &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.
4406 &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.
4407 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
4408 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4409 },
4410 &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.
4411 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
4412 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4413 },
4414 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
4415 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
4416 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
4417 { # Partial argument value of the function call.
4418 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
4419 &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;.
4420 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
4421 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
4422 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
4423 &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.
4424 },
4425 ],
4426 &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.
4427 },
4428 &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.
4429 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
4430 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
4431 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
4432 { # 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.
4433 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
4434 &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.
4435 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
4436 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4437 },
4438 &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.
4439 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
4440 &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.
4441 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4442 },
4443 },
4444 ],
4445 &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.
4446 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4447 },
4448 &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.
4449 },
4450 &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.
4451 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
4452 &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.
4453 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4454 },
4455 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
4456 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
4457 },
4458 &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.
4459 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
4460 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
4461 &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.
4462 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
4463 &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].
4464 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
4465 },
4466 },
4467 ],
4468 &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;.
4469 },
4470 &quot;eventTime&quot;: &quot;A String&quot;, # Optional. The timestamp when the event occurred.
4471 &quot;stateDelta&quot;: { # Optional. The change in the session state caused by this event. This is a key-value map of fields that were modified or added by the event.
4472 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4473 },
4474 },
4475 ],
4476 &quot;turnId&quot;: &quot;A String&quot;, # Optional. A unique identifier for the turn. Useful for referencing specific turns across systems.
4477 &quot;turnIndex&quot;: 42, # Required. The 0-based index of the turn in the conversation sequence.
4478 },
4479 ],
4480 },
4481 &quot;otherData&quot;: { # Instance data specified as a map. # Optional. Other data used to populate placeholders based on their key. If a key conflicts with a field in the EvaluationInstance (e.g. `prompt`), the value of the field will take precedence over the value in other_data.
4482 &quot;mapInstance&quot;: { # Optional. Map of instance data.
4483 &quot;a_key&quot;: { # Instance data used to populate placeholders in a metric prompt template.
4484 &quot;contents&quot;: { # List of standard Content messages from Gemini API. # List of Gemini content data.
4485 &quot;contents&quot;: [ # Optional. Repeated contents.
4486 { # 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.
4487 &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.
4488 { # 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.
4489 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
4490 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
4491 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
4492 },
4493 &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.
4494 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
4495 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
4496 },
4497 &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.
4498 &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.
4499 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
4500 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4501 },
4502 &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.
4503 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
4504 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4505 },
4506 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
4507 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
4508 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
4509 { # Partial argument value of the function call.
4510 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
4511 &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;.
4512 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
4513 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
4514 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
4515 &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.
4516 },
4517 ],
4518 &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.
4519 },
4520 &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.
4521 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
4522 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
4523 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
4524 { # 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.
4525 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
4526 &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.
4527 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
4528 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4529 },
4530 &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.
4531 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
4532 &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.
4533 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4534 },
4535 },
4536 ],
4537 &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.
4538 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4539 },
4540 &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.
4541 },
4542 &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.
4543 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
4544 &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.
4545 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4546 },
4547 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
4548 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
4549 },
4550 &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.
4551 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
4552 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
4553 &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.
4554 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
4555 &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].
4556 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
4557 },
4558 },
4559 ],
4560 &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;.
4561 },
4562 ],
4563 },
4564 &quot;text&quot;: &quot;A String&quot;, # Text data.
4565 },
4566 },
4567 },
4568 &quot;prompt&quot;: { # Instance data used to populate placeholders in a metric prompt template. # Optional. Data used to populate placeholder `prompt` in a metric prompt template.
4569 &quot;contents&quot;: { # List of standard Content messages from Gemini API. # List of Gemini content data.
4570 &quot;contents&quot;: [ # Optional. Repeated contents.
4571 { # 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.
4572 &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.
4573 { # 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.
4574 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
4575 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
4576 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
4577 },
4578 &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.
4579 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
4580 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
4581 },
4582 &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.
4583 &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.
4584 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
4585 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4586 },
4587 &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.
4588 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
4589 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4590 },
4591 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
4592 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
4593 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
4594 { # Partial argument value of the function call.
4595 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
4596 &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;.
4597 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
4598 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
4599 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
4600 &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.
4601 },
4602 ],
4603 &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.
4604 },
4605 &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.
4606 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
4607 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
4608 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
4609 { # 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.
4610 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
4611 &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.
4612 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
4613 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4614 },
4615 &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.
4616 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
4617 &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.
4618 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4619 },
4620 },
4621 ],
4622 &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.
4623 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4624 },
4625 &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.
4626 },
4627 &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.
4628 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
4629 &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.
4630 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4631 },
4632 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
4633 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
4634 },
4635 &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.
4636 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
4637 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
4638 &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.
4639 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
4640 &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].
4641 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
4642 },
4643 },
4644 ],
4645 &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;.
4646 },
4647 ],
4648 },
4649 &quot;text&quot;: &quot;A String&quot;, # Text data.
4650 },
4651 &quot;reference&quot;: { # Instance data used to populate placeholders in a metric prompt template. # Optional. Data used to populate placeholder `reference` in a metric prompt template.
4652 &quot;contents&quot;: { # List of standard Content messages from Gemini API. # List of Gemini content data.
4653 &quot;contents&quot;: [ # Optional. Repeated contents.
4654 { # 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.
4655 &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.
4656 { # 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.
4657 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
4658 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
4659 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
4660 },
4661 &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.
4662 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
4663 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
4664 },
4665 &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.
4666 &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.
4667 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
4668 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4669 },
4670 &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.
4671 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
4672 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4673 },
4674 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
4675 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
4676 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
4677 { # Partial argument value of the function call.
4678 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
4679 &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;.
4680 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
4681 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
4682 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
4683 &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.
4684 },
4685 ],
4686 &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.
4687 },
4688 &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.
4689 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
4690 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
4691 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
4692 { # 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.
4693 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
4694 &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.
4695 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
4696 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4697 },
4698 &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.
4699 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
4700 &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.
4701 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4702 },
4703 },
4704 ],
4705 &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.
4706 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4707 },
4708 &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.
4709 },
4710 &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.
4711 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
4712 &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.
4713 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4714 },
4715 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
4716 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
4717 },
4718 &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.
4719 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
4720 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
4721 &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.
4722 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
4723 &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].
4724 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
4725 },
4726 },
4727 ],
4728 &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;.
4729 },
4730 ],
4731 },
4732 &quot;text&quot;: &quot;A String&quot;, # Text data.
4733 },
4734 &quot;response&quot;: { # Instance data used to populate placeholders in a metric prompt template. # Optional. Data used to populate placeholder `response` in a metric prompt template.
4735 &quot;contents&quot;: { # List of standard Content messages from Gemini API. # List of Gemini content data.
4736 &quot;contents&quot;: [ # Optional. Repeated contents.
4737 { # 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.
4738 &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.
4739 { # 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.
4740 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
4741 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
4742 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
4743 },
4744 &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.
4745 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
4746 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
4747 },
4748 &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.
4749 &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.
4750 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
4751 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4752 },
4753 &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.
4754 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
4755 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4756 },
4757 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
4758 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
4759 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
4760 { # Partial argument value of the function call.
4761 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
4762 &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;.
4763 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
4764 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
4765 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
4766 &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.
4767 },
4768 ],
4769 &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.
4770 },
4771 &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.
4772 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
4773 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
4774 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
4775 { # 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.
4776 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
4777 &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.
4778 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
4779 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4780 },
4781 &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.
4782 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
4783 &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.
4784 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4785 },
4786 },
4787 ],
4788 &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.
4789 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4790 },
4791 &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.
4792 },
4793 &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.
4794 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
4795 &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.
4796 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
4797 },
4798 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
4799 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
4800 },
4801 &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.
4802 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
4803 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
4804 &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.
4805 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
4806 &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].
4807 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
4808 },
4809 },
4810 ],
4811 &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;.
4812 },
4813 ],
4814 },
4815 &quot;text&quot;: &quot;A String&quot;, # Text data.
4816 },
4817 &quot;rubricGroups&quot;: { # Optional. Named groups of rubrics associated with the prompt. This is used for rubric-based evaluations where rubrics can be referenced by a key. The key could represent versions, associated metrics, etc.
4818 &quot;a_key&quot;: { # A group of rubrics, used for grouping rubrics based on a metric or a version.
4819 &quot;displayName&quot;: &quot;A String&quot;, # Human-readable name for the group. This should be unique within a given context if used for display or selection. Example: &quot;Instruction Following V1&quot;, &quot;Content Quality - Summarization Task&quot;.
4820 &quot;groupId&quot;: &quot;A String&quot;, # Unique identifier for the group.
4821 &quot;rubrics&quot;: [ # Rubrics that are part of this group.
4822 { # Message representing a single testable criterion for evaluation. One input prompt could have multiple rubrics.
4823 &quot;content&quot;: { # Content of the rubric, defining the testable criteria. # Required. The actual testable criteria for the rubric.
4824 &quot;property&quot;: { # Defines criteria based on a specific property. # Evaluation criteria based on a specific property.
4825 &quot;description&quot;: &quot;A String&quot;, # Description of the property being evaluated. Example: &quot;The model&#x27;s response is grammatically correct.&quot;
4826 },
4827 },
4828 &quot;importance&quot;: &quot;A String&quot;, # Optional. The relative importance of this rubric.
4829 &quot;rubricId&quot;: &quot;A String&quot;, # Unique identifier for the rubric. This ID is used to refer to this rubric, e.g., in RubricVerdict.
4830 &quot;type&quot;: &quot;A String&quot;, # Optional. A type designator for the rubric, which can inform how it&#x27;s evaluated or interpreted by systems or users. It&#x27;s recommended to use consistent, well-defined, upper snake_case strings. Examples: &quot;SUMMARIZATION_QUALITY&quot;, &quot;SAFETY_HARMFUL_CONTENT&quot;, &quot;INSTRUCTION_ADHERENCE&quot;.
4831 },
4832 ],
4833 },
4834 },
4835 },
4836 &quot;location&quot;: &quot;A String&quot;, # Required. The resource name of the Location to evaluate the instances. Format: `projects/{project}/locations/{location}`
4837 &quot;metricSources&quot;: [ # Optional. The metrics (either inline or registered) used for evaluation. Currently, we only support evaluating a single metric. If multiple metrics are provided, only the first one will be evaluated.
4838 { # The metric source used for evaluation.
4839 &quot;metric&quot;: { # The metric used for running evaluations. # Inline metric config.
4840 &quot;aggregationMetrics&quot;: [ # Optional. The aggregation metrics to use.
4841 &quot;A String&quot;,
4842 ],
4843 &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.
4844 &quot;useEffectiveOrder&quot;: True or False, # Optional. Whether to use_effective_order to compute bleu score.
4845 },
4846 &quot;computationBasedMetricSpec&quot;: { # Specification for a computation based metric. # Spec for a computation based metric.
4847 &quot;parameters&quot;: { # Optional. A map of parameters for the metric, e.g. {&quot;rouge_type&quot;: &quot;rougeL&quot;}.
4848 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4849 },
4850 &quot;type&quot;: &quot;A String&quot;, # Required. The type of the computation based metric.
4851 },
4852 &quot;customCodeExecutionSpec&quot;: { # Specificies a metric that is populated by evaluating user-defined Python code. # Spec for Custom Code Execution metric.
4853 &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.
4854 },
4855 &quot;exactMatchSpec&quot;: { # Spec for exact match metric - returns 1 if prediction and reference exactly matches, otherwise 0. # Spec for exact match metric.
4856 },
4857 &quot;llmBasedMetricSpec&quot;: { # Specification for an LLM based metric. # Spec for an LLM based metric.
4858 &quot;additionalConfig&quot;: { # Optional. Optional additional configuration for the metric.
4859 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
4860 },
4861 &quot;judgeAutoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Optional configuration for the judge LLM (Autorater).
4862 &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}`
4863 &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.
4864 &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.
4865 &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.
4866 &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.
4867 &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.
4868 &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].
4869 &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.
4870 &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;
4871 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
4872 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
4873 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
4874 },
4875 &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`.
4876 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
4877 &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.
4878 },
4879 &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.
4880 &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.
4881 &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.
4882 &quot;modelConfig&quot;: { # Config for model selection. # Optional. Config for model selection.
4883 &quot;featureSelectionPreference&quot;: &quot;A String&quot;, # Required. Feature selection preference.
4884 },
4885 &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].
4886 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
4887 { # Configuration for the model to configure output formatting and delivery.
4888 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
4889 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
4890 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
4891 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
4892 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
4893 },
4894 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
4895 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
4896 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
4897 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
4898 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
4899 },
4900 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
4901 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
4902 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
4903 },
4904 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
4905 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
4906 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
4907 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
4908 &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.
4909 },
4910 },
4911 ],
4912 &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.
4913 &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.
4914 &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.
4915 &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.
4916 &quot;A String&quot;,
4917 ],
4918 &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.
4919 &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.
4920 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
4921 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
4922 ],
4923 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
4924 &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.
4925 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
4926 },
4927 &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.
4928 &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;]}`
4929 &quot;A String&quot;,
4930 ],
4931 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
4932 &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.
4933 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
4934 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
4935 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
4936 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
4937 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
4938 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
4939 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
4940 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
4941 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
4942 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
4943 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
4944 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
4945 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
4946 },
4947 &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.
4948 &quot;A String&quot;,
4949 ],
4950 &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
4951 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
4952 &quot;A String&quot;,
4953 ],
4954 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
4955 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
4956 },
4957 &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.
4958 &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.
4959 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
4960 },
4961 &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.
4962 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
4963 },
4964 },
4965 &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.
4966 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
4967 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
4968 &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`.
4969 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
4970 { # Configuration for a single speaker in a multi-speaker setup.
4971 &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.
4972 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
4973 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
4974 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
4975 },
4976 &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.
4977 &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.
4978 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
4979 },
4980 },
4981 },
4982 ],
4983 },
4984 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
4985 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
4986 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
4987 },
4988 &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.
4989 &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.
4990 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
4991 },
4992 },
4993 },
4994 &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.
4995 &quot;A String&quot;,
4996 ],
4997 &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].
4998 &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.
4999 &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.
5000 &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.
5001 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
5002 },
5003 &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.
5004 &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.
5005 },
5006 &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.
5007 },
5008 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Template for the prompt sent to the judge model.
5009 &quot;predefinedRubricGenerationSpec&quot;: { # The spec for a pre-defined metric. # Dynamically generate rubrics using a predefined spec.
5010 &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;.
5011 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
5012 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5013 },
5014 },
5015 &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.
5016 &quot;customCodeParserConfig&quot;: { # Configuration for parsing the LLM response using custom code. # Optional. Use custom code to parse the LLM response.
5017 &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
5018 },
5019 },
5020 &quot;rubricGenerationSpec&quot;: { # Specification for how rubrics should be generated. # Dynamically generate rubrics using this specification.
5021 &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.
5022 &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}`
5023 &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.
5024 &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.
5025 &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.
5026 &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.
5027 &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.
5028 &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].
5029 &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.
5030 &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;
5031 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
5032 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
5033 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
5034 },
5035 &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`.
5036 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
5037 &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.
5038 },
5039 &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.
5040 &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.
5041 &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.
5042 &quot;modelConfig&quot;: { # Config for model selection. # Optional. Config for model selection.
5043 &quot;featureSelectionPreference&quot;: &quot;A String&quot;, # Required. Feature selection preference.
5044 },
5045 &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].
5046 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
5047 { # Configuration for the model to configure output formatting and delivery.
5048 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
5049 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
5050 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5051 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
5052 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
5053 },
5054 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
5055 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
5056 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5057 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
5058 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
5059 },
5060 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
5061 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
5062 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
5063 },
5064 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
5065 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
5066 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5067 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
5068 &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.
5069 },
5070 },
5071 ],
5072 &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.
5073 &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.
5074 &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.
5075 &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.
5076 &quot;A String&quot;,
5077 ],
5078 &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.
5079 &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.
5080 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
5081 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
5082 ],
5083 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
5084 &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.
5085 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
5086 },
5087 &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.
5088 &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;]}`
5089 &quot;A String&quot;,
5090 ],
5091 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
5092 &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.
5093 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
5094 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
5095 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
5096 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
5097 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
5098 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
5099 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
5100 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
5101 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
5102 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
5103 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
5104 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
5105 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
5106 },
5107 &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.
5108 &quot;A String&quot;,
5109 ],
5110 &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
5111 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
5112 &quot;A String&quot;,
5113 ],
5114 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
5115 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
5116 },
5117 &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.
5118 &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.
5119 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
5120 },
5121 &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.
5122 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
5123 },
5124 },
5125 &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.
5126 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
5127 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
5128 &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`.
5129 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
5130 { # Configuration for a single speaker in a multi-speaker setup.
5131 &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.
5132 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
5133 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
5134 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
5135 },
5136 &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.
5137 &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.
5138 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
5139 },
5140 },
5141 },
5142 ],
5143 },
5144 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
5145 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
5146 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
5147 },
5148 &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.
5149 &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.
5150 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
5151 },
5152 },
5153 },
5154 &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.
5155 &quot;A String&quot;,
5156 ],
5157 &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].
5158 &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.
5159 &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.
5160 &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.
5161 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
5162 },
5163 &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.
5164 &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.
5165 },
5166 &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.
5167 },
5168 &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.
5169 &quot;rubricContentType&quot;: &quot;A String&quot;, # The type of rubric content to be generated.
5170 &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.
5171 &quot;A String&quot;,
5172 ],
5173 },
5174 &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.
5175 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for the judge model.
5176 },
5177 &quot;metadata&quot;: { # Metadata about the metric, used for visualization and organization. # Optional. Metadata about the metric, used for visualization and organization.
5178 &quot;otherMetadata&quot;: { # Optional. Flexible metadata for user-defined attributes.
5179 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5180 },
5181 &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.
5182 &quot;description&quot;: &quot;A String&quot;, # Optional. The description of the score explaining the directionality etc.
5183 &quot;max&quot;: 3.14, # Required. The maximum value of the score range (inclusive).
5184 &quot;min&quot;: 3.14, # Required. The minimum value of the score range (inclusive).
5185 &quot;step&quot;: 3.14, # Optional. The distance between discrete steps in the range. If unset, the range is assumed to be continuous.
5186 },
5187 &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.
5188 },
5189 &quot;pairwiseMetricSpec&quot;: { # Spec for pairwise metric. # Spec for pairwise metric.
5190 &quot;baselineResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the baseline response.
5191 &quot;candidateResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the candidate response.
5192 &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.
5193 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
5194 },
5195 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pairwise metric.
5196 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pairwise metric.
5197 },
5198 &quot;pointwiseMetricSpec&quot;: { # Spec for pointwise metric. # Spec for pointwise metric.
5199 &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.
5200 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
5201 },
5202 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pointwise metric.
5203 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pointwise metric.
5204 },
5205 &quot;predefinedMetricSpec&quot;: { # The spec for a pre-defined metric. # The spec for a pre-defined metric.
5206 &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;.
5207 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
5208 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5209 },
5210 },
5211 &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.
5212 &quot;rougeType&quot;: &quot;A String&quot;, # Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum.
5213 &quot;splitSummaries&quot;: True or False, # Optional. Whether to split summaries while using rougeLsum.
5214 &quot;useStemmer&quot;: True or False, # Optional. Whether to use stemmer to compute rouge score.
5215 },
5216 },
5217 &quot;metricResourceName&quot;: &quot;A String&quot;, # Optional. Resource name for registered metric.
5218 },
5219 ],
5220 &quot;metrics&quot;: [ # The metrics used for evaluation. Currently, we only support evaluating a single metric. If multiple metrics are provided, only the first one will be evaluated.
5221 { # The metric used for running evaluations.
5222 &quot;aggregationMetrics&quot;: [ # Optional. The aggregation metrics to use.
5223 &quot;A String&quot;,
5224 ],
5225 &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.
5226 &quot;useEffectiveOrder&quot;: True or False, # Optional. Whether to use_effective_order to compute bleu score.
5227 },
5228 &quot;computationBasedMetricSpec&quot;: { # Specification for a computation based metric. # Spec for a computation based metric.
5229 &quot;parameters&quot;: { # Optional. A map of parameters for the metric, e.g. {&quot;rouge_type&quot;: &quot;rougeL&quot;}.
5230 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5231 },
5232 &quot;type&quot;: &quot;A String&quot;, # Required. The type of the computation based metric.
5233 },
5234 &quot;customCodeExecutionSpec&quot;: { # Specificies a metric that is populated by evaluating user-defined Python code. # Spec for Custom Code Execution metric.
5235 &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.
5236 },
5237 &quot;exactMatchSpec&quot;: { # Spec for exact match metric - returns 1 if prediction and reference exactly matches, otherwise 0. # Spec for exact match metric.
5238 },
5239 &quot;llmBasedMetricSpec&quot;: { # Specification for an LLM based metric. # Spec for an LLM based metric.
5240 &quot;additionalConfig&quot;: { # Optional. Optional additional configuration for the metric.
5241 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5242 },
5243 &quot;judgeAutoraterConfig&quot;: { # The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset. # Optional. Optional configuration for the judge LLM (Autorater).
5244 &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}`
5245 &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.
5246 &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.
5247 &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.
5248 &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.
5249 &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.
5250 &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].
5251 &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.
5252 &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;
5253 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
5254 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
5255 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
5256 },
5257 &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`.
5258 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
5259 &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.
5260 },
5261 &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.
5262 &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.
5263 &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.
5264 &quot;modelConfig&quot;: { # Config for model selection. # Optional. Config for model selection.
5265 &quot;featureSelectionPreference&quot;: &quot;A String&quot;, # Required. Feature selection preference.
5266 },
5267 &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].
5268 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
5269 { # Configuration for the model to configure output formatting and delivery.
5270 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
5271 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
5272 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5273 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
5274 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
5275 },
5276 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
5277 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
5278 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5279 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
5280 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
5281 },
5282 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
5283 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
5284 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
5285 },
5286 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
5287 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
5288 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5289 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
5290 &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.
5291 },
5292 },
5293 ],
5294 &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.
5295 &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.
5296 &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.
5297 &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.
5298 &quot;A String&quot;,
5299 ],
5300 &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.
5301 &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.
5302 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
5303 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
5304 ],
5305 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
5306 &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.
5307 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
5308 },
5309 &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.
5310 &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;]}`
5311 &quot;A String&quot;,
5312 ],
5313 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
5314 &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.
5315 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
5316 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
5317 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
5318 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
5319 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
5320 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
5321 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
5322 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
5323 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
5324 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
5325 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
5326 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
5327 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
5328 },
5329 &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.
5330 &quot;A String&quot;,
5331 ],
5332 &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
5333 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
5334 &quot;A String&quot;,
5335 ],
5336 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
5337 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
5338 },
5339 &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.
5340 &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.
5341 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
5342 },
5343 &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.
5344 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
5345 },
5346 },
5347 &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.
5348 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
5349 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
5350 &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`.
5351 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
5352 { # Configuration for a single speaker in a multi-speaker setup.
5353 &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.
5354 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
5355 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
5356 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
5357 },
5358 &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.
5359 &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.
5360 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
5361 },
5362 },
5363 },
5364 ],
5365 },
5366 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
5367 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
5368 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
5369 },
5370 &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.
5371 &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.
5372 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
5373 },
5374 },
5375 },
5376 &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.
5377 &quot;A String&quot;,
5378 ],
5379 &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].
5380 &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.
5381 &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.
5382 &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.
5383 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
5384 },
5385 &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.
5386 &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.
5387 },
5388 &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.
5389 },
5390 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Template for the prompt sent to the judge model.
5391 &quot;predefinedRubricGenerationSpec&quot;: { # The spec for a pre-defined metric. # Dynamically generate rubrics using a predefined spec.
5392 &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;.
5393 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
5394 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5395 },
5396 },
5397 &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.
5398 &quot;customCodeParserConfig&quot;: { # Configuration for parsing the LLM response using custom code. # Optional. Use custom code to parse the LLM response.
5399 &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
5400 },
5401 },
5402 &quot;rubricGenerationSpec&quot;: { # Specification for how rubrics should be generated. # Dynamically generate rubrics using this specification.
5403 &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.
5404 &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}`
5405 &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.
5406 &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.
5407 &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.
5408 &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.
5409 &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.
5410 &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].
5411 &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.
5412 &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;
5413 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
5414 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
5415 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
5416 },
5417 &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`.
5418 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
5419 &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.
5420 },
5421 &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.
5422 &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.
5423 &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.
5424 &quot;modelConfig&quot;: { # Config for model selection. # Optional. Config for model selection.
5425 &quot;featureSelectionPreference&quot;: &quot;A String&quot;, # Required. Feature selection preference.
5426 },
5427 &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].
5428 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
5429 { # Configuration for the model to configure output formatting and delivery.
5430 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
5431 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
5432 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5433 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
5434 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
5435 },
5436 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
5437 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
5438 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5439 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
5440 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
5441 },
5442 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
5443 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
5444 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
5445 },
5446 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
5447 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
5448 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
5449 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
5450 &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.
5451 },
5452 },
5453 ],
5454 &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.
5455 &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.
5456 &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.
5457 &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.
5458 &quot;A String&quot;,
5459 ],
5460 &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.
5461 &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.
5462 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
5463 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
5464 ],
5465 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
5466 &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.
5467 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
5468 },
5469 &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.
5470 &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;]}`
5471 &quot;A String&quot;,
5472 ],
5473 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
5474 &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.
5475 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
5476 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
5477 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
5478 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
5479 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
5480 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
5481 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
5482 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
5483 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
5484 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
5485 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
5486 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
5487 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
5488 },
5489 &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.
5490 &quot;A String&quot;,
5491 ],
5492 &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
5493 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
5494 &quot;A String&quot;,
5495 ],
5496 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
5497 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
5498 },
5499 &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.
5500 &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.
5501 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
5502 },
5503 &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.
5504 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
5505 },
5506 },
5507 &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.
5508 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
5509 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
5510 &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`.
5511 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
5512 { # Configuration for a single speaker in a multi-speaker setup.
5513 &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.
5514 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
5515 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
5516 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
5517 },
5518 &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.
5519 &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.
5520 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
5521 },
5522 },
5523 },
5524 ],
5525 },
5526 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
5527 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
5528 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
5529 },
5530 &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.
5531 &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.
5532 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
5533 },
5534 },
5535 },
5536 &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.
5537 &quot;A String&quot;,
5538 ],
5539 &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].
5540 &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.
5541 &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.
5542 &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.
5543 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
5544 },
5545 &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.
5546 &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.
5547 },
5548 &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.
5549 },
5550 &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.
5551 &quot;rubricContentType&quot;: &quot;A String&quot;, # The type of rubric content to be generated.
5552 &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.
5553 &quot;A String&quot;,
5554 ],
5555 },
5556 &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.
5557 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for the judge model.
5558 },
5559 &quot;metadata&quot;: { # Metadata about the metric, used for visualization and organization. # Optional. Metadata about the metric, used for visualization and organization.
5560 &quot;otherMetadata&quot;: { # Optional. Flexible metadata for user-defined attributes.
5561 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5562 },
5563 &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.
5564 &quot;description&quot;: &quot;A String&quot;, # Optional. The description of the score explaining the directionality etc.
5565 &quot;max&quot;: 3.14, # Required. The maximum value of the score range (inclusive).
5566 &quot;min&quot;: 3.14, # Required. The minimum value of the score range (inclusive).
5567 &quot;step&quot;: 3.14, # Optional. The distance between discrete steps in the range. If unset, the range is assumed to be continuous.
5568 },
5569 &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.
5570 },
5571 &quot;pairwiseMetricSpec&quot;: { # Spec for pairwise metric. # Spec for pairwise metric.
5572 &quot;baselineResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the baseline response.
5573 &quot;candidateResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the candidate response.
5574 &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.
5575 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
5576 },
5577 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pairwise metric.
5578 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pairwise metric.
5579 },
5580 &quot;pointwiseMetricSpec&quot;: { # Spec for pointwise metric. # Spec for pointwise metric.
5581 &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.
5582 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
5583 },
5584 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pointwise metric.
5585 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pointwise metric.
5586 },
5587 &quot;predefinedMetricSpec&quot;: { # The spec for a pre-defined metric. # The spec for a pre-defined metric.
5588 &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;.
5589 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
5590 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5591 },
5592 },
5593 &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.
5594 &quot;rougeType&quot;: &quot;A String&quot;, # Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum.
5595 &quot;splitSummaries&quot;: True or False, # Optional. Whether to split summaries while using rougeLsum.
5596 &quot;useStemmer&quot;: True or False, # Optional. Whether to use stemmer to compute rouge score.
5597 },
5598 },
5599 ],
5600 &quot;metricxInput&quot;: { # Input for MetricX metric. # Input for Metricx metric.
5601 &quot;instance&quot;: { # Spec for MetricX instance - The fields used for evaluation are dependent on the MetricX version. # Required. Metricx instance.
5602 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
5603 &quot;reference&quot;: &quot;A String&quot;, # Optional. Ground truth used to compare against the prediction.
5604 &quot;source&quot;: &quot;A String&quot;, # Optional. Source text in original language.
5605 },
5606 &quot;metricSpec&quot;: { # Spec for MetricX metric. # Required. Spec for Metricx metric.
5607 &quot;sourceLanguage&quot;: &quot;A String&quot;, # Optional. Source language in BCP-47 format.
5608 &quot;targetLanguage&quot;: &quot;A String&quot;, # Optional. Target language in BCP-47 format. Covers both prediction and reference.
5609 &quot;version&quot;: &quot;A String&quot;, # Required. Which version to use for evaluation.
5610 },
5611 },
5612 &quot;pairwiseMetricInput&quot;: { # Input for pairwise metric. # Input for pairwise metric.
5613 &quot;instance&quot;: { # Pairwise metric instance. Usually one instance corresponds to one row in an evaluation dataset. # Required. Pairwise metric instance.
5614 &quot;contentMapInstance&quot;: { # Map of placeholder in metric prompt template to contents of model input. # Key-value contents for the mutlimodality input, including text, image, video, audio, and pdf, etc. The key is placeholder in metric prompt template, and the value is the multimodal content.
5615 &quot;values&quot;: { # Optional. Map of placeholder to contents.
5616 &quot;a_key&quot;: { # Repeated Content type.
5617 &quot;contents&quot;: [ # Optional. Repeated contents.
5618 { # 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.
5619 &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.
5620 { # 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.
5621 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
5622 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
5623 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
5624 },
5625 &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.
5626 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
5627 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
5628 },
5629 &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.
5630 &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.
5631 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
5632 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5633 },
5634 &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.
5635 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
5636 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5637 },
5638 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
5639 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
5640 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
5641 { # Partial argument value of the function call.
5642 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
5643 &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;.
5644 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
5645 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
5646 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
5647 &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.
5648 },
5649 ],
5650 &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.
5651 },
5652 &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.
5653 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
5654 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
5655 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
5656 { # 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.
5657 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
5658 &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.
5659 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
5660 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5661 },
5662 &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.
5663 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
5664 &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.
5665 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5666 },
5667 },
5668 ],
5669 &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.
5670 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5671 },
5672 &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.
5673 },
5674 &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.
5675 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
5676 &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.
5677 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5678 },
5679 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
5680 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
5681 },
5682 &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.
5683 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
5684 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
5685 &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.
5686 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
5687 &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].
5688 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
5689 },
5690 },
5691 ],
5692 &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;.
5693 },
5694 ],
5695 },
5696 },
5697 },
5698 &quot;jsonInstance&quot;: &quot;A String&quot;, # Instance specified as a json string. String key-value pairs are expected in the json_instance to render PairwiseMetricSpec.instance_prompt_template.
5699 },
5700 &quot;metricSpec&quot;: { # Spec for pairwise metric. # Required. Spec for pairwise metric.
5701 &quot;baselineResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the baseline response.
5702 &quot;candidateResponseFieldName&quot;: &quot;A String&quot;, # Optional. The field name of the candidate response.
5703 &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.
5704 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
5705 },
5706 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pairwise metric.
5707 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pairwise metric.
5708 },
5709 },
5710 &quot;pairwiseQuestionAnsweringQualityInput&quot;: { # Input for pairwise question answering quality metric. # Input for pairwise question answering quality metric.
5711 &quot;instance&quot;: { # Spec for pairwise question answering quality instance. # Required. Pairwise question answering quality instance.
5712 &quot;baselinePrediction&quot;: &quot;A String&quot;, # Required. Output of the baseline model.
5713 &quot;context&quot;: &quot;A String&quot;, # Required. Text to answer the question.
5714 &quot;instruction&quot;: &quot;A String&quot;, # Required. Question Answering prompt for LLM.
5715 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the candidate model.
5716 &quot;reference&quot;: &quot;A String&quot;, # Optional. Ground truth used to compare against the prediction.
5717 },
5718 &quot;metricSpec&quot;: { # Spec for pairwise question answering quality score metric. # Required. Spec for pairwise question answering quality score metric.
5719 &quot;useReference&quot;: True or False, # Optional. Whether to use instance.reference to compute question answering quality.
5720 &quot;version&quot;: 42, # Optional. Which version to use for evaluation.
5721 },
5722 },
5723 &quot;pairwiseSummarizationQualityInput&quot;: { # Input for pairwise summarization quality metric. # Input for pairwise summarization quality metric.
5724 &quot;instance&quot;: { # Spec for pairwise summarization quality instance. # Required. Pairwise summarization quality instance.
5725 &quot;baselinePrediction&quot;: &quot;A String&quot;, # Required. Output of the baseline model.
5726 &quot;context&quot;: &quot;A String&quot;, # Required. Text to be summarized.
5727 &quot;instruction&quot;: &quot;A String&quot;, # Required. Summarization prompt for LLM.
5728 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the candidate model.
5729 &quot;reference&quot;: &quot;A String&quot;, # Optional. Ground truth used to compare against the prediction.
5730 },
5731 &quot;metricSpec&quot;: { # Spec for pairwise summarization quality score metric. # Required. Spec for pairwise summarization quality score metric.
5732 &quot;useReference&quot;: True or False, # Optional. Whether to use instance.reference to compute pairwise summarization quality.
5733 &quot;version&quot;: 42, # Optional. Which version to use for evaluation.
5734 },
5735 },
5736 &quot;pointwiseMetricInput&quot;: { # Input for pointwise metric. # Input for pointwise metric.
5737 &quot;instance&quot;: { # Pointwise metric instance. Usually one instance corresponds to one row in an evaluation dataset. # Required. Pointwise metric instance.
5738 &quot;contentMapInstance&quot;: { # Map of placeholder in metric prompt template to contents of model input. # Key-value contents for the mutlimodality input, including text, image, video, audio, and pdf, etc. The key is placeholder in metric prompt template, and the value is the multimodal content.
5739 &quot;values&quot;: { # Optional. Map of placeholder to contents.
5740 &quot;a_key&quot;: { # Repeated Content type.
5741 &quot;contents&quot;: [ # Optional. Repeated contents.
5742 { # 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.
5743 &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.
5744 { # 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.
5745 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
5746 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
5747 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
5748 },
5749 &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.
5750 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
5751 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
5752 },
5753 &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.
5754 &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.
5755 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
5756 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5757 },
5758 &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.
5759 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
5760 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5761 },
5762 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
5763 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
5764 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
5765 { # Partial argument value of the function call.
5766 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
5767 &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;.
5768 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
5769 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
5770 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
5771 &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.
5772 },
5773 ],
5774 &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.
5775 },
5776 &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.
5777 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
5778 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
5779 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
5780 { # 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.
5781 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
5782 &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.
5783 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
5784 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5785 },
5786 &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.
5787 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
5788 &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.
5789 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5790 },
5791 },
5792 ],
5793 &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.
5794 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
5795 },
5796 &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.
5797 },
5798 &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.
5799 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
5800 &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.
5801 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
5802 },
5803 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
5804 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
5805 },
5806 &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.
5807 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
5808 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
5809 &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.
5810 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
5811 &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].
5812 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
5813 },
5814 },
5815 ],
5816 &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;.
5817 },
5818 ],
5819 },
5820 },
5821 },
5822 &quot;jsonInstance&quot;: &quot;A String&quot;, # Instance specified as a json string. String key-value pairs are expected in the json_instance to render PointwiseMetricSpec.instance_prompt_template.
5823 },
5824 &quot;metricSpec&quot;: { # Spec for pointwise metric. # Required. Spec for pointwise metric.
5825 &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.
5826 &quot;returnRawOutput&quot;: True or False, # Optional. Whether to return raw output.
5827 },
5828 &quot;metricPromptTemplate&quot;: &quot;A String&quot;, # Required. Metric prompt template for pointwise metric.
5829 &quot;systemInstruction&quot;: &quot;A String&quot;, # Optional. System instructions for pointwise metric.
5830 },
5831 },
5832 &quot;questionAnsweringCorrectnessInput&quot;: { # Input for question answering correctness metric. # Input for question answering correctness metric.
5833 &quot;instance&quot;: { # Spec for question answering correctness instance. # Required. Question answering correctness instance.
5834 &quot;context&quot;: &quot;A String&quot;, # Optional. Text provided as context to answer the question.
5835 &quot;instruction&quot;: &quot;A String&quot;, # Required. The question asked and other instruction in the inference prompt.
5836 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
5837 &quot;reference&quot;: &quot;A String&quot;, # Optional. Ground truth used to compare against the prediction.
5838 },
5839 &quot;metricSpec&quot;: { # Spec for question answering correctness metric. # Required. Spec for question answering correctness score metric.
5840 &quot;useReference&quot;: True or False, # Optional. Whether to use instance.reference to compute question answering correctness.
5841 &quot;version&quot;: 42, # Optional. Which version to use for evaluation.
5842 },
5843 },
5844 &quot;questionAnsweringHelpfulnessInput&quot;: { # Input for question answering helpfulness metric. # Input for question answering helpfulness metric.
5845 &quot;instance&quot;: { # Spec for question answering helpfulness instance. # Required. Question answering helpfulness instance.
5846 &quot;context&quot;: &quot;A String&quot;, # Optional. Text provided as context to answer the question.
5847 &quot;instruction&quot;: &quot;A String&quot;, # Required. The question asked and other instruction in the inference prompt.
5848 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
5849 &quot;reference&quot;: &quot;A String&quot;, # Optional. Ground truth used to compare against the prediction.
5850 },
5851 &quot;metricSpec&quot;: { # Spec for question answering helpfulness metric. # Required. Spec for question answering helpfulness score metric.
5852 &quot;useReference&quot;: True or False, # Optional. Whether to use instance.reference to compute question answering helpfulness.
5853 &quot;version&quot;: 42, # Optional. Which version to use for evaluation.
5854 },
5855 },
5856 &quot;questionAnsweringQualityInput&quot;: { # Input for question answering quality metric. # Input for question answering quality metric.
5857 &quot;instance&quot;: { # Spec for question answering quality instance. # Required. Question answering quality instance.
5858 &quot;context&quot;: &quot;A String&quot;, # Required. Text to answer the question.
5859 &quot;instruction&quot;: &quot;A String&quot;, # Required. Question Answering prompt for LLM.
5860 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
5861 &quot;reference&quot;: &quot;A String&quot;, # Optional. Ground truth used to compare against the prediction.
5862 },
5863 &quot;metricSpec&quot;: { # Spec for question answering quality score metric. # Required. Spec for question answering quality score metric.
5864 &quot;useReference&quot;: True or False, # Optional. Whether to use instance.reference to compute question answering quality.
5865 &quot;version&quot;: 42, # Optional. Which version to use for evaluation.
5866 },
5867 },
5868 &quot;questionAnsweringRelevanceInput&quot;: { # Input for question answering relevance metric. # Input for question answering relevance metric.
5869 &quot;instance&quot;: { # Spec for question answering relevance instance. # Required. Question answering relevance instance.
5870 &quot;context&quot;: &quot;A String&quot;, # Optional. Text provided as context to answer the question.
5871 &quot;instruction&quot;: &quot;A String&quot;, # Required. The question asked and other instruction in the inference prompt.
5872 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
5873 &quot;reference&quot;: &quot;A String&quot;, # Optional. Ground truth used to compare against the prediction.
5874 },
5875 &quot;metricSpec&quot;: { # Spec for question answering relevance metric. # Required. Spec for question answering relevance score metric.
5876 &quot;useReference&quot;: True or False, # Optional. Whether to use instance.reference to compute question answering relevance.
5877 &quot;version&quot;: 42, # Optional. Which version to use for evaluation.
5878 },
5879 },
5880 &quot;rougeInput&quot;: { # Input for rouge metric. # Instances and metric spec for rouge metric.
5881 &quot;instances&quot;: [ # Required. Repeated rouge instances.
5882 { # Spec for rouge instance.
5883 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
5884 &quot;reference&quot;: &quot;A String&quot;, # Required. Ground truth used to compare against the prediction.
5885 },
5886 ],
5887 &quot;metricSpec&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. # Required. Spec for rouge score metric.
5888 &quot;rougeType&quot;: &quot;A String&quot;, # Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum.
5889 &quot;splitSummaries&quot;: True or False, # Optional. Whether to split summaries while using rougeLsum.
5890 &quot;useStemmer&quot;: True or False, # Optional. Whether to use stemmer to compute rouge score.
5891 },
5892 },
5893 &quot;rubricBasedInstructionFollowingInput&quot;: { # Instance and metric spec for RubricBasedInstructionFollowing metric. # Rubric Based Instruction Following metric.
5894 &quot;instance&quot;: { # Instance for RubricBasedInstructionFollowing metric - one instance corresponds to one row in an evaluation dataset. # Required. Instance for RubricBasedInstructionFollowing metric.
5895 &quot;jsonInstance&quot;: &quot;A String&quot;, # Required. Instance specified as a json string. String key-value pairs are expected in the json_instance to render RubricBasedInstructionFollowing prompt templates.
5896 },
5897 &quot;metricSpec&quot;: { # Spec for RubricBasedInstructionFollowing metric - returns rubrics and verdicts corresponding to rubrics along with overall score. # Required. Spec for RubricBasedInstructionFollowing metric.
5898 },
5899 },
5900 &quot;safetyInput&quot;: { # Input for safety metric. # Input for safety metric.
5901 &quot;instance&quot;: { # Spec for safety instance. # Required. Safety instance.
5902 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
5903 },
5904 &quot;metricSpec&quot;: { # Spec for safety metric. # Required. Spec for safety metric.
5905 &quot;version&quot;: 42, # Optional. Which version to use for evaluation.
5906 },
5907 },
5908 &quot;summarizationHelpfulnessInput&quot;: { # Input for summarization helpfulness metric. # Input for summarization helpfulness metric.
5909 &quot;instance&quot;: { # Spec for summarization helpfulness instance. # Required. Summarization helpfulness instance.
5910 &quot;context&quot;: &quot;A String&quot;, # Required. Text to be summarized.
5911 &quot;instruction&quot;: &quot;A String&quot;, # Optional. Summarization prompt for LLM.
5912 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
5913 &quot;reference&quot;: &quot;A String&quot;, # Optional. Ground truth used to compare against the prediction.
5914 },
5915 &quot;metricSpec&quot;: { # Spec for summarization helpfulness score metric. # Required. Spec for summarization helpfulness score metric.
5916 &quot;useReference&quot;: True or False, # Optional. Whether to use instance.reference to compute summarization helpfulness.
5917 &quot;version&quot;: 42, # Optional. Which version to use for evaluation.
5918 },
5919 },
5920 &quot;summarizationQualityInput&quot;: { # Input for summarization quality metric. # Input for summarization quality metric.
5921 &quot;instance&quot;: { # Spec for summarization quality instance. # Required. Summarization quality instance.
5922 &quot;context&quot;: &quot;A String&quot;, # Required. Text to be summarized.
5923 &quot;instruction&quot;: &quot;A String&quot;, # Required. Summarization prompt for LLM.
5924 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
5925 &quot;reference&quot;: &quot;A String&quot;, # Optional. Ground truth used to compare against the prediction.
5926 },
5927 &quot;metricSpec&quot;: { # Spec for summarization quality score metric. # Required. Spec for summarization quality score metric.
5928 &quot;useReference&quot;: True or False, # Optional. Whether to use instance.reference to compute summarization quality.
5929 &quot;version&quot;: 42, # Optional. Which version to use for evaluation.
5930 },
5931 },
5932 &quot;summarizationVerbosityInput&quot;: { # Input for summarization verbosity metric. # Input for summarization verbosity metric.
5933 &quot;instance&quot;: { # Spec for summarization verbosity instance. # Required. Summarization verbosity instance.
5934 &quot;context&quot;: &quot;A String&quot;, # Required. Text to be summarized.
5935 &quot;instruction&quot;: &quot;A String&quot;, # Optional. Summarization prompt for LLM.
5936 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
5937 &quot;reference&quot;: &quot;A String&quot;, # Optional. Ground truth used to compare against the prediction.
5938 },
5939 &quot;metricSpec&quot;: { # Spec for summarization verbosity score metric. # Required. Spec for summarization verbosity score metric.
5940 &quot;useReference&quot;: True or False, # Optional. Whether to use instance.reference to compute summarization verbosity.
5941 &quot;version&quot;: 42, # Optional. Which version to use for evaluation.
5942 },
5943 },
5944 &quot;toolCallValidInput&quot;: { # Input for tool call valid metric. # Tool call metric instances. Input for tool call valid metric.
5945 &quot;instances&quot;: [ # Required. Repeated tool call valid instances.
5946 { # Spec for tool call valid instance.
5947 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
5948 &quot;reference&quot;: &quot;A String&quot;, # Required. Ground truth used to compare against the prediction.
5949 },
5950 ],
5951 &quot;metricSpec&quot;: { # Spec for tool call valid metric. # Required. Spec for tool call valid metric.
5952 },
5953 },
5954 &quot;toolNameMatchInput&quot;: { # Input for tool name match metric. # Input for tool name match metric.
5955 &quot;instances&quot;: [ # Required. Repeated tool name match instances.
5956 { # Spec for tool name match instance.
5957 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
5958 &quot;reference&quot;: &quot;A String&quot;, # Required. Ground truth used to compare against the prediction.
5959 },
5960 ],
5961 &quot;metricSpec&quot;: { # Spec for tool name match metric. # Required. Spec for tool name match metric.
5962 },
5963 },
5964 &quot;toolParameterKeyMatchInput&quot;: { # Input for tool parameter key match metric. # Input for tool parameter key match metric.
5965 &quot;instances&quot;: [ # Required. Repeated tool parameter key match instances.
5966 { # Spec for tool parameter key match instance.
5967 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
5968 &quot;reference&quot;: &quot;A String&quot;, # Required. Ground truth used to compare against the prediction.
5969 },
5970 ],
5971 &quot;metricSpec&quot;: { # Spec for tool parameter key match metric. # Required. Spec for tool parameter key match metric.
5972 },
5973 },
5974 &quot;toolParameterKvMatchInput&quot;: { # Input for tool parameter key value match metric. # Input for tool parameter key value match metric.
5975 &quot;instances&quot;: [ # Required. Repeated tool parameter key value match instances.
5976 { # Spec for tool parameter key value match instance.
5977 &quot;prediction&quot;: &quot;A String&quot;, # Required. Output of the evaluated model.
5978 &quot;reference&quot;: &quot;A String&quot;, # Required. Ground truth used to compare against the prediction.
5979 },
5980 ],
5981 &quot;metricSpec&quot;: { # Spec for tool parameter key value match metric. # Required. Spec for tool parameter key value match metric.
5982 &quot;useStrictStringMatch&quot;: True or False, # Optional. Whether to use STRICT string match on parameter values.
5983 },
5984 },
5985 &quot;trajectoryAnyOrderMatchInput&quot;: { # Instances and metric spec for TrajectoryAnyOrderMatch metric. # Input for trajectory match any order metric.
5986 &quot;instances&quot;: [ # Required. Repeated TrajectoryAnyOrderMatch instance.
5987 { # Spec for TrajectoryAnyOrderMatch instance.
5988 &quot;predictedTrajectory&quot;: { # Spec for trajectory. # Required. Spec for predicted tool call trajectory.
5989 &quot;toolCalls&quot;: [ # Required. Tool calls in the trajectory.
5990 { # Spec for tool call.
5991 &quot;toolInput&quot;: &quot;A String&quot;, # Optional. Spec for tool input
5992 &quot;toolName&quot;: &quot;A String&quot;, # Required. Spec for tool name
5993 },
5994 ],
5995 },
5996 &quot;referenceTrajectory&quot;: { # Spec for trajectory. # Required. Spec for reference tool call trajectory.
5997 &quot;toolCalls&quot;: [ # Required. Tool calls in the trajectory.
5998 { # Spec for tool call.
5999 &quot;toolInput&quot;: &quot;A String&quot;, # Optional. Spec for tool input
6000 &quot;toolName&quot;: &quot;A String&quot;, # Required. Spec for tool name
6001 },
6002 ],
6003 },
6004 },
6005 ],
6006 &quot;metricSpec&quot;: { # Spec for TrajectoryAnyOrderMatch metric - returns 1 if all tool calls in the reference trajectory appear in the predicted trajectory in any order, else 0. # Required. Spec for TrajectoryAnyOrderMatch metric.
6007 },
6008 },
6009 &quot;trajectoryExactMatchInput&quot;: { # Instances and metric spec for TrajectoryExactMatch metric. # Input for trajectory exact match metric.
6010 &quot;instances&quot;: [ # Required. Repeated TrajectoryExactMatch instance.
6011 { # Spec for TrajectoryExactMatch instance.
6012 &quot;predictedTrajectory&quot;: { # Spec for trajectory. # Required. Spec for predicted tool call trajectory.
6013 &quot;toolCalls&quot;: [ # Required. Tool calls in the trajectory.
6014 { # Spec for tool call.
6015 &quot;toolInput&quot;: &quot;A String&quot;, # Optional. Spec for tool input
6016 &quot;toolName&quot;: &quot;A String&quot;, # Required. Spec for tool name
6017 },
6018 ],
6019 },
6020 &quot;referenceTrajectory&quot;: { # Spec for trajectory. # Required. Spec for reference tool call trajectory.
6021 &quot;toolCalls&quot;: [ # Required. Tool calls in the trajectory.
6022 { # Spec for tool call.
6023 &quot;toolInput&quot;: &quot;A String&quot;, # Optional. Spec for tool input
6024 &quot;toolName&quot;: &quot;A String&quot;, # Required. Spec for tool name
6025 },
6026 ],
6027 },
6028 },
6029 ],
6030 &quot;metricSpec&quot;: { # Spec for TrajectoryExactMatch metric - returns 1 if tool calls in the reference trajectory exactly match the predicted trajectory, else 0. # Required. Spec for TrajectoryExactMatch metric.
6031 },
6032 },
6033 &quot;trajectoryInOrderMatchInput&quot;: { # Instances and metric spec for TrajectoryInOrderMatch metric. # Input for trajectory in order match metric.
6034 &quot;instances&quot;: [ # Required. Repeated TrajectoryInOrderMatch instance.
6035 { # Spec for TrajectoryInOrderMatch instance.
6036 &quot;predictedTrajectory&quot;: { # Spec for trajectory. # Required. Spec for predicted tool call trajectory.
6037 &quot;toolCalls&quot;: [ # Required. Tool calls in the trajectory.
6038 { # Spec for tool call.
6039 &quot;toolInput&quot;: &quot;A String&quot;, # Optional. Spec for tool input
6040 &quot;toolName&quot;: &quot;A String&quot;, # Required. Spec for tool name
6041 },
6042 ],
6043 },
6044 &quot;referenceTrajectory&quot;: { # Spec for trajectory. # Required. Spec for reference tool call trajectory.
6045 &quot;toolCalls&quot;: [ # Required. Tool calls in the trajectory.
6046 { # Spec for tool call.
6047 &quot;toolInput&quot;: &quot;A String&quot;, # Optional. Spec for tool input
6048 &quot;toolName&quot;: &quot;A String&quot;, # Required. Spec for tool name
6049 },
6050 ],
6051 },
6052 },
6053 ],
6054 &quot;metricSpec&quot;: { # Spec for TrajectoryInOrderMatch metric - returns 1 if tool calls in the reference trajectory appear in the predicted trajectory in the same order, else 0. # Required. Spec for TrajectoryInOrderMatch metric.
6055 },
6056 },
6057 &quot;trajectoryPrecisionInput&quot;: { # Instances and metric spec for TrajectoryPrecision metric. # Input for trajectory precision metric.
6058 &quot;instances&quot;: [ # Required. Repeated TrajectoryPrecision instance.
6059 { # Spec for TrajectoryPrecision instance.
6060 &quot;predictedTrajectory&quot;: { # Spec for trajectory. # Required. Spec for predicted tool call trajectory.
6061 &quot;toolCalls&quot;: [ # Required. Tool calls in the trajectory.
6062 { # Spec for tool call.
6063 &quot;toolInput&quot;: &quot;A String&quot;, # Optional. Spec for tool input
6064 &quot;toolName&quot;: &quot;A String&quot;, # Required. Spec for tool name
6065 },
6066 ],
6067 },
6068 &quot;referenceTrajectory&quot;: { # Spec for trajectory. # Required. Spec for reference tool call trajectory.
6069 &quot;toolCalls&quot;: [ # Required. Tool calls in the trajectory.
6070 { # Spec for tool call.
6071 &quot;toolInput&quot;: &quot;A String&quot;, # Optional. Spec for tool input
6072 &quot;toolName&quot;: &quot;A String&quot;, # Required. Spec for tool name
6073 },
6074 ],
6075 },
6076 },
6077 ],
6078 &quot;metricSpec&quot;: { # Spec for TrajectoryPrecision metric - returns a float score based on average precision of individual tool calls. # Required. Spec for TrajectoryPrecision metric.
6079 },
6080 },
6081 &quot;trajectoryRecallInput&quot;: { # Instances and metric spec for TrajectoryRecall metric. # Input for trajectory recall metric.
6082 &quot;instances&quot;: [ # Required. Repeated TrajectoryRecall instance.
6083 { # Spec for TrajectoryRecall instance.
6084 &quot;predictedTrajectory&quot;: { # Spec for trajectory. # Required. Spec for predicted tool call trajectory.
6085 &quot;toolCalls&quot;: [ # Required. Tool calls in the trajectory.
6086 { # Spec for tool call.
6087 &quot;toolInput&quot;: &quot;A String&quot;, # Optional. Spec for tool input
6088 &quot;toolName&quot;: &quot;A String&quot;, # Required. Spec for tool name
6089 },
6090 ],
6091 },
6092 &quot;referenceTrajectory&quot;: { # Spec for trajectory. # Required. Spec for reference tool call trajectory.
6093 &quot;toolCalls&quot;: [ # Required. Tool calls in the trajectory.
6094 { # Spec for tool call.
6095 &quot;toolInput&quot;: &quot;A String&quot;, # Optional. Spec for tool input
6096 &quot;toolName&quot;: &quot;A String&quot;, # Required. Spec for tool name
6097 },
6098 ],
6099 },
6100 },
6101 ],
6102 &quot;metricSpec&quot;: { # Spec for TrajectoryRecall metric - returns a float score based on average recall of individual tool calls. # Required. Spec for TrajectoryRecall metric.
6103 },
6104 },
6105 &quot;trajectorySingleToolUseInput&quot;: { # Instances and metric spec for TrajectorySingleToolUse metric. # Input for trajectory single tool use metric.
6106 &quot;instances&quot;: [ # Required. Repeated TrajectorySingleToolUse instance.
6107 { # Spec for TrajectorySingleToolUse instance.
6108 &quot;predictedTrajectory&quot;: { # Spec for trajectory. # Required. Spec for predicted tool call trajectory.
6109 &quot;toolCalls&quot;: [ # Required. Tool calls in the trajectory.
6110 { # Spec for tool call.
6111 &quot;toolInput&quot;: &quot;A String&quot;, # Optional. Spec for tool input
6112 &quot;toolName&quot;: &quot;A String&quot;, # Required. Spec for tool name
6113 },
6114 ],
6115 },
6116 },
6117 ],
6118 &quot;metricSpec&quot;: { # Spec for TrajectorySingleToolUse metric - returns 1 if tool is present in the predicted trajectory, else 0. # Required. Spec for TrajectorySingleToolUse metric.
6119 &quot;toolName&quot;: &quot;A String&quot;, # Required. Spec for tool name to be checked for in the predicted trajectory.
6120 },
6121 },
6122 }
6123
6124 x__xgafv: string, V1 error format.
6125 Allowed values
6126 1 - v1 error format
6127 2 - v2 error format
6128
6129 Returns:
6130 An object of the form:
6131
6132 { # Response message for EvaluationService.EvaluateInstances.
6133 &quot;bleuResults&quot;: { # Results for bleu metric. # Results for bleu metric.
6134 &quot;bleuMetricValues&quot;: [ # Output only. Bleu metric values.
6135 { # Bleu metric value for an instance.
6136 &quot;score&quot;: 3.14, # Output only. Bleu score.
6137 },
6138 ],
6139 },
6140 &quot;coherenceResult&quot;: { # Spec for coherence result. # Result for coherence metric.
6141 &quot;confidence&quot;: 3.14, # Output only. Confidence for coherence score.
6142 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for coherence score.
6143 &quot;score&quot;: 3.14, # Output only. Coherence score.
6144 },
6145 &quot;cometResult&quot;: { # Spec for Comet result - calculates the comet score for the given instance using the version specified in the spec. # Translation metrics. Result for Comet metric.
6146 &quot;score&quot;: 3.14, # Output only. Comet score. Range depends on version.
6147 },
6148 &quot;exactMatchResults&quot;: { # Results for exact match metric. # Auto metric evaluation results. Results for exact match metric.
6149 &quot;exactMatchMetricValues&quot;: [ # Output only. Exact match metric values.
6150 { # Exact match metric value for an instance.
6151 &quot;score&quot;: 3.14, # Output only. Exact match score.
6152 },
6153 ],
6154 },
6155 &quot;fluencyResult&quot;: { # Spec for fluency result. # LLM-based metric evaluation result. General text generation metrics, applicable to other categories. Result for fluency metric.
6156 &quot;confidence&quot;: 3.14, # Output only. Confidence for fluency score.
6157 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for fluency score.
6158 &quot;score&quot;: 3.14, # Output only. Fluency score.
6159 },
6160 &quot;fulfillmentResult&quot;: { # Spec for fulfillment result. # Result for fulfillment metric.
6161 &quot;confidence&quot;: 3.14, # Output only. Confidence for fulfillment score.
6162 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for fulfillment score.
6163 &quot;score&quot;: 3.14, # Output only. Fulfillment score.
6164 },
6165 &quot;groundednessResult&quot;: { # Spec for groundedness result. # Result for groundedness metric.
6166 &quot;confidence&quot;: 3.14, # Output only. Confidence for groundedness score.
6167 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for groundedness score.
6168 &quot;score&quot;: 3.14, # Output only. Groundedness score.
6169 },
6170 &quot;metricResults&quot;: [ # Metric results for each instance. The order of the metric results is guaranteed to be the same as the order of the instances in the request.
6171 { # Result for a single metric on a single instance.
6172 &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 status for the metric result.
6173 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
6174 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
6175 {
6176 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
6177 },
6178 ],
6179 &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.
6180 },
6181 &quot;explanation&quot;: &quot;A String&quot;, # Output only. The explanation for the metric result.
6182 &quot;rubricVerdicts&quot;: [ # Output only. For rubric-based metrics, the verdicts for each rubric.
6183 { # Represents the verdict of an evaluation against a single rubric.
6184 &quot;evaluatedRubric&quot;: { # Message representing a single testable criterion for evaluation. One input prompt could have multiple rubrics. # Required. The full rubric definition that was evaluated. Storing this ensures the verdict is self-contained and understandable, especially if the original rubric definition changes or was dynamically generated.
6185 &quot;content&quot;: { # Content of the rubric, defining the testable criteria. # Required. The actual testable criteria for the rubric.
6186 &quot;property&quot;: { # Defines criteria based on a specific property. # Evaluation criteria based on a specific property.
6187 &quot;description&quot;: &quot;A String&quot;, # Description of the property being evaluated. Example: &quot;The model&#x27;s response is grammatically correct.&quot;
6188 },
6189 },
6190 &quot;importance&quot;: &quot;A String&quot;, # Optional. The relative importance of this rubric.
6191 &quot;rubricId&quot;: &quot;A String&quot;, # Unique identifier for the rubric. This ID is used to refer to this rubric, e.g., in RubricVerdict.
6192 &quot;type&quot;: &quot;A String&quot;, # Optional. A type designator for the rubric, which can inform how it&#x27;s evaluated or interpreted by systems or users. It&#x27;s recommended to use consistent, well-defined, upper snake_case strings. Examples: &quot;SUMMARIZATION_QUALITY&quot;, &quot;SAFETY_HARMFUL_CONTENT&quot;, &quot;INSTRUCTION_ADHERENCE&quot;.
6193 },
6194 &quot;reasoning&quot;: &quot;A String&quot;, # Optional. Human-readable reasoning or explanation for the verdict. This can include specific examples or details from the evaluated content that justify the given verdict.
6195 &quot;verdict&quot;: True or False, # Required. Outcome of the evaluation against the rubric, represented as a boolean. `true` indicates a &quot;Pass&quot;, `false` indicates a &quot;Fail&quot;.
6196 },
6197 ],
6198 &quot;score&quot;: 3.14, # Output only. The score for the metric. Please refer to each metric&#x27;s documentation for the meaning of the score.
6199 },
6200 ],
6201 &quot;metricxResult&quot;: { # Spec for MetricX result - calculates the MetricX score for the given instance using the version specified in the spec. # Result for Metricx metric.
6202 &quot;score&quot;: 3.14, # Output only. MetricX score. Range depends on version.
6203 },
6204 &quot;pairwiseMetricResult&quot;: { # Spec for pairwise metric result. # Result for pairwise metric.
6205 &quot;customOutput&quot;: { # Spec for custom output. # Output only. Spec for custom output.
6206 &quot;rawOutputs&quot;: { # Raw output. # Output only. List of raw output strings.
6207 &quot;rawOutput&quot;: [ # Output only. Raw output string.
6208 &quot;A String&quot;,
6209 ],
6210 },
6211 },
6212 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for pairwise metric score.
6213 &quot;pairwiseChoice&quot;: &quot;A String&quot;, # Output only. Pairwise metric choice.
6214 },
6215 &quot;pairwiseQuestionAnsweringQualityResult&quot;: { # Spec for pairwise question answering quality result. # Result for pairwise question answering quality metric.
6216 &quot;confidence&quot;: 3.14, # Output only. Confidence for question answering quality score.
6217 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for question answering quality score.
6218 &quot;pairwiseChoice&quot;: &quot;A String&quot;, # Output only. Pairwise question answering prediction choice.
6219 },
6220 &quot;pairwiseSummarizationQualityResult&quot;: { # Spec for pairwise summarization quality result. # Result for pairwise summarization quality metric.
6221 &quot;confidence&quot;: 3.14, # Output only. Confidence for summarization quality score.
6222 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for summarization quality score.
6223 &quot;pairwiseChoice&quot;: &quot;A String&quot;, # Output only. Pairwise summarization prediction choice.
6224 },
6225 &quot;pointwiseMetricResult&quot;: { # Spec for pointwise metric result. # Generic metrics. Result for pointwise metric.
6226 &quot;customOutput&quot;: { # Spec for custom output. # Output only. Spec for custom output.
6227 &quot;rawOutputs&quot;: { # Raw output. # Output only. List of raw output strings.
6228 &quot;rawOutput&quot;: [ # Output only. Raw output string.
6229 &quot;A String&quot;,
6230 ],
6231 },
6232 },
6233 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for pointwise metric score.
6234 &quot;score&quot;: 3.14, # Output only. Pointwise metric score.
6235 },
6236 &quot;questionAnsweringCorrectnessResult&quot;: { # Spec for question answering correctness result. # Result for question answering correctness metric.
6237 &quot;confidence&quot;: 3.14, # Output only. Confidence for question answering correctness score.
6238 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for question answering correctness score.
6239 &quot;score&quot;: 3.14, # Output only. Question Answering Correctness score.
6240 },
6241 &quot;questionAnsweringHelpfulnessResult&quot;: { # Spec for question answering helpfulness result. # Result for question answering helpfulness metric.
6242 &quot;confidence&quot;: 3.14, # Output only. Confidence for question answering helpfulness score.
6243 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for question answering helpfulness score.
6244 &quot;score&quot;: 3.14, # Output only. Question Answering Helpfulness score.
6245 },
6246 &quot;questionAnsweringQualityResult&quot;: { # Spec for question answering quality result. # Question answering only metrics. Result for question answering quality metric.
6247 &quot;confidence&quot;: 3.14, # Output only. Confidence for question answering quality score.
6248 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for question answering quality score.
6249 &quot;score&quot;: 3.14, # Output only. Question Answering Quality score.
6250 },
6251 &quot;questionAnsweringRelevanceResult&quot;: { # Spec for question answering relevance result. # Result for question answering relevance metric.
6252 &quot;confidence&quot;: 3.14, # Output only. Confidence for question answering relevance score.
6253 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for question answering relevance score.
6254 &quot;score&quot;: 3.14, # Output only. Question Answering Relevance score.
6255 },
6256 &quot;rougeResults&quot;: { # Results for rouge metric. # Results for rouge metric.
6257 &quot;rougeMetricValues&quot;: [ # Output only. Rouge metric values.
6258 { # Rouge metric value for an instance.
6259 &quot;score&quot;: 3.14, # Output only. Rouge score.
6260 },
6261 ],
6262 },
6263 &quot;rubricBasedInstructionFollowingResult&quot;: { # Result for RubricBasedInstructionFollowing metric. # Result for rubric based instruction following metric.
6264 &quot;rubricCritiqueResults&quot;: [ # Output only. List of per rubric critique results.
6265 { # Rubric critique result.
6266 &quot;rubric&quot;: &quot;A String&quot;, # Output only. Rubric to be evaluated.
6267 &quot;verdict&quot;: True or False, # Output only. Verdict for the rubric - true if the rubric is met, false otherwise.
6268 },
6269 ],
6270 &quot;score&quot;: 3.14, # Output only. Overall score for the instruction following.
6271 },
6272 &quot;safetyResult&quot;: { # Spec for safety result. # Result for safety metric.
6273 &quot;confidence&quot;: 3.14, # Output only. Confidence for safety score.
6274 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for safety score.
6275 &quot;score&quot;: 3.14, # Output only. Safety score.
6276 },
6277 &quot;summarizationHelpfulnessResult&quot;: { # Spec for summarization helpfulness result. # Result for summarization helpfulness metric.
6278 &quot;confidence&quot;: 3.14, # Output only. Confidence for summarization helpfulness score.
6279 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for summarization helpfulness score.
6280 &quot;score&quot;: 3.14, # Output only. Summarization Helpfulness score.
6281 },
6282 &quot;summarizationQualityResult&quot;: { # Spec for summarization quality result. # Summarization only metrics. Result for summarization quality metric.
6283 &quot;confidence&quot;: 3.14, # Output only. Confidence for summarization quality score.
6284 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for summarization quality score.
6285 &quot;score&quot;: 3.14, # Output only. Summarization Quality score.
6286 },
6287 &quot;summarizationVerbosityResult&quot;: { # Spec for summarization verbosity result. # Result for summarization verbosity metric.
6288 &quot;confidence&quot;: 3.14, # Output only. Confidence for summarization verbosity score.
6289 &quot;explanation&quot;: &quot;A String&quot;, # Output only. Explanation for summarization verbosity score.
6290 &quot;score&quot;: 3.14, # Output only. Summarization Verbosity score.
6291 },
6292 &quot;toolCallValidResults&quot;: { # Results for tool call valid metric. # Tool call metrics. Results for tool call valid metric.
6293 &quot;toolCallValidMetricValues&quot;: [ # Output only. Tool call valid metric values.
6294 { # Tool call valid metric value for an instance.
6295 &quot;score&quot;: 3.14, # Output only. Tool call valid score.
6296 },
6297 ],
6298 },
6299 &quot;toolNameMatchResults&quot;: { # Results for tool name match metric. # Results for tool name match metric.
6300 &quot;toolNameMatchMetricValues&quot;: [ # Output only. Tool name match metric values.
6301 { # Tool name match metric value for an instance.
6302 &quot;score&quot;: 3.14, # Output only. Tool name match score.
6303 },
6304 ],
6305 },
6306 &quot;toolParameterKeyMatchResults&quot;: { # Results for tool parameter key match metric. # Results for tool parameter key match metric.
6307 &quot;toolParameterKeyMatchMetricValues&quot;: [ # Output only. Tool parameter key match metric values.
6308 { # Tool parameter key match metric value for an instance.
6309 &quot;score&quot;: 3.14, # Output only. Tool parameter key match score.
6310 },
6311 ],
6312 },
6313 &quot;toolParameterKvMatchResults&quot;: { # Results for tool parameter key value match metric. # Results for tool parameter key value match metric.
6314 &quot;toolParameterKvMatchMetricValues&quot;: [ # Output only. Tool parameter key value match metric values.
6315 { # Tool parameter key value match metric value for an instance.
6316 &quot;score&quot;: 3.14, # Output only. Tool parameter key value match score.
6317 },
6318 ],
6319 },
6320 &quot;trajectoryAnyOrderMatchResults&quot;: { # Results for TrajectoryAnyOrderMatch metric. # Result for trajectory any order match metric.
6321 &quot;trajectoryAnyOrderMatchMetricValues&quot;: [ # Output only. TrajectoryAnyOrderMatch metric values.
6322 { # TrajectoryAnyOrderMatch metric value for an instance.
6323 &quot;score&quot;: 3.14, # Output only. TrajectoryAnyOrderMatch score.
6324 },
6325 ],
6326 },
6327 &quot;trajectoryExactMatchResults&quot;: { # Results for TrajectoryExactMatch metric. # Result for trajectory exact match metric.
6328 &quot;trajectoryExactMatchMetricValues&quot;: [ # Output only. TrajectoryExactMatch metric values.
6329 { # TrajectoryExactMatch metric value for an instance.
6330 &quot;score&quot;: 3.14, # Output only. TrajectoryExactMatch score.
6331 },
6332 ],
6333 },
6334 &quot;trajectoryInOrderMatchResults&quot;: { # Results for TrajectoryInOrderMatch metric. # Result for trajectory in order match metric.
6335 &quot;trajectoryInOrderMatchMetricValues&quot;: [ # Output only. TrajectoryInOrderMatch metric values.
6336 { # TrajectoryInOrderMatch metric value for an instance.
6337 &quot;score&quot;: 3.14, # Output only. TrajectoryInOrderMatch score.
6338 },
6339 ],
6340 },
6341 &quot;trajectoryPrecisionResults&quot;: { # Results for TrajectoryPrecision metric. # Result for trajectory precision metric.
6342 &quot;trajectoryPrecisionMetricValues&quot;: [ # Output only. TrajectoryPrecision metric values.
6343 { # TrajectoryPrecision metric value for an instance.
6344 &quot;score&quot;: 3.14, # Output only. TrajectoryPrecision score.
6345 },
6346 ],
6347 },
6348 &quot;trajectoryRecallResults&quot;: { # Results for TrajectoryRecall metric. # Results for trajectory recall metric.
6349 &quot;trajectoryRecallMetricValues&quot;: [ # Output only. TrajectoryRecall metric values.
6350 { # TrajectoryRecall metric value for an instance.
6351 &quot;score&quot;: 3.14, # Output only. TrajectoryRecall score.
6352 },
6353 ],
6354 },
6355 &quot;trajectorySingleToolUseResults&quot;: { # Results for TrajectorySingleToolUse metric. # Results for trajectory single tool use metric.
6356 &quot;trajectorySingleToolUseMetricValues&quot;: [ # Output only. TrajectorySingleToolUse metric values.
6357 { # TrajectorySingleToolUse metric value for an instance.
6358 &quot;score&quot;: 3.14, # Output only. TrajectorySingleToolUse score.
6359 },
6360 ],
6361 },
6362 }</pre>
6363 </div>
6364
6365 <div class="method">
6366 <code class="details" id="generateInstanceRubrics">generateInstanceRubrics(location, body=None, x__xgafv=None)</code>
6367 <pre>Generates rubrics for a given prompt. A rubric represents a single testable criterion for evaluation. One input prompt could have multiple rubrics This RPC allows users to get suggested rubrics based on provided prompt, which can then be reviewed and used for subsequent evaluations.
6368
6369 Args:
6370 location: string, Required. The resource name of the Location to generate rubrics from. Format: `projects/{project}/locations/{location}` (required)
6371 body: object, The request body.
6372 The object takes the form of:
6373
6374 { # Request message for EvaluationService.GenerateInstanceRubrics.
6375 &quot;agentConfig&quot;: { # Deprecated: Use `google.cloud.aiplatform.master.AgentConfig` in `agent_eval_data` instead. Configuration for an Agent. # Optional. Agent configuration, required for agent-based rubric generation.
6376 &quot;agentId&quot;: &quot;A String&quot;, # Optional. Unique identifier of the agent. This ID is used to refer to this agent, e.g., in AgentEvent.author, or in the `sub_agents` field. It must be unique within the `agents` map.
6377 &quot;agentType&quot;: &quot;A String&quot;, # Optional. The type or class of the agent (e.g., &quot;LlmAgent&quot;, &quot;RouterAgent&quot;, &quot;ToolUseAgent&quot;). Useful for the autorater to understand the expected behavior of the agent.
6378 &quot;description&quot;: &quot;A String&quot;, # Optional. A high-level description of the agent&#x27;s role and responsibilities. Critical for evaluating if the agent is routing tasks correctly.
6379 &quot;developerInstruction&quot;: { # Instance data used to populate placeholders in a metric prompt template. # Optional. Contains instructions from the developer for the agent. Can be static or a dynamic prompt template used with the `AgentEvent.state_delta` field.
6380 &quot;contents&quot;: { # List of standard Content messages from Gemini API. # List of Gemini content data.
6381 &quot;contents&quot;: [ # Optional. Repeated contents.
6382 { # 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.
6383 &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.
6384 { # 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.
6385 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
6386 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
6387 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
6388 },
6389 &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.
6390 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
6391 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
6392 },
6393 &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.
6394 &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.
6395 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
6396 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
6397 },
6398 &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.
6399 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
6400 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
6401 },
6402 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
6403 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
6404 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
6405 { # Partial argument value of the function call.
6406 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
6407 &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;.
6408 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
6409 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
6410 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
6411 &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.
6412 },
6413 ],
6414 &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.
6415 },
6416 &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.
6417 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
6418 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
6419 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
6420 { # 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.
6421 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
6422 &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.
6423 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
6424 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
6425 },
6426 &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.
6427 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
6428 &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.
6429 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
6430 },
6431 },
6432 ],
6433 &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.
6434 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
6435 },
6436 &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.
6437 },
6438 &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.
6439 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
6440 &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.
6441 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
6442 },
6443 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
6444 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
6445 },
6446 &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.
6447 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
6448 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
6449 &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.
6450 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
6451 &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].
6452 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
6453 },
6454 },
6455 ],
6456 &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;.
6457 },
6458 ],
6459 },
6460 &quot;text&quot;: &quot;A String&quot;, # Text data.
6461 },
6462 &quot;subAgents&quot;: [ # Optional. The list of valid agent IDs (names) that this agent can delegate to. This defines the directed edges in the agent system graph topology.
6463 &quot;A String&quot;,
6464 ],
6465 &quot;tools&quot;: { # Represents a list of tools for an agent. # List of tools.
6466 &quot;tool&quot;: [ # Optional. List of tools: each tool can have multiple function declarations.
6467 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
6468 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
6469 },
6470 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
6471 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
6472 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
6473 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
6474 &quot;A String&quot;,
6475 ],
6476 },
6477 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
6478 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
6479 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
6480 &quot;A String&quot;,
6481 ],
6482 },
6483 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
6484 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
6485 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
6486 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
6487 },
6488 },
6489 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
6490 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
6491 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
6492 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
6493 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
6494 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
6495 &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.
6496 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
6497 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
6498 ],
6499 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
6500 &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.
6501 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
6502 },
6503 &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.
6504 &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;]}`
6505 &quot;A String&quot;,
6506 ],
6507 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
6508 &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.
6509 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
6510 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
6511 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
6512 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
6513 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
6514 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
6515 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
6516 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
6517 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
6518 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
6519 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
6520 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
6521 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
6522 },
6523 &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.
6524 &quot;A String&quot;,
6525 ],
6526 &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
6527 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
6528 &quot;A String&quot;,
6529 ],
6530 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
6531 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
6532 },
6533 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
6534 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
6535 &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.
6536 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
6537 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
6538 ],
6539 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
6540 &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.
6541 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
6542 },
6543 &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.
6544 &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;]}`
6545 &quot;A String&quot;,
6546 ],
6547 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
6548 &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.
6549 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
6550 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
6551 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
6552 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
6553 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
6554 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
6555 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
6556 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
6557 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
6558 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
6559 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
6560 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
6561 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
6562 },
6563 &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.
6564 &quot;A String&quot;,
6565 ],
6566 &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
6567 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
6568 &quot;A String&quot;,
6569 ],
6570 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
6571 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
6572 },
6573 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
6574 },
6575 ],
6576 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
6577 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
6578 },
6579 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
6580 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
6581 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
6582 &quot;A String&quot;,
6583 ],
6584 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
6585 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
6586 },
6587 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
6588 },
6589 },
6590 },
6591 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
6592 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
6593 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
6594 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
6595 },
6596 },
6597 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
6598 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
6599 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
6600 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
6601 },
6602 },
6603 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
6604 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
6605 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
6606 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
6607 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
6608 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
6609 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
6610 },
6611 },
6612 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
6613 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
6614 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
6615 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
6616 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
6617 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
6618 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
6619 },
6620 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
6621 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
6622 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
6623 },
6624 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
6625 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
6626 },
6627 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
6628 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
6629 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
6630 },
6631 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
6632 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
6633 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
6634 },
6635 },
6636 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
6637 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
6638 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
6639 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
6640 },
6641 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
6642 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
6643 },
6644 },
6645 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
6646 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
6647 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
6648 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
6649 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
6650 },
6651 ],
6652 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
6653 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
6654 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
6655 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
6656 },
6657 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
6658 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
6659 &quot;A String&quot;,
6660 ],
6661 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
6662 { # The definition of the Rag resource.
6663 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
6664 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
6665 &quot;A String&quot;,
6666 ],
6667 },
6668 ],
6669 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
6670 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
6671 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
6672 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
6673 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
6674 },
6675 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
6676 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
6677 },
6678 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
6679 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
6680 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
6681 },
6682 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
6683 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
6684 },
6685 },
6686 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
6687 },
6688 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
6689 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
6690 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
6691 },
6692 },
6693 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
6694 },
6695 },
6696 ],
6697 },
6698 &quot;toolsText&quot;: &quot;A String&quot;, # A JSON string containing a list of tools available to an agent with info such as name, description, parameters and required parameters.
6699 },
6700 &quot;contents&quot;: [ # Required. The prompt to generate rubrics from. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.
6701 { # 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.
6702 &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.
6703 { # 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.
6704 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
6705 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
6706 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
6707 },
6708 &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.
6709 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
6710 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
6711 },
6712 &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.
6713 &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.
6714 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
6715 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
6716 },
6717 &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.
6718 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
6719 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
6720 },
6721 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
6722 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
6723 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
6724 { # Partial argument value of the function call.
6725 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
6726 &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;.
6727 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
6728 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
6729 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
6730 &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.
6731 },
6732 ],
6733 &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.
6734 },
6735 &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.
6736 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
6737 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
6738 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
6739 { # 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.
6740 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
6741 &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.
6742 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
6743 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
6744 },
6745 &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.
6746 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
6747 &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.
6748 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
6749 },
6750 },
6751 ],
6752 &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.
6753 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
6754 },
6755 &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.
6756 },
6757 &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.
6758 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
6759 &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.
6760 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
6761 },
6762 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
6763 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
6764 },
6765 &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.
6766 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
6767 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
6768 &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.
6769 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
6770 &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].
6771 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
6772 },
6773 },
6774 ],
6775 &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;.
6776 },
6777 ],
6778 &quot;location&quot;: &quot;A String&quot;, # Required. The resource name of the Location to generate rubrics from. Format: `projects/{project}/locations/{location}`
6779 &quot;metricResourceName&quot;: &quot;A String&quot;, # Optional. The resource name of a registered metric. Rubric generation using predefined metric spec or LLMBasedMetricSpec is supported. If this field is set, the configuration provided in this field is used for rubric generation. The `predefined_rubric_generation_spec` and `rubric_generation_spec` fields will be ignored.
6780 &quot;predefinedRubricGenerationSpec&quot;: { # The spec for a pre-defined metric. # Optional. Specification for using the rubric generation configs of a pre-defined metric, e.g. &quot;generic_quality_v1&quot; and &quot;instruction_following_v1&quot;. Some of the configs may be only used in rubric generation and not supporting evaluation, e.g. &quot;fully_customized_generic_quality_v1&quot;. If this field is set, the `rubric_generation_spec` field will be ignored.
6781 &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;.
6782 &quot;metricSpecParameters&quot;: { # Optional. The parameters needed to run the pre-defined metric.
6783 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
6784 },
6785 },
6786 &quot;rubricGenerationSpec&quot;: { # Specification for how rubrics should be generated. # Optional. Specification for how the rubrics should be generated.
6787 &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.
6788 &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}`
6789 &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.
6790 &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.
6791 &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.
6792 &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.
6793 &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.
6794 &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].
6795 &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.
6796 &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;
6797 &quot;imageOutputOptions&quot;: { # The image output format for generated images. # Optional. The image output format for generated images.
6798 &quot;compressionQuality&quot;: 42, # Optional. The compression quality of the output image.
6799 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The image format that the output should be saved as.
6800 },
6801 &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`.
6802 &quot;personGeneration&quot;: &quot;A String&quot;, # Optional. Controls whether the model can generate people.
6803 &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.
6804 },
6805 &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.
6806 &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.
6807 &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.
6808 &quot;modelConfig&quot;: { # Config for model selection. # Optional. Config for model selection.
6809 &quot;featureSelectionPreference&quot;: &quot;A String&quot;, # Required. Feature selection preference.
6810 },
6811 &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].
6812 &quot;responseFormat&quot;: [ # Optional. New response format field for the model to configure output formatting and delivery.
6813 { # Configuration for the model to configure output formatting and delivery.
6814 &quot;audio&quot;: { # Configuration for audio-specific output formatting. # Audio output format.
6815 &quot;bitRate&quot;: 42, # Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
6816 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
6817 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the audio output.
6818 &quot;sampleRate&quot;: 42, # Optional. Sample rate for the generated audio in Hertz.
6819 },
6820 &quot;image&quot;: { # Configuration for image-specific output formatting. # Image output format.
6821 &quot;aspectRatio&quot;: &quot;A String&quot;, # Optional. The aspect ratio for the image output.
6822 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
6823 &quot;imageSize&quot;: &quot;A String&quot;, # Optional. The size of the image output.
6824 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The MIME type of the image output.
6825 },
6826 &quot;text&quot;: { # Configuration for text-specific output formatting. # Text output format.
6827 &quot;mimeType&quot;: &quot;A String&quot;, # Optional. The IANA standard MIME type of the response.
6828 &quot;schema&quot;: &quot;&quot;, # Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
6829 },
6830 &quot;video&quot;: { # Configuration for video-specific output formatting. # Video output format.
6831 &quot;aspectRatio&quot;: &quot;A String&quot;, # The aspect ratio for the video output.
6832 &quot;delivery&quot;: &quot;A String&quot;, # Optional. Delivery mode for the generated content.
6833 &quot;duration&quot;: &quot;A String&quot;, # Optional. The duration for the video output.
6834 &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.
6835 },
6836 },
6837 ],
6838 &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.
6839 &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.
6840 &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.
6841 &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.
6842 &quot;A String&quot;,
6843 ],
6844 &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.
6845 &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.
6846 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
6847 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
6848 ],
6849 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
6850 &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.
6851 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
6852 },
6853 &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.
6854 &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;]}`
6855 &quot;A String&quot;,
6856 ],
6857 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
6858 &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.
6859 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
6860 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
6861 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
6862 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
6863 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
6864 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
6865 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
6866 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
6867 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
6868 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
6869 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
6870 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
6871 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
6872 },
6873 &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.
6874 &quot;A String&quot;,
6875 ],
6876 &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
6877 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
6878 &quot;A String&quot;,
6879 ],
6880 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
6881 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
6882 },
6883 &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.
6884 &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.
6885 &quot;modelRoutingPreference&quot;: &quot;A String&quot;, # The model routing preference.
6886 },
6887 &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.
6888 &quot;modelName&quot;: &quot;A String&quot;, # The name of the model to use. Only public LLM models are accepted.
6889 },
6890 },
6891 &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.
6892 &quot;speechConfig&quot;: { # Configuration for speech generation. # Optional. The speech generation config.
6893 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The language code (ISO 639-1) for the speech synthesis.
6894 &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`.
6895 &quot;speakerVoiceConfigs&quot;: [ # Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
6896 { # Configuration for a single speaker in a multi-speaker setup.
6897 &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.
6898 &quot;voiceConfig&quot;: { # Configuration for a voice. # Required. The configuration for the voice of this speaker.
6899 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
6900 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
6901 },
6902 &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.
6903 &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.
6904 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
6905 },
6906 },
6907 },
6908 ],
6909 },
6910 &quot;voiceConfig&quot;: { # Configuration for a voice. # The configuration for the voice to use.
6911 &quot;prebuiltVoiceConfig&quot;: { # Configuration for a prebuilt voice. # The configuration for a prebuilt voice.
6912 &quot;voiceName&quot;: &quot;A String&quot;, # The name of the prebuilt voice to use.
6913 },
6914 &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.
6915 &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.
6916 &quot;voiceSampleAudio&quot;: &quot;A String&quot;, # Optional. The sample of the custom voice.
6917 },
6918 },
6919 },
6920 &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.
6921 &quot;A String&quot;,
6922 ],
6923 &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].
6924 &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.
6925 &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.
6926 &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.
6927 &quot;thinkingLevel&quot;: &quot;A String&quot;, # Optional. The number of thoughts tokens that the model should generate.
6928 },
6929 &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.
6930 &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.
6931 },
6932 &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.
6933 },
6934 &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.
6935 &quot;rubricContentType&quot;: &quot;A String&quot;, # The type of rubric content to be generated.
6936 &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.
6937 &quot;A String&quot;,
6938 ],
6939 },
6940 }
6941
6942 x__xgafv: string, V1 error format.
6943 Allowed values
6944 1 - v1 error format
6945 2 - v2 error format
6946
6947 Returns:
6948 An object of the form:
6949
6950 { # Response message for EvaluationService.GenerateInstanceRubrics.
6951 &quot;generatedRubrics&quot;: [ # Output only. A list of generated rubrics.
6952 { # Message representing a single testable criterion for evaluation. One input prompt could have multiple rubrics.
6953 &quot;content&quot;: { # Content of the rubric, defining the testable criteria. # Required. The actual testable criteria for the rubric.
6954 &quot;property&quot;: { # Defines criteria based on a specific property. # Evaluation criteria based on a specific property.
6955 &quot;description&quot;: &quot;A String&quot;, # Description of the property being evaluated. Example: &quot;The model&#x27;s response is grammatically correct.&quot;
6956 },
6957 },
6958 &quot;importance&quot;: &quot;A String&quot;, # Optional. The relative importance of this rubric.
6959 &quot;rubricId&quot;: &quot;A String&quot;, # Unique identifier for the rubric. This ID is used to refer to this rubric, e.g., in RubricVerdict.
6960 &quot;type&quot;: &quot;A String&quot;, # Optional. A type designator for the rubric, which can inform how it&#x27;s evaluated or interpreted by systems or users. It&#x27;s recommended to use consistent, well-defined, upper snake_case strings. Examples: &quot;SUMMARIZATION_QUALITY&quot;, &quot;SAFETY_HARMFUL_CONTENT&quot;, &quot;INSTRUCTION_ADHERENCE&quot;.
6961 },
6962 ],
6963 }</pre>
6964 </div>
6965
6966 <div class="method">
6967 <code class="details" id="generateLossClusters">generateLossClusters(location, body=None, x__xgafv=None)</code>
6968 <pre>Generates loss clusters from evaluation results. This is a statelss API method that would not modify the EvaluationSet resource.
6969
6970 Args:
6971 location: string, Required. The resource name of the Location. Format: `projects/{project}/locations/{location}` (required)
6972 body: object, The request body.
6973 The object takes the form of:
6974
6975 { # Request message for EvaluationAnalyticsService.GenerateLossClusters.
6976 &quot;configs&quot;: [ # Required. Configuration for the analysis algorithm. Analysis for multiple metrics and multiple candidates could be specified.
6977 { # Configuration for the loss analysis job.
6978 &quot;candidate&quot;: &quot;A String&quot;, # Required. The candidate model/agent to analyze (e.g., &quot;gemini-3.0-pro&quot;). This targets the specific CandidateResult within the EvaluationResult.
6979 &quot;metric&quot;: &quot;A String&quot;, # Required. The metric to analyze (e.g., &quot;tool_use_quality&quot;). This filters the EvaluationItems in the EvalSet to only those where EvaluationResult.metric matches this value.
6980 },
6981 ],
6982 &quot;evaluationSet&quot;: &quot;A String&quot;, # Reference to a persisted EvaluationSet. The service will read items from this set.
6983 &quot;inlineResults&quot;: { # A wrapper to allow providing a list of items inline. # Inline evaluation results. Useful for ephemeral analysis in notebooks/SDKs where data isn&#x27;t persisted.
6984 &quot;evaluationResults&quot;: [ # Required. The list of evaluation results to analyze.
6985 { # Evaluation result.
6986 &quot;candidateResults&quot;: [ # Optional. The results for the metric.
6987 { # Result for a single candidate.
6988 &quot;additionalResults&quot;: &quot;&quot;, # Optional. Additional results for the metric.
6989 &quot;candidate&quot;: &quot;A String&quot;, # Required. The candidate that is being evaluated. The value is the same as the candidate name in the EvaluationRequest.
6990 &quot;explanation&quot;: &quot;A String&quot;, # Optional. The explanation for the metric.
6991 &quot;metric&quot;: &quot;A String&quot;, # Required. The metric that was evaluated.
6992 &quot;rubricVerdicts&quot;: [ # Optional. The rubric verdicts for the metric.
6993 { # Represents the verdict of an evaluation against a single rubric.
6994 &quot;evaluatedRubric&quot;: { # Message representing a single testable criterion for evaluation. One input prompt could have multiple rubrics. # Required. The full rubric definition that was evaluated. Storing this ensures the verdict is self-contained and understandable, especially if the original rubric definition changes or was dynamically generated.
6995 &quot;content&quot;: { # Content of the rubric, defining the testable criteria. # Required. The actual testable criteria for the rubric.
6996 &quot;property&quot;: { # Defines criteria based on a specific property. # Evaluation criteria based on a specific property.
6997 &quot;description&quot;: &quot;A String&quot;, # Description of the property being evaluated. Example: &quot;The model&#x27;s response is grammatically correct.&quot;
6998 },
6999 },
7000 &quot;importance&quot;: &quot;A String&quot;, # Optional. The relative importance of this rubric.
7001 &quot;rubricId&quot;: &quot;A String&quot;, # Unique identifier for the rubric. This ID is used to refer to this rubric, e.g., in RubricVerdict.
7002 &quot;type&quot;: &quot;A String&quot;, # Optional. A type designator for the rubric, which can inform how it&#x27;s evaluated or interpreted by systems or users. It&#x27;s recommended to use consistent, well-defined, upper snake_case strings. Examples: &quot;SUMMARIZATION_QUALITY&quot;, &quot;SAFETY_HARMFUL_CONTENT&quot;, &quot;INSTRUCTION_ADHERENCE&quot;.
7003 },
7004 &quot;reasoning&quot;: &quot;A String&quot;, # Optional. Human-readable reasoning or explanation for the verdict. This can include specific examples or details from the evaluated content that justify the given verdict.
7005 &quot;verdict&quot;: True or False, # Required. Outcome of the evaluation against the rubric, represented as a boolean. `true` indicates a &quot;Pass&quot;, `false` indicates a &quot;Fail&quot;.
7006 },
7007 ],
7008 &quot;score&quot;: 3.14, # Optional. The score for the metric.
7009 },
7010 ],
7011 &quot;evaluationRequest&quot;: &quot;A String&quot;, # Required. The request item that was evaluated. Format: projects/{project}/locations/{location}/evaluationItems/{evaluation_item}
7012 &quot;evaluationRun&quot;: &quot;A String&quot;, # Required. The evaluation run that was used to generate the result. Format: projects/{project}/locations/{location}/evaluationRuns/{evaluation_run}
7013 &quot;metadata&quot;: &quot;&quot;, # Optional. Metadata about the evaluation result.
7014 &quot;metric&quot;: &quot;A String&quot;, # Required. The metric that was evaluated.
7015 &quot;request&quot;: { # A single evaluation request supporting input for both single-turn model generation and multi-turn agent execution traces. Valid input modes: 1. Inference Mode: `prompt` is set (containing text or AgentData context). 2. Offline Eval Mode: `prompt` is unset, and `candidate_responses` contains `agent_data` (the completed execution trace). Validation Rule: Either `prompt` must be set, OR at least one of the `candidate_responses` must contain `agent_data`. # Required. The request that was evaluated.
7016 &quot;candidateResponses&quot;: [ # Optional. Responses from model under test and other baseline models for comparison.
7017 { # Responses from model or agent.
7018 &quot;agentData&quot;: { # Represents data specific to multi-turn agent evaluations. # Optional. Represents the complete execution trace of a multi-turn conversation, which can involve single or multiple agents. This field is used to provide the full output of an agent&#x27;s run, including all turns and events, for direct evaluation.
7019 &quot;agents&quot;: { # Optional. A map containing the static configurations for each agent in the system. Key: agent_id (matches the `author` field in events). Value: The static configuration of the agent.
7020 &quot;a_key&quot;: { # Represents configuration for an Agent.
7021 &quot;agentId&quot;: &quot;A String&quot;, # Required. Unique identifier of the agent. This ID is used to refer to this agent, e.g., in AgentEvent.author, or in the `sub_agents` field. It must be unique within the `agents` map.
7022 &quot;agentType&quot;: &quot;A String&quot;, # Optional. The type or class of the agent (e.g., &quot;LlmAgent&quot;, &quot;RouterAgent&quot;, &quot;ToolUseAgent&quot;). Useful for the autorater to understand the expected behavior of the agent.
7023 &quot;description&quot;: &quot;A String&quot;, # Optional. A high-level description of the agent&#x27;s role and responsibilities. Critical for evaluating if the agent is routing tasks correctly.
7024 &quot;instruction&quot;: &quot;A String&quot;, # Optional. Provides instructions for the LLM model, guiding the agent&#x27;s behavior. Can be static or dynamic. Dynamic instructions can contain placeholders like {variable_name} that will be resolved at runtime using the `AgentEvent.state_delta` field.
7025 &quot;subAgents&quot;: [ # Optional. The list of valid agent IDs that this agent can delegate to. This defines the directed edges in the multi-agent system graph topology.
7026 &quot;A String&quot;,
7027 ],
7028 &quot;tools&quot;: [ # Optional. The list of tools available to this agent.
7029 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
7030 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
7031 },
7032 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
7033 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
7034 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
7035 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
7036 &quot;A String&quot;,
7037 ],
7038 },
7039 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
7040 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
7041 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
7042 &quot;A String&quot;,
7043 ],
7044 },
7045 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
7046 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
7047 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
7048 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
7049 },
7050 },
7051 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
7052 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
7053 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
7054 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
7055 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
7056 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
7057 &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.
7058 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
7059 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7060 ],
7061 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
7062 &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.
7063 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7064 },
7065 &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.
7066 &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;]}`
7067 &quot;A String&quot;,
7068 ],
7069 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
7070 &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.
7071 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
7072 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
7073 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
7074 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
7075 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
7076 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
7077 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
7078 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
7079 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
7080 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
7081 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
7082 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
7083 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7084 },
7085 &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.
7086 &quot;A String&quot;,
7087 ],
7088 &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
7089 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
7090 &quot;A String&quot;,
7091 ],
7092 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
7093 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
7094 },
7095 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
7096 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
7097 &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.
7098 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
7099 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7100 ],
7101 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
7102 &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.
7103 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7104 },
7105 &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.
7106 &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;]}`
7107 &quot;A String&quot;,
7108 ],
7109 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
7110 &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.
7111 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
7112 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
7113 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
7114 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
7115 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
7116 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
7117 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
7118 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
7119 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
7120 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
7121 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
7122 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
7123 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7124 },
7125 &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.
7126 &quot;A String&quot;,
7127 ],
7128 &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
7129 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
7130 &quot;A String&quot;,
7131 ],
7132 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
7133 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
7134 },
7135 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
7136 },
7137 ],
7138 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
7139 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
7140 },
7141 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
7142 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
7143 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
7144 &quot;A String&quot;,
7145 ],
7146 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
7147 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
7148 },
7149 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
7150 },
7151 },
7152 },
7153 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
7154 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
7155 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
7156 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
7157 },
7158 },
7159 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
7160 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
7161 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
7162 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
7163 },
7164 },
7165 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
7166 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
7167 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
7168 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
7169 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
7170 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
7171 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
7172 },
7173 },
7174 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
7175 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
7176 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
7177 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
7178 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
7179 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
7180 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
7181 },
7182 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
7183 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
7184 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
7185 },
7186 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
7187 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
7188 },
7189 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
7190 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
7191 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
7192 },
7193 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
7194 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
7195 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
7196 },
7197 },
7198 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
7199 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
7200 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
7201 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
7202 },
7203 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
7204 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
7205 },
7206 },
7207 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
7208 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
7209 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
7210 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
7211 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
7212 },
7213 ],
7214 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
7215 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
7216 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
7217 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
7218 },
7219 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
7220 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
7221 &quot;A String&quot;,
7222 ],
7223 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
7224 { # The definition of the Rag resource.
7225 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
7226 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
7227 &quot;A String&quot;,
7228 ],
7229 },
7230 ],
7231 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
7232 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
7233 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
7234 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
7235 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
7236 },
7237 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
7238 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
7239 },
7240 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
7241 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
7242 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
7243 },
7244 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
7245 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
7246 },
7247 },
7248 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
7249 },
7250 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
7251 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
7252 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
7253 },
7254 },
7255 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
7256 },
7257 },
7258 ],
7259 },
7260 },
7261 &quot;turns&quot;: [ # Optional. A chronological list of conversation turns. Each turn represents a logical execution cycle (e.g., User Input -&gt; Agent Response).
7262 { # Represents a single turn/invocation in the conversation.
7263 &quot;events&quot;: [ # Optional. The list of events that occurred during this turn.
7264 { # Represents a single event in the execution trace.
7265 &quot;activeTools&quot;: [ # Optional. The list of tools that were active/available to the agent at the time of this event. This overrides the `AgentConfig.tools` if set.
7266 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
7267 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
7268 },
7269 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
7270 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
7271 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
7272 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
7273 &quot;A String&quot;,
7274 ],
7275 },
7276 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
7277 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
7278 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
7279 &quot;A String&quot;,
7280 ],
7281 },
7282 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
7283 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
7284 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
7285 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
7286 },
7287 },
7288 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
7289 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
7290 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
7291 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
7292 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
7293 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
7294 &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.
7295 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
7296 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7297 ],
7298 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
7299 &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.
7300 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7301 },
7302 &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.
7303 &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;]}`
7304 &quot;A String&quot;,
7305 ],
7306 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
7307 &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.
7308 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
7309 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
7310 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
7311 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
7312 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
7313 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
7314 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
7315 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
7316 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
7317 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
7318 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
7319 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
7320 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7321 },
7322 &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.
7323 &quot;A String&quot;,
7324 ],
7325 &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
7326 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
7327 &quot;A String&quot;,
7328 ],
7329 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
7330 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
7331 },
7332 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
7333 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
7334 &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.
7335 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
7336 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7337 ],
7338 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
7339 &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.
7340 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7341 },
7342 &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.
7343 &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;]}`
7344 &quot;A String&quot;,
7345 ],
7346 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
7347 &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.
7348 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
7349 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
7350 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
7351 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
7352 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
7353 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
7354 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
7355 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
7356 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
7357 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
7358 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
7359 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
7360 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7361 },
7362 &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.
7363 &quot;A String&quot;,
7364 ],
7365 &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
7366 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
7367 &quot;A String&quot;,
7368 ],
7369 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
7370 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
7371 },
7372 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
7373 },
7374 ],
7375 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
7376 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
7377 },
7378 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
7379 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
7380 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
7381 &quot;A String&quot;,
7382 ],
7383 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
7384 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
7385 },
7386 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
7387 },
7388 },
7389 },
7390 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
7391 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
7392 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
7393 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
7394 },
7395 },
7396 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
7397 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
7398 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
7399 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
7400 },
7401 },
7402 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
7403 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
7404 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
7405 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
7406 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
7407 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
7408 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
7409 },
7410 },
7411 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
7412 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
7413 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
7414 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
7415 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
7416 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
7417 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
7418 },
7419 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
7420 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
7421 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
7422 },
7423 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
7424 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
7425 },
7426 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
7427 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
7428 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
7429 },
7430 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
7431 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
7432 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
7433 },
7434 },
7435 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
7436 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
7437 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
7438 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
7439 },
7440 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
7441 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
7442 },
7443 },
7444 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
7445 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
7446 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
7447 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
7448 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
7449 },
7450 ],
7451 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
7452 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
7453 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
7454 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
7455 },
7456 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
7457 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
7458 &quot;A String&quot;,
7459 ],
7460 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
7461 { # The definition of the Rag resource.
7462 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
7463 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
7464 &quot;A String&quot;,
7465 ],
7466 },
7467 ],
7468 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
7469 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
7470 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
7471 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
7472 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
7473 },
7474 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
7475 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
7476 },
7477 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
7478 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
7479 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
7480 },
7481 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
7482 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
7483 },
7484 },
7485 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
7486 },
7487 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
7488 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
7489 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
7490 },
7491 },
7492 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
7493 },
7494 },
7495 ],
7496 &quot;author&quot;: &quot;A String&quot;, # Required. The ID of the agent or entity that generated this event. Use &quot;user&quot; to denote events generated by the end-user.
7497 &quot;content&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. # Required. The content of the event (e.g., text response, tool call, tool response).
7498 &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.
7499 { # 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.
7500 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
7501 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
7502 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
7503 },
7504 &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.
7505 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
7506 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
7507 },
7508 &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.
7509 &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.
7510 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
7511 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
7512 },
7513 &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.
7514 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
7515 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
7516 },
7517 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
7518 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
7519 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
7520 { # Partial argument value of the function call.
7521 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
7522 &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;.
7523 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
7524 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
7525 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
7526 &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.
7527 },
7528 ],
7529 &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.
7530 },
7531 &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.
7532 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
7533 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
7534 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
7535 { # 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.
7536 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
7537 &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.
7538 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
7539 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
7540 },
7541 &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.
7542 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
7543 &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.
7544 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
7545 },
7546 },
7547 ],
7548 &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.
7549 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
7550 },
7551 &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.
7552 },
7553 &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.
7554 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
7555 &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.
7556 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
7557 },
7558 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
7559 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
7560 },
7561 &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.
7562 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
7563 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
7564 &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.
7565 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
7566 &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].
7567 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
7568 },
7569 },
7570 ],
7571 &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;.
7572 },
7573 &quot;eventTime&quot;: &quot;A String&quot;, # Optional. The timestamp when the event occurred.
7574 &quot;stateDelta&quot;: { # Optional. The change in the session state caused by this event. This is a key-value map of fields that were modified or added by the event.
7575 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
7576 },
7577 },
7578 ],
7579 &quot;turnId&quot;: &quot;A String&quot;, # Optional. A unique identifier for the turn. Useful for referencing specific turns across systems.
7580 &quot;turnIndex&quot;: 42, # Required. The 0-based index of the turn in the conversation sequence.
7581 },
7582 ],
7583 },
7584 &quot;candidate&quot;: &quot;A String&quot;, # Required. The name of the candidate that produced the response.
7585 &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. Error while scraping model or agent.
7586 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7587 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
7588 {
7589 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7590 },
7591 ],
7592 &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.
7593 },
7594 &quot;events&quot;: [ # Optional. Intermediate events (such as tool calls and responses) that led to the final response.
7595 { # 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.
7596 &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.
7597 { # 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.
7598 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
7599 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
7600 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
7601 },
7602 &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.
7603 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
7604 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
7605 },
7606 &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.
7607 &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.
7608 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
7609 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
7610 },
7611 &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.
7612 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
7613 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
7614 },
7615 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
7616 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
7617 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
7618 { # Partial argument value of the function call.
7619 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
7620 &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;.
7621 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
7622 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
7623 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
7624 &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.
7625 },
7626 ],
7627 &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.
7628 },
7629 &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.
7630 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
7631 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
7632 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
7633 { # 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.
7634 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
7635 &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.
7636 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
7637 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
7638 },
7639 &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.
7640 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
7641 &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.
7642 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
7643 },
7644 },
7645 ],
7646 &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.
7647 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
7648 },
7649 &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.
7650 },
7651 &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.
7652 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
7653 &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.
7654 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
7655 },
7656 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
7657 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
7658 },
7659 &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.
7660 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
7661 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
7662 &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.
7663 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
7664 &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].
7665 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
7666 },
7667 },
7668 ],
7669 &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;.
7670 },
7671 ],
7672 &quot;text&quot;: &quot;A String&quot;, # Text response.
7673 &quot;value&quot;: &quot;&quot;, # Fields and values that can be used to populate the response template.
7674 },
7675 ],
7676 &quot;goldenResponse&quot;: { # Responses from model or agent. # Optional. The Ideal response or ground truth.
7677 &quot;agentData&quot;: { # Represents data specific to multi-turn agent evaluations. # Optional. Represents the complete execution trace of a multi-turn conversation, which can involve single or multiple agents. This field is used to provide the full output of an agent&#x27;s run, including all turns and events, for direct evaluation.
7678 &quot;agents&quot;: { # Optional. A map containing the static configurations for each agent in the system. Key: agent_id (matches the `author` field in events). Value: The static configuration of the agent.
7679 &quot;a_key&quot;: { # Represents configuration for an Agent.
7680 &quot;agentId&quot;: &quot;A String&quot;, # Required. Unique identifier of the agent. This ID is used to refer to this agent, e.g., in AgentEvent.author, or in the `sub_agents` field. It must be unique within the `agents` map.
7681 &quot;agentType&quot;: &quot;A String&quot;, # Optional. The type or class of the agent (e.g., &quot;LlmAgent&quot;, &quot;RouterAgent&quot;, &quot;ToolUseAgent&quot;). Useful for the autorater to understand the expected behavior of the agent.
7682 &quot;description&quot;: &quot;A String&quot;, # Optional. A high-level description of the agent&#x27;s role and responsibilities. Critical for evaluating if the agent is routing tasks correctly.
7683 &quot;instruction&quot;: &quot;A String&quot;, # Optional. Provides instructions for the LLM model, guiding the agent&#x27;s behavior. Can be static or dynamic. Dynamic instructions can contain placeholders like {variable_name} that will be resolved at runtime using the `AgentEvent.state_delta` field.
7684 &quot;subAgents&quot;: [ # Optional. The list of valid agent IDs that this agent can delegate to. This defines the directed edges in the multi-agent system graph topology.
7685 &quot;A String&quot;,
7686 ],
7687 &quot;tools&quot;: [ # Optional. The list of tools available to this agent.
7688 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
7689 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
7690 },
7691 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
7692 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
7693 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
7694 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
7695 &quot;A String&quot;,
7696 ],
7697 },
7698 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
7699 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
7700 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
7701 &quot;A String&quot;,
7702 ],
7703 },
7704 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
7705 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
7706 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
7707 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
7708 },
7709 },
7710 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
7711 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
7712 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
7713 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
7714 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
7715 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
7716 &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.
7717 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
7718 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7719 ],
7720 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
7721 &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.
7722 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7723 },
7724 &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.
7725 &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;]}`
7726 &quot;A String&quot;,
7727 ],
7728 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
7729 &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.
7730 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
7731 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
7732 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
7733 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
7734 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
7735 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
7736 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
7737 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
7738 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
7739 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
7740 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
7741 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
7742 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7743 },
7744 &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.
7745 &quot;A String&quot;,
7746 ],
7747 &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
7748 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
7749 &quot;A String&quot;,
7750 ],
7751 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
7752 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
7753 },
7754 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
7755 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
7756 &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.
7757 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
7758 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7759 ],
7760 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
7761 &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.
7762 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7763 },
7764 &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.
7765 &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;]}`
7766 &quot;A String&quot;,
7767 ],
7768 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
7769 &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.
7770 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
7771 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
7772 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
7773 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
7774 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
7775 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
7776 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
7777 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
7778 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
7779 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
7780 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
7781 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
7782 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7783 },
7784 &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.
7785 &quot;A String&quot;,
7786 ],
7787 &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
7788 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
7789 &quot;A String&quot;,
7790 ],
7791 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
7792 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
7793 },
7794 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
7795 },
7796 ],
7797 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
7798 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
7799 },
7800 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
7801 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
7802 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
7803 &quot;A String&quot;,
7804 ],
7805 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
7806 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
7807 },
7808 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
7809 },
7810 },
7811 },
7812 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
7813 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
7814 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
7815 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
7816 },
7817 },
7818 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
7819 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
7820 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
7821 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
7822 },
7823 },
7824 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
7825 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
7826 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
7827 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
7828 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
7829 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
7830 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
7831 },
7832 },
7833 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
7834 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
7835 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
7836 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
7837 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
7838 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
7839 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
7840 },
7841 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
7842 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
7843 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
7844 },
7845 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
7846 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
7847 },
7848 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
7849 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
7850 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
7851 },
7852 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
7853 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
7854 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
7855 },
7856 },
7857 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
7858 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
7859 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
7860 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
7861 },
7862 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
7863 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
7864 },
7865 },
7866 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
7867 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
7868 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
7869 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
7870 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
7871 },
7872 ],
7873 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
7874 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
7875 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
7876 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
7877 },
7878 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
7879 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
7880 &quot;A String&quot;,
7881 ],
7882 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
7883 { # The definition of the Rag resource.
7884 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
7885 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
7886 &quot;A String&quot;,
7887 ],
7888 },
7889 ],
7890 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
7891 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
7892 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
7893 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
7894 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
7895 },
7896 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
7897 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
7898 },
7899 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
7900 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
7901 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
7902 },
7903 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
7904 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
7905 },
7906 },
7907 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
7908 },
7909 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
7910 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
7911 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
7912 },
7913 },
7914 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
7915 },
7916 },
7917 ],
7918 },
7919 },
7920 &quot;turns&quot;: [ # Optional. A chronological list of conversation turns. Each turn represents a logical execution cycle (e.g., User Input -&gt; Agent Response).
7921 { # Represents a single turn/invocation in the conversation.
7922 &quot;events&quot;: [ # Optional. The list of events that occurred during this turn.
7923 { # Represents a single event in the execution trace.
7924 &quot;activeTools&quot;: [ # Optional. The list of tools that were active/available to the agent at the time of this event. This overrides the `AgentConfig.tools` if set.
7925 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
7926 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
7927 },
7928 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
7929 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
7930 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
7931 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
7932 &quot;A String&quot;,
7933 ],
7934 },
7935 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
7936 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
7937 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
7938 &quot;A String&quot;,
7939 ],
7940 },
7941 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
7942 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
7943 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
7944 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
7945 },
7946 },
7947 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
7948 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
7949 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
7950 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
7951 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
7952 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
7953 &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.
7954 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
7955 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7956 ],
7957 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
7958 &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.
7959 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7960 },
7961 &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.
7962 &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;]}`
7963 &quot;A String&quot;,
7964 ],
7965 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
7966 &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.
7967 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
7968 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
7969 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
7970 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
7971 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
7972 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
7973 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
7974 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
7975 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
7976 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
7977 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
7978 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
7979 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7980 },
7981 &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.
7982 &quot;A String&quot;,
7983 ],
7984 &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
7985 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
7986 &quot;A String&quot;,
7987 ],
7988 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
7989 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
7990 },
7991 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
7992 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
7993 &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.
7994 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
7995 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
7996 ],
7997 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
7998 &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.
7999 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
8000 },
8001 &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.
8002 &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;]}`
8003 &quot;A String&quot;,
8004 ],
8005 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
8006 &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.
8007 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
8008 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
8009 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
8010 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
8011 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
8012 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
8013 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
8014 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
8015 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
8016 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
8017 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
8018 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
8019 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
8020 },
8021 &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.
8022 &quot;A String&quot;,
8023 ],
8024 &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
8025 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
8026 &quot;A String&quot;,
8027 ],
8028 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
8029 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
8030 },
8031 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
8032 },
8033 ],
8034 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
8035 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
8036 },
8037 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
8038 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
8039 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
8040 &quot;A String&quot;,
8041 ],
8042 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
8043 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
8044 },
8045 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
8046 },
8047 },
8048 },
8049 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
8050 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
8051 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
8052 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
8053 },
8054 },
8055 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
8056 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
8057 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
8058 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8059 },
8060 },
8061 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
8062 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
8063 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
8064 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
8065 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
8066 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
8067 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
8068 },
8069 },
8070 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
8071 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
8072 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
8073 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
8074 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
8075 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
8076 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
8077 },
8078 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
8079 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
8080 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
8081 },
8082 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
8083 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
8084 },
8085 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
8086 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
8087 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
8088 },
8089 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
8090 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
8091 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
8092 },
8093 },
8094 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
8095 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
8096 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
8097 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
8098 },
8099 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
8100 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
8101 },
8102 },
8103 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
8104 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
8105 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
8106 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
8107 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
8108 },
8109 ],
8110 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
8111 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
8112 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
8113 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
8114 },
8115 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
8116 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
8117 &quot;A String&quot;,
8118 ],
8119 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
8120 { # The definition of the Rag resource.
8121 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
8122 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
8123 &quot;A String&quot;,
8124 ],
8125 },
8126 ],
8127 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
8128 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
8129 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
8130 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
8131 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
8132 },
8133 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
8134 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
8135 },
8136 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
8137 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
8138 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
8139 },
8140 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
8141 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
8142 },
8143 },
8144 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
8145 },
8146 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
8147 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
8148 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
8149 },
8150 },
8151 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
8152 },
8153 },
8154 ],
8155 &quot;author&quot;: &quot;A String&quot;, # Required. The ID of the agent or entity that generated this event. Use &quot;user&quot; to denote events generated by the end-user.
8156 &quot;content&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. # Required. The content of the event (e.g., text response, tool call, tool response).
8157 &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.
8158 { # 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.
8159 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
8160 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
8161 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
8162 },
8163 &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.
8164 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
8165 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
8166 },
8167 &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.
8168 &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.
8169 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
8170 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8171 },
8172 &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.
8173 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
8174 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8175 },
8176 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
8177 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
8178 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
8179 { # Partial argument value of the function call.
8180 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
8181 &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;.
8182 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
8183 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
8184 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
8185 &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.
8186 },
8187 ],
8188 &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.
8189 },
8190 &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.
8191 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
8192 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
8193 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
8194 { # 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.
8195 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
8196 &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.
8197 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
8198 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8199 },
8200 &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.
8201 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
8202 &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.
8203 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8204 },
8205 },
8206 ],
8207 &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.
8208 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8209 },
8210 &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.
8211 },
8212 &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.
8213 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
8214 &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.
8215 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8216 },
8217 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
8218 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
8219 },
8220 &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.
8221 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
8222 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
8223 &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.
8224 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
8225 &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].
8226 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
8227 },
8228 },
8229 ],
8230 &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;.
8231 },
8232 &quot;eventTime&quot;: &quot;A String&quot;, # Optional. The timestamp when the event occurred.
8233 &quot;stateDelta&quot;: { # Optional. The change in the session state caused by this event. This is a key-value map of fields that were modified or added by the event.
8234 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8235 },
8236 },
8237 ],
8238 &quot;turnId&quot;: &quot;A String&quot;, # Optional. A unique identifier for the turn. Useful for referencing specific turns across systems.
8239 &quot;turnIndex&quot;: 42, # Required. The 0-based index of the turn in the conversation sequence.
8240 },
8241 ],
8242 },
8243 &quot;candidate&quot;: &quot;A String&quot;, # Required. The name of the candidate that produced the response.
8244 &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. Error while scraping model or agent.
8245 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
8246 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
8247 {
8248 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
8249 },
8250 ],
8251 &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.
8252 },
8253 &quot;events&quot;: [ # Optional. Intermediate events (such as tool calls and responses) that led to the final response.
8254 { # 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.
8255 &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.
8256 { # 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.
8257 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
8258 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
8259 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
8260 },
8261 &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.
8262 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
8263 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
8264 },
8265 &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.
8266 &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.
8267 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
8268 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8269 },
8270 &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.
8271 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
8272 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8273 },
8274 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
8275 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
8276 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
8277 { # Partial argument value of the function call.
8278 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
8279 &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;.
8280 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
8281 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
8282 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
8283 &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.
8284 },
8285 ],
8286 &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.
8287 },
8288 &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.
8289 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
8290 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
8291 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
8292 { # 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.
8293 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
8294 &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.
8295 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
8296 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8297 },
8298 &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.
8299 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
8300 &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.
8301 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8302 },
8303 },
8304 ],
8305 &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.
8306 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8307 },
8308 &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.
8309 },
8310 &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.
8311 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
8312 &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.
8313 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8314 },
8315 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
8316 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
8317 },
8318 &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.
8319 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
8320 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
8321 &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.
8322 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
8323 &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].
8324 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
8325 },
8326 },
8327 ],
8328 &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;.
8329 },
8330 ],
8331 &quot;text&quot;: &quot;A String&quot;, # Text response.
8332 &quot;value&quot;: &quot;&quot;, # Fields and values that can be used to populate the response template.
8333 },
8334 &quot;prompt&quot;: { # Prompt to be evaluated. This can represent a single-turn prompt or a multi-turn conversation for agent evaluations. # Optional. The request/prompt to evaluate.
8335 &quot;agentData&quot;: { # Represents data specific to multi-turn agent evaluations. # Optional. Represents the complete execution trace of a multi-turn conversation, which can involve single or multiple agents. This serves as the input context for agent scraping.
8336 &quot;agents&quot;: { # Optional. A map containing the static configurations for each agent in the system. Key: agent_id (matches the `author` field in events). Value: The static configuration of the agent.
8337 &quot;a_key&quot;: { # Represents configuration for an Agent.
8338 &quot;agentId&quot;: &quot;A String&quot;, # Required. Unique identifier of the agent. This ID is used to refer to this agent, e.g., in AgentEvent.author, or in the `sub_agents` field. It must be unique within the `agents` map.
8339 &quot;agentType&quot;: &quot;A String&quot;, # Optional. The type or class of the agent (e.g., &quot;LlmAgent&quot;, &quot;RouterAgent&quot;, &quot;ToolUseAgent&quot;). Useful for the autorater to understand the expected behavior of the agent.
8340 &quot;description&quot;: &quot;A String&quot;, # Optional. A high-level description of the agent&#x27;s role and responsibilities. Critical for evaluating if the agent is routing tasks correctly.
8341 &quot;instruction&quot;: &quot;A String&quot;, # Optional. Provides instructions for the LLM model, guiding the agent&#x27;s behavior. Can be static or dynamic. Dynamic instructions can contain placeholders like {variable_name} that will be resolved at runtime using the `AgentEvent.state_delta` field.
8342 &quot;subAgents&quot;: [ # Optional. The list of valid agent IDs that this agent can delegate to. This defines the directed edges in the multi-agent system graph topology.
8343 &quot;A String&quot;,
8344 ],
8345 &quot;tools&quot;: [ # Optional. The list of tools available to this agent.
8346 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
8347 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
8348 },
8349 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
8350 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
8351 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
8352 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
8353 &quot;A String&quot;,
8354 ],
8355 },
8356 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
8357 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
8358 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
8359 &quot;A String&quot;,
8360 ],
8361 },
8362 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
8363 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
8364 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
8365 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8366 },
8367 },
8368 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
8369 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
8370 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
8371 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
8372 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
8373 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
8374 &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.
8375 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
8376 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
8377 ],
8378 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
8379 &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.
8380 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
8381 },
8382 &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.
8383 &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;]}`
8384 &quot;A String&quot;,
8385 ],
8386 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
8387 &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.
8388 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
8389 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
8390 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
8391 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
8392 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
8393 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
8394 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
8395 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
8396 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
8397 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
8398 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
8399 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
8400 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
8401 },
8402 &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.
8403 &quot;A String&quot;,
8404 ],
8405 &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
8406 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
8407 &quot;A String&quot;,
8408 ],
8409 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
8410 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
8411 },
8412 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
8413 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
8414 &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.
8415 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
8416 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
8417 ],
8418 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
8419 &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.
8420 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
8421 },
8422 &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.
8423 &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;]}`
8424 &quot;A String&quot;,
8425 ],
8426 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
8427 &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.
8428 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
8429 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
8430 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
8431 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
8432 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
8433 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
8434 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
8435 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
8436 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
8437 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
8438 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
8439 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
8440 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
8441 },
8442 &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.
8443 &quot;A String&quot;,
8444 ],
8445 &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
8446 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
8447 &quot;A String&quot;,
8448 ],
8449 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
8450 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
8451 },
8452 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
8453 },
8454 ],
8455 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
8456 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
8457 },
8458 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
8459 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
8460 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
8461 &quot;A String&quot;,
8462 ],
8463 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
8464 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
8465 },
8466 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
8467 },
8468 },
8469 },
8470 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
8471 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
8472 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
8473 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
8474 },
8475 },
8476 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
8477 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
8478 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
8479 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8480 },
8481 },
8482 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
8483 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
8484 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
8485 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
8486 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
8487 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
8488 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
8489 },
8490 },
8491 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
8492 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
8493 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
8494 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
8495 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
8496 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
8497 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
8498 },
8499 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
8500 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
8501 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
8502 },
8503 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
8504 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
8505 },
8506 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
8507 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
8508 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
8509 },
8510 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
8511 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
8512 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
8513 },
8514 },
8515 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
8516 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
8517 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
8518 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
8519 },
8520 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
8521 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
8522 },
8523 },
8524 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
8525 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
8526 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
8527 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
8528 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
8529 },
8530 ],
8531 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
8532 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
8533 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
8534 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
8535 },
8536 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
8537 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
8538 &quot;A String&quot;,
8539 ],
8540 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
8541 { # The definition of the Rag resource.
8542 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
8543 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
8544 &quot;A String&quot;,
8545 ],
8546 },
8547 ],
8548 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
8549 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
8550 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
8551 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
8552 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
8553 },
8554 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
8555 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
8556 },
8557 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
8558 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
8559 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
8560 },
8561 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
8562 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
8563 },
8564 },
8565 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
8566 },
8567 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
8568 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
8569 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
8570 },
8571 },
8572 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
8573 },
8574 },
8575 ],
8576 },
8577 },
8578 &quot;turns&quot;: [ # Optional. A chronological list of conversation turns. Each turn represents a logical execution cycle (e.g., User Input -&gt; Agent Response).
8579 { # Represents a single turn/invocation in the conversation.
8580 &quot;events&quot;: [ # Optional. The list of events that occurred during this turn.
8581 { # Represents a single event in the execution trace.
8582 &quot;activeTools&quot;: [ # Optional. The list of tools that were active/available to the agent at the time of this event. This overrides the `AgentConfig.tools` if set.
8583 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
8584 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
8585 },
8586 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
8587 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
8588 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
8589 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
8590 &quot;A String&quot;,
8591 ],
8592 },
8593 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
8594 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
8595 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
8596 &quot;A String&quot;,
8597 ],
8598 },
8599 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
8600 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
8601 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
8602 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8603 },
8604 },
8605 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
8606 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
8607 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
8608 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
8609 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
8610 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
8611 &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.
8612 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
8613 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
8614 ],
8615 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
8616 &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.
8617 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
8618 },
8619 &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.
8620 &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;]}`
8621 &quot;A String&quot;,
8622 ],
8623 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
8624 &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.
8625 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
8626 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
8627 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
8628 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
8629 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
8630 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
8631 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
8632 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
8633 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
8634 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
8635 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
8636 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
8637 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
8638 },
8639 &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.
8640 &quot;A String&quot;,
8641 ],
8642 &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
8643 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
8644 &quot;A String&quot;,
8645 ],
8646 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
8647 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
8648 },
8649 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
8650 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
8651 &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.
8652 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
8653 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
8654 ],
8655 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
8656 &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.
8657 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
8658 },
8659 &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.
8660 &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;]}`
8661 &quot;A String&quot;,
8662 ],
8663 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
8664 &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.
8665 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
8666 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
8667 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
8668 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
8669 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
8670 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
8671 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
8672 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
8673 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
8674 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
8675 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
8676 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
8677 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
8678 },
8679 &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.
8680 &quot;A String&quot;,
8681 ],
8682 &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
8683 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
8684 &quot;A String&quot;,
8685 ],
8686 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
8687 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
8688 },
8689 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
8690 },
8691 ],
8692 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
8693 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
8694 },
8695 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
8696 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
8697 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
8698 &quot;A String&quot;,
8699 ],
8700 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
8701 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
8702 },
8703 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
8704 },
8705 },
8706 },
8707 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
8708 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
8709 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
8710 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
8711 },
8712 },
8713 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
8714 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
8715 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
8716 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8717 },
8718 },
8719 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
8720 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
8721 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
8722 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
8723 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
8724 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
8725 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
8726 },
8727 },
8728 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
8729 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
8730 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
8731 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
8732 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
8733 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
8734 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
8735 },
8736 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
8737 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
8738 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
8739 },
8740 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
8741 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
8742 },
8743 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
8744 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
8745 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
8746 },
8747 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
8748 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
8749 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
8750 },
8751 },
8752 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
8753 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
8754 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
8755 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
8756 },
8757 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
8758 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
8759 },
8760 },
8761 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
8762 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
8763 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
8764 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
8765 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
8766 },
8767 ],
8768 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
8769 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
8770 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
8771 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
8772 },
8773 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
8774 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
8775 &quot;A String&quot;,
8776 ],
8777 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
8778 { # The definition of the Rag resource.
8779 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
8780 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
8781 &quot;A String&quot;,
8782 ],
8783 },
8784 ],
8785 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
8786 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
8787 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
8788 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
8789 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
8790 },
8791 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
8792 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
8793 },
8794 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
8795 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
8796 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
8797 },
8798 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
8799 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
8800 },
8801 },
8802 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
8803 },
8804 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
8805 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
8806 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
8807 },
8808 },
8809 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
8810 },
8811 },
8812 ],
8813 &quot;author&quot;: &quot;A String&quot;, # Required. The ID of the agent or entity that generated this event. Use &quot;user&quot; to denote events generated by the end-user.
8814 &quot;content&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. # Required. The content of the event (e.g., text response, tool call, tool response).
8815 &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.
8816 { # 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.
8817 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
8818 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
8819 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
8820 },
8821 &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.
8822 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
8823 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
8824 },
8825 &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.
8826 &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.
8827 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
8828 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8829 },
8830 &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.
8831 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
8832 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8833 },
8834 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
8835 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
8836 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
8837 { # Partial argument value of the function call.
8838 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
8839 &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;.
8840 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
8841 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
8842 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
8843 &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.
8844 },
8845 ],
8846 &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.
8847 },
8848 &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.
8849 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
8850 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
8851 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
8852 { # 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.
8853 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
8854 &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.
8855 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
8856 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8857 },
8858 &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.
8859 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
8860 &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.
8861 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8862 },
8863 },
8864 ],
8865 &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.
8866 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8867 },
8868 &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.
8869 },
8870 &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.
8871 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
8872 &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.
8873 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8874 },
8875 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
8876 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
8877 },
8878 &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.
8879 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
8880 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
8881 &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.
8882 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
8883 &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].
8884 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
8885 },
8886 },
8887 ],
8888 &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;.
8889 },
8890 &quot;eventTime&quot;: &quot;A String&quot;, # Optional. The timestamp when the event occurred.
8891 &quot;stateDelta&quot;: { # Optional. The change in the session state caused by this event. This is a key-value map of fields that were modified or added by the event.
8892 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8893 },
8894 },
8895 ],
8896 &quot;turnId&quot;: &quot;A String&quot;, # Optional. A unique identifier for the turn. Useful for referencing specific turns across systems.
8897 &quot;turnIndex&quot;: 42, # Required. The 0-based index of the turn in the conversation sequence.
8898 },
8899 ],
8900 },
8901 &quot;promptTemplateData&quot;: { # Message to hold a prompt template and the values to populate the template. # Prompt template data.
8902 &quot;values&quot;: { # The values for fields in the prompt template.
8903 &quot;a_key&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.
8904 &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.
8905 { # 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.
8906 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
8907 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
8908 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
8909 },
8910 &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.
8911 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
8912 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
8913 },
8914 &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.
8915 &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.
8916 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
8917 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8918 },
8919 &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.
8920 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
8921 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8922 },
8923 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
8924 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
8925 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
8926 { # Partial argument value of the function call.
8927 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
8928 &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;.
8929 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
8930 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
8931 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
8932 &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.
8933 },
8934 ],
8935 &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.
8936 },
8937 &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.
8938 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
8939 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
8940 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
8941 { # 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.
8942 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
8943 &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.
8944 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
8945 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8946 },
8947 &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.
8948 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
8949 &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.
8950 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8951 },
8952 },
8953 ],
8954 &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.
8955 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
8956 },
8957 &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.
8958 },
8959 &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.
8960 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
8961 &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.
8962 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
8963 },
8964 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
8965 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
8966 },
8967 &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.
8968 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
8969 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
8970 &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.
8971 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
8972 &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].
8973 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
8974 },
8975 },
8976 ],
8977 &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;.
8978 },
8979 },
8980 },
8981 &quot;text&quot;: &quot;A String&quot;, # Text prompt.
8982 &quot;userScenario&quot;: { # User scenario to help simulate multi-turn agent running results. # Optional. The generated user scenario used to drive multi-turn agent running results.
8983 &quot;conversationPlan&quot;: &quot;A String&quot;, # Required. The plan for the conversation, used to drive the multi-turn agent run and generate the simulated agent evaluation dataset.
8984 &quot;startingPrompt&quot;: &quot;A String&quot;, # Required. The prompt that starts the conversation between the simulated user and the agent under test.
8985 },
8986 &quot;value&quot;: &quot;&quot;, # Fields and values that can be used to populate the prompt template.
8987 },
8988 &quot;rubrics&quot;: { # Optional. Named groups of rubrics associated with this prompt. The key is a user-defined name for the rubric group.
8989 &quot;a_key&quot;: { # A group of rubrics, used for grouping rubrics based on a metric or a version.
8990 &quot;displayName&quot;: &quot;A String&quot;, # Human-readable name for the group. This should be unique within a given context if used for display or selection. Example: &quot;Instruction Following V1&quot;, &quot;Content Quality - Summarization Task&quot;.
8991 &quot;groupId&quot;: &quot;A String&quot;, # Unique identifier for the group.
8992 &quot;rubrics&quot;: [ # Rubrics that are part of this group.
8993 { # Message representing a single testable criterion for evaluation. One input prompt could have multiple rubrics.
8994 &quot;content&quot;: { # Content of the rubric, defining the testable criteria. # Required. The actual testable criteria for the rubric.
8995 &quot;property&quot;: { # Defines criteria based on a specific property. # Evaluation criteria based on a specific property.
8996 &quot;description&quot;: &quot;A String&quot;, # Description of the property being evaluated. Example: &quot;The model&#x27;s response is grammatically correct.&quot;
8997 },
8998 },
8999 &quot;importance&quot;: &quot;A String&quot;, # Optional. The relative importance of this rubric.
9000 &quot;rubricId&quot;: &quot;A String&quot;, # Unique identifier for the rubric. This ID is used to refer to this rubric, e.g., in RubricVerdict.
9001 &quot;type&quot;: &quot;A String&quot;, # Optional. A type designator for the rubric, which can inform how it&#x27;s evaluated or interpreted by systems or users. It&#x27;s recommended to use consistent, well-defined, upper snake_case strings. Examples: &quot;SUMMARIZATION_QUALITY&quot;, &quot;SAFETY_HARMFUL_CONTENT&quot;, &quot;INSTRUCTION_ADHERENCE&quot;.
9002 },
9003 ],
9004 },
9005 },
9006 },
9007 },
9008 ],
9009 },
9010 }
9011
9012 x__xgafv: string, V1 error format.
9013 Allowed values
9014 1 - v1 error format
9015 2 - v2 error format
9016
9017 Returns:
9018 An object of the form:
9019
9020 { # This resource represents a long-running operation that is the result of a network API call.
9021 &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.
9022 &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.
9023 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
9024 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
9025 {
9026 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
9027 },
9028 ],
9029 &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.
9030 },
9031 &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.
9032 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
9033 },
9034 &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}`.
9035 &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`.
9036 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
9037 },
9038 }</pre>
9039 </div>
9040
9041 <div class="method">
9042 <code class="details" id="generateSyntheticData">generateSyntheticData(location, body=None, x__xgafv=None)</code>
9043 <pre>Generates synthetic (artificial) data based on a description
9044
9045 Args:
9046 location: string, Required. The geographic location where the synthetic data generation request is processed. This should be in the format `projects/{project}/locations/{location}`. For example, `projects/my-project/locations/us-central1`. (required)
9047 body: object, The request body.
9048 The object takes the form of:
9049
9050 { # Request message for DataFoundryService.GenerateSyntheticData. It contains the settings and information needed to generate synthetic data.
9051 &quot;count&quot;: 42, # Required. The number of synthetic examples to generate. For this stateless API, you can generate up to 50 examples in a single request.
9052 &quot;examples&quot;: [ # Optional. A list of few-shot examples that help the model understand the desired style, tone, and format of the generated synthetic data. Providing these few-shot examples can significantly improve the quality and relevance of the output.
9053 { # A single instance of generated synthetic data. Each example is made up of one or more named fields, as defined in `OutputFieldSpec`. These examples are used as few-shot examples to show the model what you want (in `GenerateSyntheticDataRequest.examples`) and to return generated examples in the response (in `GenerateSyntheticDataResponse.synthetic_examples`).
9054 &quot;fields&quot;: [ # Required. A list of fields that constitute an example.
9055 { # Represents a single named field within a synthetic example, consisting of a name and the actual content.
9056 &quot;content&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. # Required. The actual content or value for this field. This can be text, images, or other types of data.
9057 &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.
9058 { # 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.
9059 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
9060 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
9061 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
9062 },
9063 &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.
9064 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
9065 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
9066 },
9067 &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.
9068 &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.
9069 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
9070 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
9071 },
9072 &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.
9073 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
9074 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
9075 },
9076 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
9077 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
9078 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
9079 { # Partial argument value of the function call.
9080 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
9081 &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;.
9082 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
9083 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
9084 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
9085 &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.
9086 },
9087 ],
9088 &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.
9089 },
9090 &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.
9091 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
9092 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
9093 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
9094 { # 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.
9095 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
9096 &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.
9097 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
9098 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
9099 },
9100 &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.
9101 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
9102 &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.
9103 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
9104 },
9105 },
9106 ],
9107 &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.
9108 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
9109 },
9110 &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.
9111 },
9112 &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.
9113 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
9114 &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.
9115 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
9116 },
9117 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
9118 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
9119 },
9120 &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.
9121 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
9122 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
9123 &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.
9124 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
9125 &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].
9126 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
9127 },
9128 },
9129 ],
9130 &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;.
9131 },
9132 &quot;fieldName&quot;: &quot;A String&quot;, # Optional. The name of the specific field, such as &quot;product_name&quot; or &quot;review_text&quot;.
9133 },
9134 ],
9135 },
9136 ],
9137 &quot;outputFieldSpecs&quot;: [ # Required. Defines the schema of each synthetic example to be generated, defined by a list of fields.
9138 { # Specifies the properties of a single field that are included in each generated synthetic example. This helps the model understand what kind of data to generate for each field.
9139 &quot;fieldName&quot;: &quot;A String&quot;, # Required. The name of this field in the generated synthetic data, such as &quot;email_subject&quot; or &quot;customer_review&quot;.
9140 &quot;fieldType&quot;: &quot;A String&quot;, # Optional. The data type of the field. Defaults to CONTENT if not set.
9141 &quot;guidance&quot;: &quot;A String&quot;, # Optional. Specific instructions for the large language model on how to generate content for this particular field. While the LLM can sometimes infer content from the field name, providing explicit guidance is preferred. For example, for a field named &quot;review&quot;, the guidance could be &quot;A positive review about a coffee maker.&quot;
9142 },
9143 ],
9144 &quot;taskDescription&quot;: { # Defines a generation strategy based on a general task description. # Generates synthetic data based on a high-level description of the task or data you want.
9145 &quot;taskDescription&quot;: &quot;A String&quot;, # Required. A general description of the type of synthetic data you want to generate. For example, &quot;Generate customer reviews for a new smartphone.&quot;
9146 },
9147 }
9148
9149 x__xgafv: string, V1 error format.
9150 Allowed values
9151 1 - v1 error format
9152 2 - v2 error format
9153
9154 Returns:
9155 An object of the form:
9156
9157 { # The response message for the `GenerateSyntheticData` method, containing the synthetic examples generated by the Gen AI evaluation service.
9158 &quot;syntheticExamples&quot;: [ # A list of generated synthetic examples, each containing a complete synthetic data instance generated based on your request.
9159 { # A single instance of generated synthetic data. Each example is made up of one or more named fields, as defined in `OutputFieldSpec`. These examples are used as few-shot examples to show the model what you want (in `GenerateSyntheticDataRequest.examples`) and to return generated examples in the response (in `GenerateSyntheticDataResponse.synthetic_examples`).
9160 &quot;fields&quot;: [ # Required. A list of fields that constitute an example.
9161 { # Represents a single named field within a synthetic example, consisting of a name and the actual content.
9162 &quot;content&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. # Required. The actual content or value for this field. This can be text, images, or other types of data.
9163 &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.
9164 { # 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.
9165 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
9166 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
9167 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
9168 },
9169 &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.
9170 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
9171 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
9172 },
9173 &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.
9174 &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.
9175 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
9176 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
9177 },
9178 &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.
9179 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
9180 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
9181 },
9182 &quot;id&quot;: &quot;A String&quot;, # Optional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
9183 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
9184 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
9185 { # Partial argument value of the function call.
9186 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
9187 &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;.
9188 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
9189 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
9190 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
9191 &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.
9192 },
9193 ],
9194 &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.
9195 },
9196 &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.
9197 &quot;id&quot;: &quot;A String&quot;, # Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
9198 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
9199 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
9200 { # 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.
9201 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
9202 &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.
9203 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
9204 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
9205 },
9206 &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.
9207 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
9208 &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.
9209 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
9210 },
9211 },
9212 ],
9213 &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.
9214 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
9215 },
9216 &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.
9217 },
9218 &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.
9219 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
9220 &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.
9221 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
9222 },
9223 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
9224 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
9225 },
9226 &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.
9227 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
9228 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
9229 &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.
9230 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
9231 &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].
9232 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
9233 },
9234 },
9235 ],
9236 &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;.
9237 },
9238 &quot;fieldName&quot;: &quot;A String&quot;, # Optional. The name of the specific field, such as &quot;product_name&quot; or &quot;review_text&quot;.
9239 },
9240 ],
9241 },
9242 ],
9243 }</pre>
9244 </div>
9245
9246 <div class="method">
9247 <code class="details" id="generateUserScenarios">generateUserScenarios(location, body=None, x__xgafv=None)</code>
9248 <pre>Generates user scenarios for agent evaluation.
9249
9250 Args:
9251 location: string, Required. The resource name of the Location to run the job. Format: `projects/{project}/locations/{location}` (required)
9252 body: object, The request body.
9253 The object takes the form of:
9254
9255 { # Request message for DataFoundryService.GenerateUserScenarios.
9256 &quot;agents&quot;: { # Required. A map containing the static configurations for each agent in the system. Key: agent_id (matches the `author` field in events). Value: The static configuration of the agent.
9257 &quot;a_key&quot;: { # Represents configuration for an Agent.
9258 &quot;agentId&quot;: &quot;A String&quot;, # Required. Unique identifier of the agent. This ID is used to refer to this agent, e.g., in AgentEvent.author, or in the `sub_agents` field. It must be unique within the `agents` map.
9259 &quot;agentType&quot;: &quot;A String&quot;, # Optional. The type or class of the agent (e.g., &quot;LlmAgent&quot;, &quot;RouterAgent&quot;, &quot;ToolUseAgent&quot;). Useful for the autorater to understand the expected behavior of the agent.
9260 &quot;description&quot;: &quot;A String&quot;, # Optional. A high-level description of the agent&#x27;s role and responsibilities. Critical for evaluating if the agent is routing tasks correctly.
9261 &quot;instruction&quot;: &quot;A String&quot;, # Optional. Provides instructions for the LLM model, guiding the agent&#x27;s behavior. Can be static or dynamic. Dynamic instructions can contain placeholders like {variable_name} that will be resolved at runtime using the `AgentEvent.state_delta` field.
9262 &quot;subAgents&quot;: [ # Optional. The list of valid agent IDs that this agent can delegate to. This defines the directed edges in the multi-agent system graph topology.
9263 &quot;A String&quot;,
9264 ],
9265 &quot;tools&quot;: [ # Optional. The list of tools available to this agent.
9266 { # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
9267 &quot;codeExecution&quot;: { # Tool that executes code generated by the model, and automatically returns the result to the model. See also ExecutableCode and CodeExecutionResult, which are input and output to this tool. # Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
9268 },
9269 &quot;computerUse&quot;: { # Tool to support computer use. # Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
9270 &quot;enablePromptInjectionDetection&quot;: True or False, # Optional. Enables the prompt injection detection check on computer-use request.
9271 &quot;environment&quot;: &quot;A String&quot;, # Required. The environment being operated.
9272 &quot;excludedPredefinedFunctions&quot;: [ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
9273 &quot;A String&quot;,
9274 ],
9275 },
9276 &quot;enterpriseWebSearch&quot;: { # Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. # Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance.
9277 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
9278 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains.
9279 &quot;A String&quot;,
9280 ],
9281 },
9282 &quot;exaAiSearch&quot;: { # ExaAiSearch tool type. A tool that uses the Exa.ai search engine for grounding. # Optional. Uses Exa.ai to search for information to answer user queries. The search results will be grounded on Exa.ai and presented to the model for response generation
9283 &quot;apiKey&quot;: &quot;A String&quot;, # Required. The API key for ExaAiSearch.
9284 &quot;customConfigs&quot;: { # Optional. This field can be used to pass any parameter from the Exa.ai Search API.
9285 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
9286 },
9287 },
9288 &quot;functionDeclarations&quot;: [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided.
9289 { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name, description, parameters and response type. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
9290 &quot;behavior&quot;: &quot;A String&quot;, # Optional. Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.
9291 &quot;description&quot;: &quot;A String&quot;, # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
9292 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128.
9293 &quot;parameters&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. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
9294 &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.
9295 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
9296 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
9297 ],
9298 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
9299 &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.
9300 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
9301 },
9302 &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.
9303 &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;]}`
9304 &quot;A String&quot;,
9305 ],
9306 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
9307 &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.
9308 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
9309 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
9310 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
9311 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
9312 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
9313 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
9314 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
9315 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
9316 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
9317 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
9318 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
9319 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
9320 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
9321 },
9322 &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.
9323 &quot;A String&quot;,
9324 ],
9325 &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
9326 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
9327 &quot;A String&quot;,
9328 ],
9329 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
9330 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
9331 },
9332 &quot;parametersJsonSchema&quot;: &quot;&quot;, # Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: { &quot;name&quot;: { &quot;type&quot;: &quot;string&quot; }, &quot;age&quot;: { &quot;type&quot;: &quot;integer&quot; } }, &quot;additionalProperties&quot;: false, &quot;required&quot;: [&quot;name&quot;, &quot;age&quot;], &quot;propertyOrdering&quot;: [&quot;name&quot;, &quot;age&quot;] } ``` This field is mutually exclusive with `parameters`.
9333 &quot;response&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. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
9334 &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.
9335 &quot;anyOf&quot;: [ # Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.
9336 # Object with schema name: GoogleCloudAiplatformV1beta1Schema
9337 ],
9338 &quot;default&quot;: &quot;&quot;, # Optional. Default value to use if the field is not specified.
9339 &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.
9340 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
9341 },
9342 &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.
9343 &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;]}`
9344 &quot;A String&quot;,
9345 ],
9346 &quot;example&quot;: &quot;&quot;, # Optional. Example of an instance of this schema.
9347 &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.
9348 &quot;items&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array.
9349 &quot;maxItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.
9350 &quot;maxLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.
9351 &quot;maxProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.
9352 &quot;maximum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.
9353 &quot;minItems&quot;: &quot;A String&quot;, # Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.
9354 &quot;minLength&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.
9355 &quot;minProperties&quot;: &quot;A String&quot;, # Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.
9356 &quot;minimum&quot;: 3.14, # Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.
9357 &quot;nullable&quot;: True or False, # Optional. Indicates if the value of this field can be null.
9358 &quot;pattern&quot;: &quot;A String&quot;, # Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.
9359 &quot;properties&quot;: { # Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.
9360 &quot;a_key&quot;: # Object with schema name: GoogleCloudAiplatformV1beta1Schema
9361 },
9362 &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.
9363 &quot;A String&quot;,
9364 ],
9365 &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
9366 &quot;required&quot;: [ # Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.
9367 &quot;A String&quot;,
9368 ],
9369 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the schema.
9370 &quot;type&quot;: &quot;A String&quot;, # Optional. Data type of the schema field.
9371 },
9372 &quot;responseJsonSchema&quot;: &quot;&quot;, # Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`.
9373 },
9374 ],
9375 &quot;googleMaps&quot;: { # Tool to retrieve public maps data for grounding, powered by Google. # Optional. GoogleMaps tool type. Tool to support Google Maps in Model.
9376 &quot;enableWidget&quot;: True or False, # Optional. Deprecated: The Google Maps contextual widget behavior in Grounding with Google Maps is being deprecated; this field is planned for removal and no longer has any effect once removed. If true, include the widget context token in the response.
9377 },
9378 &quot;googleSearch&quot;: { # GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. # Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
9379 &quot;blockingConfidence&quot;: &quot;A String&quot;, # Optional. Sites with confidence level chosen &amp; above this value will be blocked from the search results.
9380 &quot;excludeDomains&quot;: [ # Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [&quot;amazon.com&quot;, &quot;facebook.com&quot;].
9381 &quot;A String&quot;,
9382 ],
9383 &quot;searchTypes&quot;: { # Different types of search that can be enabled on the GoogleSearch tool. # Optional. The set of search types to enable. If not set, web search is enabled by default.
9384 &quot;imageSearch&quot;: { # Image search for grounding and related configurations. # Optional. Setting this field enables image search. Image bytes are returned.
9385 },
9386 &quot;webSearch&quot;: { # Standard web search for grounding and related configurations. Only text results are returned. # Optional. Setting this field enables web search. Only text results are returned.
9387 },
9388 },
9389 },
9390 &quot;googleSearchRetrieval&quot;: { # Tool to retrieve public web data for grounding, powered by Google. # Optional. Specialized retrieval tool that is powered by Google Search.
9391 &quot;dynamicRetrievalConfig&quot;: { # Describes the options to customize dynamic retrieval. # Specifies the dynamic retrieval configuration for the given source.
9392 &quot;dynamicThreshold&quot;: 3.14, # Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.
9393 &quot;mode&quot;: &quot;A String&quot;, # The mode of the predictor to be used in dynamic retrieval.
9394 },
9395 },
9396 &quot;parallelAiSearch&quot;: { # ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. # Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation
9397 &quot;apiKey&quot;: &quot;A String&quot;, # Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details.
9398 &quot;customConfigs&quot;: { # Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { &quot;source_policy&quot;: { &quot;include_domains&quot;: [&quot;google.com&quot;, &quot;wikipedia.org&quot;], &quot;exclude_domains&quot;: [&quot;example.com&quot;] }, &quot;fetch_policy&quot;: { &quot;max_age_seconds&quot;: 3600 } }
9399 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
9400 },
9401 },
9402 &quot;retrieval&quot;: { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
9403 &quot;disableAttribution&quot;: True or False, # Optional. Deprecated. This option is no longer supported.
9404 &quot;externalApi&quot;: { # Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. # Use data source powered by external API for grounding.
9405 &quot;apiAuth&quot;: { # The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. # The authentication config to access the API. Deprecated. Please use auth_config instead.
9406 &quot;apiKeyConfig&quot;: { # The API secret. # The API secret.
9407 &quot;apiKeySecretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
9408 &quot;apiKeyString&quot;: &quot;A String&quot;, # The API key string. Either this or `api_key_secret_version` must be set.
9409 },
9410 },
9411 &quot;apiSpec&quot;: &quot;A String&quot;, # The API spec that the external API implements.
9412 &quot;authConfig&quot;: { # Auth configuration to run the extension. # The authentication config to access the API.
9413 &quot;apiKeyConfig&quot;: { # Config for authentication with API key. # Config for API key auth.
9414 &quot;apiKeySecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
9415 &quot;apiKeyString&quot;: &quot;A String&quot;, # Optional. The API key to be used in the request directly.
9416 &quot;httpElementLocation&quot;: &quot;A String&quot;, # Optional. The location of the API key.
9417 &quot;name&quot;: &quot;A String&quot;, # Optional. The parameter name of the API key. E.g. If the API request is &quot;https://example.com/act?api_key=&quot;, &quot;api_key&quot; would be the parameter name.
9418 },
9419 &quot;authType&quot;: &quot;A String&quot;, # Type of auth scheme.
9420 &quot;googleServiceAccountConfig&quot;: { # Config for Google Service Account Authentication. # Config for Google Service Account auth.
9421 &quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension.
9422 },
9423 &quot;httpBasicAuthConfig&quot;: { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth.
9424 &quot;credentialSecret&quot;: &quot;A String&quot;, # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource.
9425 },
9426 &quot;oauthConfig&quot;: { # Config for user oauth. # Config for user oauth.
9427 &quot;accessToken&quot;: &quot;A String&quot;, # Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
9428 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account.
9429 },
9430 &quot;oidcConfig&quot;: { # Config for user OIDC auth. # Config for user OIDC auth.
9431 &quot;idToken&quot;: &quot;A String&quot;, # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time.
9432 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
9433 },
9434 },
9435 &quot;elasticSearchParams&quot;: { # The search parameters to use for the ELASTIC_SEARCH spec. # Parameters for the elastic search API.
9436 &quot;index&quot;: &quot;A String&quot;, # The ElasticSearch index to use.
9437 &quot;numHits&quot;: 42, # Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
9438 &quot;searchTemplate&quot;: &quot;A String&quot;, # The ElasticSearch search template to use.
9439 },
9440 &quot;endpoint&quot;: &quot;A String&quot;, # The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search
9441 &quot;simpleSearchParams&quot;: { # The search parameters to use for SIMPLE_SEARCH spec. # Parameters for the simple search API.
9442 },
9443 },
9444 &quot;vertexAiSearch&quot;: { # Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder # Set to use data source powered by Vertex AI Search.
9445 &quot;dataStoreSpecs&quot;: [ # Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used.
9446 { # Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
9447 &quot;dataStore&quot;: &quot;A String&quot;, # Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
9448 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
9449 },
9450 ],
9451 &quot;datastore&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`
9452 &quot;engine&quot;: &quot;A String&quot;, # Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
9453 &quot;filter&quot;: &quot;A String&quot;, # Optional. Filter strings to be passed to the search API.
9454 &quot;maxResults&quot;: 42, # Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.
9455 },
9456 &quot;vertexRagStore&quot;: { # Retrieve from Vertex RAG Store for grounding. # Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
9457 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources instead.
9458 &quot;A String&quot;,
9459 ],
9460 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
9461 { # The definition of the Rag resource.
9462 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
9463 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
9464 &quot;A String&quot;,
9465 ],
9466 },
9467 ],
9468 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the Rag query.
9469 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
9470 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
9471 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
9472 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
9473 },
9474 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
9475 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
9476 },
9477 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
9478 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
9479 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
9480 },
9481 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
9482 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
9483 },
9484 },
9485 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
9486 },
9487 &quot;similarityTopK&quot;: 42, # Optional. Number of top k results to return from the selected corpora.
9488 &quot;storeContext&quot;: True or False, # Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users&#x27; ongoing and future interactions.
9489 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return results with vector distance smaller than the threshold.
9490 },
9491 },
9492 &quot;urlContext&quot;: { # Tool to support URL context. # Optional. Tool to support URL context retrieval.
9493 },
9494 },
9495 ],
9496 },
9497 },
9498 &quot;allowCrossRegionModel&quot;: True or False, # Optional. Allows the scenario generation to use cross region models. When this flag is set, the service may route traffic to other regions if a model is unavailable in the current region (e.g., to a `global` endpoint). If a fully-qualified model endpoint resource name with a different region than the request location is provided elsewhere in the request, this flag must be set to true or the request will fail.
9499 &quot;rootAgentId&quot;: &quot;A String&quot;, # Required. The agent id to identify the root agent.
9500 &quot;userScenarioGenerationConfig&quot;: { # User scenario generation configuration. # Required. Configuration for generating user scenarios.
9501 &quot;environmentData&quot;: &quot;A String&quot;, # Optional. Environment data in string type.
9502 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name to use for generation. It can be model name, e.g. &quot;gemini-3-pro-preview&quot;. or the fully qualified name of the publisher model or endpoint. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
9503 &quot;simulationInstruction&quot;: &quot;A String&quot;, # Optional. Simulation instruction to guide the user scenario generation.
9504 &quot;userScenarioCount&quot;: &quot;A String&quot;, # Required. The number of user scenarios to generate. The maximum number of scenarios that can be generated is 100.
9505 },
9506 }
9507
9508 x__xgafv: string, V1 error format.
9509 Allowed values
9510 1 - v1 error format
9511 2 - v2 error format
9512
9513 Returns:
9514 An object of the form:
9515
9516 { # Response message for DataFoundryService.GenerateUserScenarios.
9517 &quot;userScenarios&quot;: [ # The generated user scenarios used to simulate multi-turn agent running results and agent evaluation.
9518 { # Output of user scenario generation.
9519 &quot;conversationPlan&quot;: &quot;A String&quot;, # Conversation plan to drive multi-turn agent run and get simulated agent eval dataset.
9520 &quot;startingPrompt&quot;: &quot;A String&quot;, # Starting prompt for the conversation between simulated user and agent under the test.
9521 &quot;testCaseTitle&quot;: &quot;A String&quot;, # Represents a short 3-5 word title for eval test case.
9522 },
9523 ],
9524 }</pre>
9525 </div>
9526
9527 <div class="method">
9528 <code class="details" id="get">get(name, x__xgafv=None)</code>
9529 <pre>Gets information about a location.
9530
9531 Args:
9532 name: string, Resource name for the location. (required)
9533 x__xgafv: string, V1 error format.
9534 Allowed values
9535 1 - v1 error format
9536 2 - v2 error format
9537
9538 Returns:
9539 An object of the form:
9540
9541 { # A resource that represents a Google Cloud location.
9542 &quot;displayName&quot;: &quot;A String&quot;, # The friendly name for this location, typically a nearby city name. For example, &quot;Tokyo&quot;.
9543 &quot;labels&quot;: { # Cross-service attributes for the location. For example {&quot;cloud.googleapis.com/region&quot;: &quot;us-east1&quot;}
9544 &quot;a_key&quot;: &quot;A String&quot;,
9545 },
9546 &quot;locationId&quot;: &quot;A String&quot;, # The canonical id for this location. For example: `&quot;us-east1&quot;`.
9547 &quot;metadata&quot;: { # Service-specific metadata. For example the available capacity at the given location.
9548 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
9549 },
9550 &quot;name&quot;: &quot;A String&quot;, # Resource name for the location, which may vary between implementations. For example: `&quot;projects/example-project/locations/us-east1&quot;`
9551 }</pre>
9552 </div>
9553
9554 <div class="method">
9555 <code class="details" id="getRagEngineConfig">getRagEngineConfig(name, x__xgafv=None)</code>
9556 <pre>Gets a RagEngineConfig.
9557
9558 Args:
9559 name: string, Required. The name of the RagEngineConfig resource. Format: `projects/{project}/locations/{location}/ragEngineConfig` (required)
9560 x__xgafv: string, V1 error format.
9561 Allowed values
9562 1 - v1 error format
9563 2 - v2 error format
9564
9565 Returns:
9566 An object of the form:
9567
9568 { # Config for RagEngine.
9569 &quot;name&quot;: &quot;A String&quot;, # Identifier. The name of the RagEngineConfig. Format: `projects/{project}/locations/{location}/ragEngineConfig`
9570 &quot;ragManagedDbConfig&quot;: { # Configuration message for RagManagedDb used by RagEngine. # The config of the RagManagedDb used by RagEngine.
9571 &quot;basic&quot;: { # Basic tier is a cost-effective and low compute tier suitable for the following cases: * Experimenting with RagManagedDb. * Small data size. * Latency insensitive workload. * Only using RAG Engine with external vector DBs. NOTE: This is the default tier under Spanner mode if not explicitly chosen. # Deprecated: Use `mode` instead to set the tier under Spanner. Sets the RagManagedDb to the Basic tier.
9572 },
9573 &quot;enterprise&quot;: { # Enterprise tier offers production grade performance along with autoscaling functionality. It is suitable for customers with large amounts of data or performance sensitive workloads. # Sets the RagManagedDb to the Enterprise tier.
9574 },
9575 &quot;scaled&quot;: { # Scaled tier offers production grade performance along with autoscaling functionality. It is suitable for customers with large amounts of data or performance sensitive workloads. # Deprecated: Use `mode` instead to set the tier under Spanner. Sets the RagManagedDb to the Scaled tier.
9576 },
9577 &quot;serverless&quot;: { # Message to configure the serverless mode offered by RAG Engine. # Sets the backend to be the serverless mode offered by RAG Engine.
9578 },
9579 &quot;spanner&quot;: { # Message to configure the Spanner database used by RagManagedDb. # Sets the RAG Engine backend to be RagManagedDb, built on top of Spanner. NOTE: This is the default mode (w/ Basic Tier) if not explicitly chosen.
9580 &quot;basic&quot;: { # Basic tier is a cost-effective and low compute tier suitable for the following cases: * Experimenting with RagManagedDb. * Small data size. * Latency insensitive workload. * Only using RAG Engine with external vector DBs. NOTE: This is the default tier under Spanner mode if not explicitly chosen. # Sets the RagManagedDb to the Basic tier. This is the default tier for Spanner mode if not explicitly chosen.
9581 },
9582 &quot;scaled&quot;: { # Scaled tier offers production grade performance along with autoscaling functionality. It is suitable for customers with large amounts of data or performance sensitive workloads. # Sets the RagManagedDb to the Scaled tier.
9583 },
9584 &quot;unprovisioned&quot;: { # Disables the RAG Engine service and deletes all your data held within this service. This will halt the billing of the service. NOTE: Once deleted the data cannot be recovered. To start using RAG Engine again, you will need to update the tier by calling the UpdateRagEngineConfig API. # Sets the RagManagedDb to the Unprovisioned tier.
9585 },
9586 },
9587 &quot;unprovisioned&quot;: { # Disables the RAG Engine service and deletes all your data held within this service. This will halt the billing of the service. NOTE: Once deleted the data cannot be recovered. To start using RAG Engine again, you will need to update the tier by calling the UpdateRagEngineConfig API. # Deprecated: Use `mode` instead to set the tier under Spanner. Sets the RagManagedDb to the Unprovisioned tier.
9588 },
9589 },
9590 }</pre>
9591 </div>
9592
9593 <div class="method">
9594 <code class="details" id="getSemanticGovernancePolicyEngine">getSemanticGovernancePolicyEngine(name, x__xgafv=None)</code>
9595 <pre>Gets a SemanticGovernancePolicyEngine. A SemanticGovernancePolicyEngine is a singleton resource that is created when its parent is created, and deleted when its parent is deleted. This method retrieves the current state of the Semantic Governance Policy Engine.
9596
9597 Args:
9598 name: string, Required. The resource name of the SemanticGovernancePolicyEngine to retrieve. Format: projects/{project}/locations/{location}/semanticGovernancePolicyEngine (required)
9599 x__xgafv: string, V1 error format.
9600 Allowed values
9601 1 - v1 error format
9602 2 - v2 error format
9603
9604 Returns:
9605 An object of the form:
9606
9607 { # Define a singleton SemanticGovernancePolicyEngine resource under a project and location.
9608 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this SemanticGovernancePolicyEngine was created.
9609 &quot;gatewayConfigs&quot;: { # Optional. Configurations for gateways. The keys are user-defined names for each gateway. At most 5 gateway configurations are allowed.
9610 &quot;a_key&quot;: { # Configuration for a single gateway.
9611 &quot;dnsRecord&quot;: &quot;A String&quot;, # Output only. The fully qualified record name of the created A-record in Cloud DNS.
9612 &quot;dnsZoneName&quot;: &quot;A String&quot;, # Optional. FQDN of the private DNS zone to create DNS record set for PSC endpoint.
9613 &quot;ipAddress&quot;: &quot;A String&quot;, # Output only. The private IP address of the PSC endpoint.
9614 &quot;network&quot;: &quot;A String&quot;, # Optional. The URI of the network resource where PSC-E will be provisioned. if not provided `default` network will be used. Format: projects/{project}/global/networks/{network}
9615 &quot;pscEndpoint&quot;: &quot;A String&quot;, # Output only. The self-link or name of the Private Service Connect endpoint forwarding rule.
9616 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the Gateway configuration.
9617 &quot;subnetwork&quot;: &quot;A String&quot;, # Optional. The URI of the subnetwork resource where PSC-E will be provisioned. if not provided `default` subnet will be used from the same {location} Format: projects/{project}/regions/{region}/subnetworks/{subnetwork}
9618 },
9619 },
9620 &quot;ipAddress&quot;: &quot;A String&quot;, # Output only. The private IPv4 address of the PSC endpoint.
9621 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name of the SemanticGovernancePolicyEngine. Format: projects/{project}/locations/{location}/semanticGovernancePolicyEngine
9622 &quot;pscForwardingRule&quot;: &quot;A String&quot;, # Output only. The URI of the PSC endpoint resource created in customer project. Format: projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}
9623 &quot;pscServiceAttachment&quot;: &quot;A String&quot;, # Output only. URI of the PSC attachment resource provided by SGP. Format: projects/{project}/regions/{region}/serviceAttachments/{service_attachment}
9624 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the SemanticGovernancePolicyEngine.
9625 &quot;targetProject&quot;: &quot;A String&quot;, # Optional. The project where network, subnetwork and dns resources are located. If not provided, it is assumed to be the same project of SemanticGovernancePolicyEngine. This field is for Shared VPC scenarios, where network resources may be in a target project and SGP engine in a service project.
9626 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this SemanticGovernancePolicyEngine was last updated.
9627 }</pre>
9628 </div>
9629
9630 <div class="method">
9631 <code class="details" id="list">list(name, extraLocationTypes=None, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
9632 <pre>Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: * **Global locations**: If `name` is empty, the method lists the public locations available to all projects. * **Project-specific locations**: If `name` follows the format `projects/{project}`, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project. For gRPC and client library implementations, the resource name is passed as the `name` field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
9633
9634 Args:
9635 name: string, The resource that owns the locations collection, if applicable. (required)
9636 extraLocationTypes: string, Optional. Do not use this field unless explicitly documented otherwise. This is primarily for internal usage. (repeated)
9637 filter: string, A filter to narrow down results to a preferred subset. The filtering language accepts strings like `&quot;displayName=tokyo&quot;`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
9638 pageSize: integer, The maximum number of results to return. If not set, the service selects a default.
9639 pageToken: string, A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
9640 x__xgafv: string, V1 error format.
9641 Allowed values
9642 1 - v1 error format
9643 2 - v2 error format
9644
9645 Returns:
9646 An object of the form:
9647
9648 { # The response message for Locations.ListLocations.
9649 &quot;locations&quot;: [ # A list of locations that matches the specified filter in the request.
9650 { # A resource that represents a Google Cloud location.
9651 &quot;displayName&quot;: &quot;A String&quot;, # The friendly name for this location, typically a nearby city name. For example, &quot;Tokyo&quot;.
9652 &quot;labels&quot;: { # Cross-service attributes for the location. For example {&quot;cloud.googleapis.com/region&quot;: &quot;us-east1&quot;}
9653 &quot;a_key&quot;: &quot;A String&quot;,
9654 },
9655 &quot;locationId&quot;: &quot;A String&quot;, # The canonical id for this location. For example: `&quot;us-east1&quot;`.
9656 &quot;metadata&quot;: { # Service-specific metadata. For example the available capacity at the given location.
9657 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
9658 },
9659 &quot;name&quot;: &quot;A String&quot;, # Resource name for the location, which may vary between implementations. For example: `&quot;projects/example-project/locations/us-east1&quot;`
9660 },
9661 ],
9662 &quot;nextPageToken&quot;: &quot;A String&quot;, # The standard List next-page token.
9663 }</pre>
9664 </div>
9665
9666 <div class="method">
9667 <code class="details" id="list_next">list_next()</code>
9668 <pre>Retrieves the next page of results.
9669
9670 Args:
9671 previous_request: The request for the previous page. (required)
9672 previous_response: The response from the request for the previous page. (required)
9673
9674 Returns:
9675 A request object that you can call &#x27;execute()&#x27; on to request the next
9676 page. Returns None if there are no more items in the collection.
9677 </pre>
9678 </div>
9679
9680 <div class="method">
9681 <code class="details" id="recommendSpec">recommendSpec(parent, body=None, x__xgafv=None)</code>
9682 <pre>Gets a Model&#x27;s spec recommendations. This API is called by UI, SDK, and internal.
9683
9684 Args:
9685 parent: string, Required. The resource name of the Location from which to recommend specs. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. (required)
9686 body: object, The request body.
9687 The object takes the form of:
9688
9689 { # Request message for ModelService.RecommendSpec.
9690 &quot;checkMachineAvailability&quot;: True or False, # Optional. If true, check machine availability for the recommended regions. Only return the machine spec in regions where the machine is available.
9691 &quot;checkUserQuota&quot;: True or False, # Optional. If true, check user quota for the recommended regions. Returns all the machine spec in regions they are available, and also the user quota state for each machine type in each region.
9692 &quot;gcsUri&quot;: &quot;A String&quot;, # Required. The Google Cloud Storage URI of the custom model, storing weights and config files (which can be used to infer the base model).
9693 }
9694
9695 x__xgafv: string, V1 error format.
9696 Allowed values
9697 1 - v1 error format
9698 2 - v2 error format
9699
9700 Returns:
9701 An object of the form:
9702
9703 { # Response message for ModelService.RecommendSpec.
9704 &quot;baseModel&quot;: &quot;A String&quot;, # Output only. The base model used to finetune the custom model.
9705 &quot;recommendations&quot;: [ # Output only. Recommendations of deployment options for the given custom weights model.
9706 { # Recommendation of one deployment option for the given custom weights model in one region. Contains the machine and container spec, and user accelerator quota state.
9707 &quot;region&quot;: &quot;A String&quot;, # The region for the deployment spec (machine).
9708 &quot;spec&quot;: { # A machine and model container spec. # Output only. The machine and model container specs.
9709 &quot;containerSpec&quot;: { # Specification of a container for serving predictions. Some fields in this message correspond to fields in the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). # Output only. The model container spec.
9710 &quot;args&quot;: [ # Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container&#x27;s [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify this field as an array of executable and arguments, similar to a Docker `CMD`&#x27;s &quot;default parameters&quot; form. If you don&#x27;t specify this field but do specify the command field, then the command from the `command` field runs without any additional arguments. See the [Kubernetes documentation about how the `command` and `args` fields interact with a container&#x27;s `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don&#x27;t specify this field and don&#x27;t specify the `command` field, then the container&#x27;s [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the env field. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field corresponds to the `args` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
9711 &quot;A String&quot;,
9712 ],
9713 &quot;command&quot;: [ # Immutable. Specifies the command that runs when the container starts. This overrides the container&#x27;s [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint). Specify this field as an array of executable and arguments, similar to a Docker `ENTRYPOINT`&#x27;s &quot;exec&quot; form, not its &quot;shell&quot; form. If you do not specify this field, then the container&#x27;s `ENTRYPOINT` runs, in conjunction with the args field or the container&#x27;s [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd), if either exists. If this field is not specified and the container does not have an `ENTRYPOINT`, then refer to the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). If you specify this field, then you can also specify the `args` field to provide additional arguments for this command. However, if you specify this field, then the container&#x27;s `CMD` is ignored. See the [Kubernetes documentation about how the `command` and `args` fields interact with a container&#x27;s `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the env field. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field corresponds to the `command` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
9714 &quot;A String&quot;,
9715 ],
9716 &quot;deploymentTimeout&quot;: &quot;A String&quot;, # Immutable. Deployment timeout. Limit for deployment timeout is 2 hours.
9717 &quot;env&quot;: [ # Immutable. List of environment variables to set in the container. After the container starts running, code running in the container can read these environment variables. Additionally, the command and args fields can reference these variables. Later entries in this list can also reference earlier entries. For example, the following example sets the variable `VAR_2` to have the value `foo bar`: ```json [ { &quot;name&quot;: &quot;VAR_1&quot;, &quot;value&quot;: &quot;foo&quot; }, { &quot;name&quot;: &quot;VAR_2&quot;, &quot;value&quot;: &quot;$(VAR_1) bar&quot; } ] ``` If you switch the order of the variables in the example, then the expansion does not occur. This field corresponds to the `env` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
9718 { # Represents an environment variable present in a Container or Python Module.
9719 &quot;name&quot;: &quot;A String&quot;, # Required. Name of the environment variable. Must be a valid C identifier.
9720 &quot;value&quot;: &quot;A String&quot;, # Required. Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
9721 },
9722 ],
9723 &quot;grpcPorts&quot;: [ # Immutable. List of ports to expose from the container. Vertex AI sends gRPC prediction requests that it receives to the first port on this list. Vertex AI also sends liveness and health checks to this port. If you do not specify this field, gRPC requests to the container will be disabled. Vertex AI does not use ports other than the first one listed. This field corresponds to the `ports` field of the Kubernetes Containers v1 core API.
9724 { # Represents a network port in a container.
9725 &quot;containerPort&quot;: 42, # The number of the port to expose on the pod&#x27;s IP address. Must be a valid port number, between 1 and 65535 inclusive.
9726 },
9727 ],
9728 &quot;healthProbe&quot;: { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes readiness probe.
9729 &quot;exec&quot;: { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command.
9730 &quot;command&quot;: [ # Command is the command line to execute inside the container, the working directory for the command is root (&#x27;/&#x27;) in the container&#x27;s filesystem. The command is simply exec&#x27;d, it is not run inside a shell, so traditional shell instructions (&#x27;|&#x27;, etc) won&#x27;t work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
9731 &quot;A String&quot;,
9732 ],
9733 },
9734 &quot;failureThreshold&quot;: 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument &#x27;failureThreshold&#x27;.
9735 &quot;grpc&quot;: { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request.
9736 &quot;port&quot;: 42, # Port number of the gRPC service. Number must be in the range 1 to 65535.
9737 &quot;service&quot;: &quot;A String&quot;, # Service is the name of the service to place in the gRPC HealthCheckRequest. See https://github.com/grpc/grpc/blob/master/doc/health-checking.md. If this is not specified, the default behavior is defined by gRPC.
9738 },
9739 &quot;httpGet&quot;: { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request.
9740 &quot;host&quot;: &quot;A String&quot;, # Host name to connect to, defaults to the model serving container&#x27;s IP. You probably want to set &quot;Host&quot; in httpHeaders instead.
9741 &quot;httpHeaders&quot;: [ # Custom headers to set in the request. HTTP allows repeated headers.
9742 { # HttpHeader describes a custom header to be used in HTTP probes
9743 &quot;name&quot;: &quot;A String&quot;, # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
9744 &quot;value&quot;: &quot;A String&quot;, # The header field value
9745 },
9746 ],
9747 &quot;path&quot;: &quot;A String&quot;, # Path to access on the HTTP server.
9748 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
9749 &quot;scheme&quot;: &quot;A String&quot;, # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are &quot;HTTP&quot; or &quot;HTTPS&quot;.
9750 },
9751 &quot;initialDelaySeconds&quot;: 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument &#x27;initialDelaySeconds&#x27;.
9752 &quot;periodSeconds&quot;: 42, # How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeout_seconds. Maps to Kubernetes probe argument &#x27;periodSeconds&#x27;.
9753 &quot;successThreshold&quot;: 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument &#x27;successThreshold&#x27;.
9754 &quot;tcpSocket&quot;: { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection.
9755 &quot;host&quot;: &quot;A String&quot;, # Optional: Host name to connect to, defaults to the model serving container&#x27;s IP.
9756 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
9757 },
9758 &quot;timeoutSeconds&quot;: 42, # Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to period_seconds. Maps to Kubernetes probe argument &#x27;timeoutSeconds&#x27;.
9759 },
9760 &quot;healthRoute&quot;: &quot;A String&quot;, # Immutable. HTTP path on the container to send health checks to. Vertex AI intermittently sends GET requests to this path on the container&#x27;s IP address and port to check that the container is healthy. Read more about [health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). For example, if you set this field to `/bar`, then Vertex AI intermittently sends a GET request to the `/bar` path on the port of your container specified by the first value of this `ModelContainerSpec`&#x27;s ports field. If you don&#x27;t specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/ DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)
9761 &quot;imageUri&quot;: &quot;A String&quot;, # Required. Immutable. URI of the Docker image to be used as the custom container for serving predictions. This URI must identify an image in Artifact Registry or Container Registry. Learn more about the [container publishing requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon ModelService.UploadModel, stored internally, and this original path is afterwards not used. To learn about the requirements for the Docker image itself, see [Custom container requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI&#x27;s [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field.
9762 &quot;invokeRoutePrefix&quot;: &quot;A String&quot;, # Immutable. Invoke route prefix for the custom container. &quot;/*&quot; is the only supported value right now. By setting this field, any non-root route on this model will be accessible with invoke http call eg: &quot;/invoke/foo/bar&quot;, however the [PredictionService.Invoke] RPC is not supported yet. Only one of `predict_route` or `invoke_route_prefix` can be set, and we default to using `predict_route` if this field is not set. If this field is set, the Model can only be deployed to dedicated endpoint.
9763 &quot;livenessProbe&quot;: { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes liveness probe.
9764 &quot;exec&quot;: { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command.
9765 &quot;command&quot;: [ # Command is the command line to execute inside the container, the working directory for the command is root (&#x27;/&#x27;) in the container&#x27;s filesystem. The command is simply exec&#x27;d, it is not run inside a shell, so traditional shell instructions (&#x27;|&#x27;, etc) won&#x27;t work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
9766 &quot;A String&quot;,
9767 ],
9768 },
9769 &quot;failureThreshold&quot;: 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument &#x27;failureThreshold&#x27;.
9770 &quot;grpc&quot;: { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request.
9771 &quot;port&quot;: 42, # Port number of the gRPC service. Number must be in the range 1 to 65535.
9772 &quot;service&quot;: &quot;A String&quot;, # Service is the name of the service to place in the gRPC HealthCheckRequest. See https://github.com/grpc/grpc/blob/master/doc/health-checking.md. If this is not specified, the default behavior is defined by gRPC.
9773 },
9774 &quot;httpGet&quot;: { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request.
9775 &quot;host&quot;: &quot;A String&quot;, # Host name to connect to, defaults to the model serving container&#x27;s IP. You probably want to set &quot;Host&quot; in httpHeaders instead.
9776 &quot;httpHeaders&quot;: [ # Custom headers to set in the request. HTTP allows repeated headers.
9777 { # HttpHeader describes a custom header to be used in HTTP probes
9778 &quot;name&quot;: &quot;A String&quot;, # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
9779 &quot;value&quot;: &quot;A String&quot;, # The header field value
9780 },
9781 ],
9782 &quot;path&quot;: &quot;A String&quot;, # Path to access on the HTTP server.
9783 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
9784 &quot;scheme&quot;: &quot;A String&quot;, # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are &quot;HTTP&quot; or &quot;HTTPS&quot;.
9785 },
9786 &quot;initialDelaySeconds&quot;: 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument &#x27;initialDelaySeconds&#x27;.
9787 &quot;periodSeconds&quot;: 42, # How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeout_seconds. Maps to Kubernetes probe argument &#x27;periodSeconds&#x27;.
9788 &quot;successThreshold&quot;: 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument &#x27;successThreshold&#x27;.
9789 &quot;tcpSocket&quot;: { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection.
9790 &quot;host&quot;: &quot;A String&quot;, # Optional: Host name to connect to, defaults to the model serving container&#x27;s IP.
9791 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
9792 },
9793 &quot;timeoutSeconds&quot;: 42, # Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to period_seconds. Maps to Kubernetes probe argument &#x27;timeoutSeconds&#x27;.
9794 },
9795 &quot;ports&quot;: [ # Immutable. List of ports to expose from the container. Vertex AI sends any prediction requests that it receives to the first port on this list. Vertex AI also sends [liveness and health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```json [ { &quot;containerPort&quot;: 8080 } ] ``` Vertex AI does not use ports other than the first one listed. This field corresponds to the `ports` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
9796 { # Represents a network port in a container.
9797 &quot;containerPort&quot;: 42, # The number of the port to expose on the pod&#x27;s IP address. Must be a valid port number, between 1 and 65535 inclusive.
9798 },
9799 ],
9800 &quot;predictRoute&quot;: &quot;A String&quot;, # Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.predict to this path on the container&#x27;s IP address and port. Vertex AI then returns the container&#x27;s response in the API response. For example, if you set this field to `/foo`, then when Vertex AI receives a prediction request, it forwards the request body in a POST request to the `/foo` path on the port of your container specified by the first value of this `ModelContainerSpec`&#x27;s ports field. If you don&#x27;t specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)
9801 &quot;sharedMemorySizeMb&quot;: &quot;A String&quot;, # Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes.
9802 &quot;startupProbe&quot;: { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes startup probe.
9803 &quot;exec&quot;: { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command.
9804 &quot;command&quot;: [ # Command is the command line to execute inside the container, the working directory for the command is root (&#x27;/&#x27;) in the container&#x27;s filesystem. The command is simply exec&#x27;d, it is not run inside a shell, so traditional shell instructions (&#x27;|&#x27;, etc) won&#x27;t work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
9805 &quot;A String&quot;,
9806 ],
9807 },
9808 &quot;failureThreshold&quot;: 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument &#x27;failureThreshold&#x27;.
9809 &quot;grpc&quot;: { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request.
9810 &quot;port&quot;: 42, # Port number of the gRPC service. Number must be in the range 1 to 65535.
9811 &quot;service&quot;: &quot;A String&quot;, # Service is the name of the service to place in the gRPC HealthCheckRequest. See https://github.com/grpc/grpc/blob/master/doc/health-checking.md. If this is not specified, the default behavior is defined by gRPC.
9812 },
9813 &quot;httpGet&quot;: { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request.
9814 &quot;host&quot;: &quot;A String&quot;, # Host name to connect to, defaults to the model serving container&#x27;s IP. You probably want to set &quot;Host&quot; in httpHeaders instead.
9815 &quot;httpHeaders&quot;: [ # Custom headers to set in the request. HTTP allows repeated headers.
9816 { # HttpHeader describes a custom header to be used in HTTP probes
9817 &quot;name&quot;: &quot;A String&quot;, # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
9818 &quot;value&quot;: &quot;A String&quot;, # The header field value
9819 },
9820 ],
9821 &quot;path&quot;: &quot;A String&quot;, # Path to access on the HTTP server.
9822 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
9823 &quot;scheme&quot;: &quot;A String&quot;, # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are &quot;HTTP&quot; or &quot;HTTPS&quot;.
9824 },
9825 &quot;initialDelaySeconds&quot;: 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument &#x27;initialDelaySeconds&#x27;.
9826 &quot;periodSeconds&quot;: 42, # How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeout_seconds. Maps to Kubernetes probe argument &#x27;periodSeconds&#x27;.
9827 &quot;successThreshold&quot;: 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument &#x27;successThreshold&#x27;.
9828 &quot;tcpSocket&quot;: { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection.
9829 &quot;host&quot;: &quot;A String&quot;, # Optional: Host name to connect to, defaults to the model serving container&#x27;s IP.
9830 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
9831 },
9832 &quot;timeoutSeconds&quot;: 42, # Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to period_seconds. Maps to Kubernetes probe argument &#x27;timeoutSeconds&#x27;.
9833 },
9834 },
9835 &quot;machineSpec&quot;: { # Specification of a single machine. # Output only. The machine spec.
9836 &quot;acceleratorCount&quot;: 42, # The number of accelerators to attach to the machine. For [accelerator optimized machine types](https://cloud.google.com/compute/docs/accelerator-optimized-machines), One may set the accelerator_count from 1 to N for machine with N GPUs. If accelerator_count is less than or equal to N / 2, Agent Platform co-schedules the replicas of the model into the same VM to save cost. For example, if the machine type is a3-highgpu-8g, which has 8 H100 GPUs, one can set accelerator_count to 1 to 8. If accelerator_count is 1, 2, 3, or 4, Agent Platform co-schedules 8, 4, 2, or 2 replicas of the model into the same VM to save cost. When co-scheduling, CPU, memory and storage on the VM will be distributed to replicas on the VM. For example, one can expect a co-scheduled replica requesting 2 GPUs out of a 8-GPU VM will receive 25% of the CPU, memory and storage of the VM. Note that the feature is not compatible with multihost_gpu_node_count. When multihost_gpu_node_count is set, the co-scheduling will not be enabled.
9837 &quot;acceleratorType&quot;: &quot;A String&quot;, # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count.
9838 &quot;gpuPartitionSize&quot;: &quot;A String&quot;, # Optional. Immutable. The Nvidia GPU partition size. When specified, the requested accelerators will be partitioned into smaller GPU partitions. For example, if the request is for 8 units of NVIDIA A100 GPUs, and gpu_partition_size=&quot;1g.10gb&quot;, the service will create 8 * 7 = 56 partitioned MIG instances. The partition size must be a value supported by the requested accelerator. Refer to [Nvidia GPU Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions) for the available partition sizes. If set, the accelerator_count should be set to 1.
9839 &quot;machineType&quot;: &quot;A String&quot;, # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/gemini-enterprise-agent-platform/machine-learning/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/gemini-enterprise-agent-platform/machine-learning/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required.
9840 &quot;minGpuDriverVersion&quot;: &quot;A String&quot;, # Optional. Immutable. The minimum GPU driver version that this machine requires. For example, &quot;535.104.06&quot;. If not specified, the default GPU driver version will be used by the underlying infrastructure.
9841 &quot;multihostGpuNodeCount&quot;: 42, # Optional. Immutable. The number of nodes per replica for multihost GPU deployments.
9842 &quot;reservationAffinity&quot;: { # A ReservationAffinity can be used to configure a Vertex AI resource (e.g., a DeployedModel) to draw its Compute Engine resources from a Shared Reservation, or exclusively from on-demand capacity. # Optional. Immutable. Configuration controlling how this resource pool consumes reservation.
9843 &quot;key&quot;: &quot;A String&quot;, # Optional. Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, use `compute.googleapis.com/reservation-name` as the key and specify the name of your reservation as its value.
9844 &quot;reservationAffinityType&quot;: &quot;A String&quot;, # Required. Specifies the reservation affinity type.
9845 &quot;values&quot;: [ # Optional. Corresponds to the label values of a reservation resource. This must be the full resource name of the reservation or reservation block.
9846 &quot;A String&quot;,
9847 ],
9848 },
9849 &quot;tpuTopology&quot;: &quot;A String&quot;, # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: &quot;2x2x1&quot;).
9850 },
9851 },
9852 &quot;userQuotaState&quot;: &quot;A String&quot;, # Output only. The user accelerator quota state.
9853 },
9854 ],
9855 &quot;specs&quot;: [ # Output only. The machine and model container specs.
9856 { # A machine and model container spec.
9857 &quot;containerSpec&quot;: { # Specification of a container for serving predictions. Some fields in this message correspond to fields in the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). # Output only. The model container spec.
9858 &quot;args&quot;: [ # Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container&#x27;s [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify this field as an array of executable and arguments, similar to a Docker `CMD`&#x27;s &quot;default parameters&quot; form. If you don&#x27;t specify this field but do specify the command field, then the command from the `command` field runs without any additional arguments. See the [Kubernetes documentation about how the `command` and `args` fields interact with a container&#x27;s `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don&#x27;t specify this field and don&#x27;t specify the `command` field, then the container&#x27;s [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the env field. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field corresponds to the `args` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
9859 &quot;A String&quot;,
9860 ],
9861 &quot;command&quot;: [ # Immutable. Specifies the command that runs when the container starts. This overrides the container&#x27;s [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint). Specify this field as an array of executable and arguments, similar to a Docker `ENTRYPOINT`&#x27;s &quot;exec&quot; form, not its &quot;shell&quot; form. If you do not specify this field, then the container&#x27;s `ENTRYPOINT` runs, in conjunction with the args field or the container&#x27;s [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd), if either exists. If this field is not specified and the container does not have an `ENTRYPOINT`, then refer to the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). If you specify this field, then you can also specify the `args` field to provide additional arguments for this command. However, if you specify this field, then the container&#x27;s `CMD` is ignored. See the [Kubernetes documentation about how the `command` and `args` fields interact with a container&#x27;s `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the env field. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field corresponds to the `command` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
9862 &quot;A String&quot;,
9863 ],
9864 &quot;deploymentTimeout&quot;: &quot;A String&quot;, # Immutable. Deployment timeout. Limit for deployment timeout is 2 hours.
9865 &quot;env&quot;: [ # Immutable. List of environment variables to set in the container. After the container starts running, code running in the container can read these environment variables. Additionally, the command and args fields can reference these variables. Later entries in this list can also reference earlier entries. For example, the following example sets the variable `VAR_2` to have the value `foo bar`: ```json [ { &quot;name&quot;: &quot;VAR_1&quot;, &quot;value&quot;: &quot;foo&quot; }, { &quot;name&quot;: &quot;VAR_2&quot;, &quot;value&quot;: &quot;$(VAR_1) bar&quot; } ] ``` If you switch the order of the variables in the example, then the expansion does not occur. This field corresponds to the `env` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
9866 { # Represents an environment variable present in a Container or Python Module.
9867 &quot;name&quot;: &quot;A String&quot;, # Required. Name of the environment variable. Must be a valid C identifier.
9868 &quot;value&quot;: &quot;A String&quot;, # Required. Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
9869 },
9870 ],
9871 &quot;grpcPorts&quot;: [ # Immutable. List of ports to expose from the container. Vertex AI sends gRPC prediction requests that it receives to the first port on this list. Vertex AI also sends liveness and health checks to this port. If you do not specify this field, gRPC requests to the container will be disabled. Vertex AI does not use ports other than the first one listed. This field corresponds to the `ports` field of the Kubernetes Containers v1 core API.
9872 { # Represents a network port in a container.
9873 &quot;containerPort&quot;: 42, # The number of the port to expose on the pod&#x27;s IP address. Must be a valid port number, between 1 and 65535 inclusive.
9874 },
9875 ],
9876 &quot;healthProbe&quot;: { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes readiness probe.
9877 &quot;exec&quot;: { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command.
9878 &quot;command&quot;: [ # Command is the command line to execute inside the container, the working directory for the command is root (&#x27;/&#x27;) in the container&#x27;s filesystem. The command is simply exec&#x27;d, it is not run inside a shell, so traditional shell instructions (&#x27;|&#x27;, etc) won&#x27;t work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
9879 &quot;A String&quot;,
9880 ],
9881 },
9882 &quot;failureThreshold&quot;: 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument &#x27;failureThreshold&#x27;.
9883 &quot;grpc&quot;: { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request.
9884 &quot;port&quot;: 42, # Port number of the gRPC service. Number must be in the range 1 to 65535.
9885 &quot;service&quot;: &quot;A String&quot;, # Service is the name of the service to place in the gRPC HealthCheckRequest. See https://github.com/grpc/grpc/blob/master/doc/health-checking.md. If this is not specified, the default behavior is defined by gRPC.
9886 },
9887 &quot;httpGet&quot;: { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request.
9888 &quot;host&quot;: &quot;A String&quot;, # Host name to connect to, defaults to the model serving container&#x27;s IP. You probably want to set &quot;Host&quot; in httpHeaders instead.
9889 &quot;httpHeaders&quot;: [ # Custom headers to set in the request. HTTP allows repeated headers.
9890 { # HttpHeader describes a custom header to be used in HTTP probes
9891 &quot;name&quot;: &quot;A String&quot;, # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
9892 &quot;value&quot;: &quot;A String&quot;, # The header field value
9893 },
9894 ],
9895 &quot;path&quot;: &quot;A String&quot;, # Path to access on the HTTP server.
9896 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
9897 &quot;scheme&quot;: &quot;A String&quot;, # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are &quot;HTTP&quot; or &quot;HTTPS&quot;.
9898 },
9899 &quot;initialDelaySeconds&quot;: 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument &#x27;initialDelaySeconds&#x27;.
9900 &quot;periodSeconds&quot;: 42, # How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeout_seconds. Maps to Kubernetes probe argument &#x27;periodSeconds&#x27;.
9901 &quot;successThreshold&quot;: 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument &#x27;successThreshold&#x27;.
9902 &quot;tcpSocket&quot;: { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection.
9903 &quot;host&quot;: &quot;A String&quot;, # Optional: Host name to connect to, defaults to the model serving container&#x27;s IP.
9904 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
9905 },
9906 &quot;timeoutSeconds&quot;: 42, # Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to period_seconds. Maps to Kubernetes probe argument &#x27;timeoutSeconds&#x27;.
9907 },
9908 &quot;healthRoute&quot;: &quot;A String&quot;, # Immutable. HTTP path on the container to send health checks to. Vertex AI intermittently sends GET requests to this path on the container&#x27;s IP address and port to check that the container is healthy. Read more about [health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). For example, if you set this field to `/bar`, then Vertex AI intermittently sends a GET request to the `/bar` path on the port of your container specified by the first value of this `ModelContainerSpec`&#x27;s ports field. If you don&#x27;t specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/ DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)
9909 &quot;imageUri&quot;: &quot;A String&quot;, # Required. Immutable. URI of the Docker image to be used as the custom container for serving predictions. This URI must identify an image in Artifact Registry or Container Registry. Learn more about the [container publishing requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon ModelService.UploadModel, stored internally, and this original path is afterwards not used. To learn about the requirements for the Docker image itself, see [Custom container requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI&#x27;s [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field.
9910 &quot;invokeRoutePrefix&quot;: &quot;A String&quot;, # Immutable. Invoke route prefix for the custom container. &quot;/*&quot; is the only supported value right now. By setting this field, any non-root route on this model will be accessible with invoke http call eg: &quot;/invoke/foo/bar&quot;, however the [PredictionService.Invoke] RPC is not supported yet. Only one of `predict_route` or `invoke_route_prefix` can be set, and we default to using `predict_route` if this field is not set. If this field is set, the Model can only be deployed to dedicated endpoint.
9911 &quot;livenessProbe&quot;: { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes liveness probe.
9912 &quot;exec&quot;: { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command.
9913 &quot;command&quot;: [ # Command is the command line to execute inside the container, the working directory for the command is root (&#x27;/&#x27;) in the container&#x27;s filesystem. The command is simply exec&#x27;d, it is not run inside a shell, so traditional shell instructions (&#x27;|&#x27;, etc) won&#x27;t work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
9914 &quot;A String&quot;,
9915 ],
9916 },
9917 &quot;failureThreshold&quot;: 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument &#x27;failureThreshold&#x27;.
9918 &quot;grpc&quot;: { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request.
9919 &quot;port&quot;: 42, # Port number of the gRPC service. Number must be in the range 1 to 65535.
9920 &quot;service&quot;: &quot;A String&quot;, # Service is the name of the service to place in the gRPC HealthCheckRequest. See https://github.com/grpc/grpc/blob/master/doc/health-checking.md. If this is not specified, the default behavior is defined by gRPC.
9921 },
9922 &quot;httpGet&quot;: { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request.
9923 &quot;host&quot;: &quot;A String&quot;, # Host name to connect to, defaults to the model serving container&#x27;s IP. You probably want to set &quot;Host&quot; in httpHeaders instead.
9924 &quot;httpHeaders&quot;: [ # Custom headers to set in the request. HTTP allows repeated headers.
9925 { # HttpHeader describes a custom header to be used in HTTP probes
9926 &quot;name&quot;: &quot;A String&quot;, # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
9927 &quot;value&quot;: &quot;A String&quot;, # The header field value
9928 },
9929 ],
9930 &quot;path&quot;: &quot;A String&quot;, # Path to access on the HTTP server.
9931 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
9932 &quot;scheme&quot;: &quot;A String&quot;, # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are &quot;HTTP&quot; or &quot;HTTPS&quot;.
9933 },
9934 &quot;initialDelaySeconds&quot;: 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument &#x27;initialDelaySeconds&#x27;.
9935 &quot;periodSeconds&quot;: 42, # How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeout_seconds. Maps to Kubernetes probe argument &#x27;periodSeconds&#x27;.
9936 &quot;successThreshold&quot;: 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument &#x27;successThreshold&#x27;.
9937 &quot;tcpSocket&quot;: { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection.
9938 &quot;host&quot;: &quot;A String&quot;, # Optional: Host name to connect to, defaults to the model serving container&#x27;s IP.
9939 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
9940 },
9941 &quot;timeoutSeconds&quot;: 42, # Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to period_seconds. Maps to Kubernetes probe argument &#x27;timeoutSeconds&#x27;.
9942 },
9943 &quot;ports&quot;: [ # Immutable. List of ports to expose from the container. Vertex AI sends any prediction requests that it receives to the first port on this list. Vertex AI also sends [liveness and health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```json [ { &quot;containerPort&quot;: 8080 } ] ``` Vertex AI does not use ports other than the first one listed. This field corresponds to the `ports` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
9944 { # Represents a network port in a container.
9945 &quot;containerPort&quot;: 42, # The number of the port to expose on the pod&#x27;s IP address. Must be a valid port number, between 1 and 65535 inclusive.
9946 },
9947 ],
9948 &quot;predictRoute&quot;: &quot;A String&quot;, # Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.predict to this path on the container&#x27;s IP address and port. Vertex AI then returns the container&#x27;s response in the API response. For example, if you set this field to `/foo`, then when Vertex AI receives a prediction request, it forwards the request body in a POST request to the `/foo` path on the port of your container specified by the first value of this `ModelContainerSpec`&#x27;s ports field. If you don&#x27;t specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)
9949 &quot;sharedMemorySizeMb&quot;: &quot;A String&quot;, # Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes.
9950 &quot;startupProbe&quot;: { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes startup probe.
9951 &quot;exec&quot;: { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command.
9952 &quot;command&quot;: [ # Command is the command line to execute inside the container, the working directory for the command is root (&#x27;/&#x27;) in the container&#x27;s filesystem. The command is simply exec&#x27;d, it is not run inside a shell, so traditional shell instructions (&#x27;|&#x27;, etc) won&#x27;t work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
9953 &quot;A String&quot;,
9954 ],
9955 },
9956 &quot;failureThreshold&quot;: 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument &#x27;failureThreshold&#x27;.
9957 &quot;grpc&quot;: { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request.
9958 &quot;port&quot;: 42, # Port number of the gRPC service. Number must be in the range 1 to 65535.
9959 &quot;service&quot;: &quot;A String&quot;, # Service is the name of the service to place in the gRPC HealthCheckRequest. See https://github.com/grpc/grpc/blob/master/doc/health-checking.md. If this is not specified, the default behavior is defined by gRPC.
9960 },
9961 &quot;httpGet&quot;: { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request.
9962 &quot;host&quot;: &quot;A String&quot;, # Host name to connect to, defaults to the model serving container&#x27;s IP. You probably want to set &quot;Host&quot; in httpHeaders instead.
9963 &quot;httpHeaders&quot;: [ # Custom headers to set in the request. HTTP allows repeated headers.
9964 { # HttpHeader describes a custom header to be used in HTTP probes
9965 &quot;name&quot;: &quot;A String&quot;, # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
9966 &quot;value&quot;: &quot;A String&quot;, # The header field value
9967 },
9968 ],
9969 &quot;path&quot;: &quot;A String&quot;, # Path to access on the HTTP server.
9970 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
9971 &quot;scheme&quot;: &quot;A String&quot;, # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are &quot;HTTP&quot; or &quot;HTTPS&quot;.
9972 },
9973 &quot;initialDelaySeconds&quot;: 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument &#x27;initialDelaySeconds&#x27;.
9974 &quot;periodSeconds&quot;: 42, # How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeout_seconds. Maps to Kubernetes probe argument &#x27;periodSeconds&#x27;.
9975 &quot;successThreshold&quot;: 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument &#x27;successThreshold&#x27;.
9976 &quot;tcpSocket&quot;: { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection.
9977 &quot;host&quot;: &quot;A String&quot;, # Optional: Host name to connect to, defaults to the model serving container&#x27;s IP.
9978 &quot;port&quot;: 42, # Number of the port to access on the container. Number must be in the range 1 to 65535.
9979 },
9980 &quot;timeoutSeconds&quot;: 42, # Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to period_seconds. Maps to Kubernetes probe argument &#x27;timeoutSeconds&#x27;.
9981 },
9982 },
9983 &quot;machineSpec&quot;: { # Specification of a single machine. # Output only. The machine spec.
9984 &quot;acceleratorCount&quot;: 42, # The number of accelerators to attach to the machine. For [accelerator optimized machine types](https://cloud.google.com/compute/docs/accelerator-optimized-machines), One may set the accelerator_count from 1 to N for machine with N GPUs. If accelerator_count is less than or equal to N / 2, Agent Platform co-schedules the replicas of the model into the same VM to save cost. For example, if the machine type is a3-highgpu-8g, which has 8 H100 GPUs, one can set accelerator_count to 1 to 8. If accelerator_count is 1, 2, 3, or 4, Agent Platform co-schedules 8, 4, 2, or 2 replicas of the model into the same VM to save cost. When co-scheduling, CPU, memory and storage on the VM will be distributed to replicas on the VM. For example, one can expect a co-scheduled replica requesting 2 GPUs out of a 8-GPU VM will receive 25% of the CPU, memory and storage of the VM. Note that the feature is not compatible with multihost_gpu_node_count. When multihost_gpu_node_count is set, the co-scheduling will not be enabled.
9985 &quot;acceleratorType&quot;: &quot;A String&quot;, # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count.
9986 &quot;gpuPartitionSize&quot;: &quot;A String&quot;, # Optional. Immutable. The Nvidia GPU partition size. When specified, the requested accelerators will be partitioned into smaller GPU partitions. For example, if the request is for 8 units of NVIDIA A100 GPUs, and gpu_partition_size=&quot;1g.10gb&quot;, the service will create 8 * 7 = 56 partitioned MIG instances. The partition size must be a value supported by the requested accelerator. Refer to [Nvidia GPU Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions) for the available partition sizes. If set, the accelerator_count should be set to 1.
9987 &quot;machineType&quot;: &quot;A String&quot;, # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/gemini-enterprise-agent-platform/machine-learning/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/gemini-enterprise-agent-platform/machine-learning/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required.
9988 &quot;minGpuDriverVersion&quot;: &quot;A String&quot;, # Optional. Immutable. The minimum GPU driver version that this machine requires. For example, &quot;535.104.06&quot;. If not specified, the default GPU driver version will be used by the underlying infrastructure.
9989 &quot;multihostGpuNodeCount&quot;: 42, # Optional. Immutable. The number of nodes per replica for multihost GPU deployments.
9990 &quot;reservationAffinity&quot;: { # A ReservationAffinity can be used to configure a Vertex AI resource (e.g., a DeployedModel) to draw its Compute Engine resources from a Shared Reservation, or exclusively from on-demand capacity. # Optional. Immutable. Configuration controlling how this resource pool consumes reservation.
9991 &quot;key&quot;: &quot;A String&quot;, # Optional. Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, use `compute.googleapis.com/reservation-name` as the key and specify the name of your reservation as its value.
9992 &quot;reservationAffinityType&quot;: &quot;A String&quot;, # Required. Specifies the reservation affinity type.
9993 &quot;values&quot;: [ # Optional. Corresponds to the label values of a reservation resource. This must be the full resource name of the reservation or reservation block.
9994 &quot;A String&quot;,
9995 ],
9996 },
9997 &quot;tpuTopology&quot;: &quot;A String&quot;, # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: &quot;2x2x1&quot;).
9998 },
9999 },
10000 ],
10001 }</pre>
10002 </div>
10003
10004 <div class="method">
10005 <code class="details" id="retrieveContexts">retrieveContexts(parent, body=None, x__xgafv=None)</code>
10006 <pre>Retrieves relevant contexts for a query.
10007
10008 Args:
10009 parent: string, Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. (required)
10010 body: object, The request body.
10011 The object takes the form of:
10012
10013 { # Request message for VertexRagService.RetrieveContexts.
10014 &quot;query&quot;: { # A query to retrieve relevant contexts. # Required. Single RAG retrieve query.
10015 &quot;ragRetrievalConfig&quot;: { # Specifies the context retrieval config. # Optional. The retrieval config for the query.
10016 &quot;filter&quot;: { # Config for filters. # Optional. Config for filters.
10017 &quot;metadataFilter&quot;: &quot;A String&quot;, # Optional. String for metadata filtering.
10018 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only returns contexts with vector distance smaller than the threshold.
10019 &quot;vectorSimilarityThreshold&quot;: 3.14, # Optional. Only returns contexts with vector similarity larger than the threshold.
10020 },
10021 &quot;hybridSearch&quot;: { # Config for Hybrid Search. # Optional. Config for Hybrid Search.
10022 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
10023 },
10024 &quot;ranking&quot;: { # Config for ranking and reranking. # Optional. Config for ranking and reranking.
10025 &quot;llmRanker&quot;: { # Config for LlmRanker. # Optional. Config for LlmRanker.
10026 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).
10027 },
10028 &quot;rankService&quot;: { # Config for Rank Service. # Optional. Config for Rank Service.
10029 &quot;modelName&quot;: &quot;A String&quot;, # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest`
10030 },
10031 },
10032 &quot;topK&quot;: 42, # Optional. The number of contexts to retrieve.
10033 },
10034 &quot;ranking&quot;: { # Configurations for hybrid search results ranking. # Optional. Configurations for hybrid search results ranking.
10035 &quot;alpha&quot;: 3.14, # Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.
10036 },
10037 &quot;similarityTopK&quot;: 42, # Optional. The number of contexts to retrieve.
10038 &quot;text&quot;: &quot;A String&quot;, # Optional. The query in text format to get relevant contexts.
10039 },
10040 &quot;vertexRagStore&quot;: { # The data source for Vertex RagStore. # The data source for Vertex RagStore.
10041 &quot;ragCorpora&quot;: [ # Optional. Deprecated. Please use rag_resources to specify the data source.
10042 &quot;A String&quot;,
10043 ],
10044 &quot;ragResources&quot;: [ # Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.
10045 { # The definition of the Rag resource.
10046 &quot;ragCorpus&quot;: &quot;A String&quot;, # Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
10047 &quot;ragFileIds&quot;: [ # Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
10048 &quot;A String&quot;,
10049 ],
10050 },
10051 ],
10052 &quot;vectorDistanceThreshold&quot;: 3.14, # Optional. Only return contexts with vector distance smaller than the threshold.
10053 },
10054 }
10055
10056 x__xgafv: string, V1 error format.
10057 Allowed values
10058 1 - v1 error format
10059 2 - v2 error format
10060
10061 Returns:
10062 An object of the form:
10063
10064 { # Response message for VertexRagService.RetrieveContexts.
10065 &quot;contexts&quot;: { # Relevant contexts for one query. # The contexts of the query.
10066 &quot;contexts&quot;: [ # All its contexts.
10067 { # A context of the query.
10068 &quot;chunk&quot;: { # A RagChunk includes the content of a chunk of a RagFile, and associated metadata. # Context of the retrieved chunk.
10069 &quot;chunkId&quot;: &quot;A String&quot;, # The ID of the chunk.
10070 &quot;fileId&quot;: &quot;A String&quot;, # The ID of the file that the chunk belongs to.
10071 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # If populated, represents where the chunk starts and ends in the document.
10072 &quot;firstPage&quot;: 42, # Page where chunk starts in the document. Inclusive. 1-indexed.
10073 &quot;lastPage&quot;: 42, # Page where chunk ends in the document. Inclusive. 1-indexed.
10074 },
10075 &quot;text&quot;: &quot;A String&quot;, # The content of the chunk.
10076 },
10077 &quot;distance&quot;: 3.14, # The distance between the query dense embedding vector and the context text vector.
10078 &quot;score&quot;: 3.14, # According to the underlying Vector DB and the selected metric type, the score can be either the distance or the similarity between the query and the context and its range depends on the metric type. For example, if the metric type is COSINE_DISTANCE, it represents the distance between the query and the context. The larger the distance, the less relevant the context is to the query. The range is [0, 2], while 0 means the most relevant and 2 means the least relevant.
10079 &quot;sourceDisplayName&quot;: &quot;A String&quot;, # The file display name.
10080 &quot;sourceUri&quot;: &quot;A String&quot;, # If the file is imported from Cloud Storage or Google Drive, source_uri will be original file URI in Cloud Storage or Google Drive; if file is uploaded, source_uri will be file display name.
10081 &quot;sparseDistance&quot;: 3.14, # The distance between the query sparse embedding vector and the context text vector.
10082 &quot;text&quot;: &quot;A String&quot;, # The text chunk.
10083 },
10084 ],
10085 },
10086 }</pre>
10087 </div>
10088
10089 <div class="method">
10090 <code class="details" id="updateRagEngineConfig">updateRagEngineConfig(name, body=None, x__xgafv=None)</code>
10091 <pre>Updates a RagEngineConfig.
10092
10093 Args:
10094 name: string, Identifier. The name of the RagEngineConfig. Format: `projects/{project}/locations/{location}/ragEngineConfig` (required)
10095 body: object, The request body.
10096 The object takes the form of:
10097
10098 { # Config for RagEngine.
10099 &quot;name&quot;: &quot;A String&quot;, # Identifier. The name of the RagEngineConfig. Format: `projects/{project}/locations/{location}/ragEngineConfig`
10100 &quot;ragManagedDbConfig&quot;: { # Configuration message for RagManagedDb used by RagEngine. # The config of the RagManagedDb used by RagEngine.
10101 &quot;basic&quot;: { # Basic tier is a cost-effective and low compute tier suitable for the following cases: * Experimenting with RagManagedDb. * Small data size. * Latency insensitive workload. * Only using RAG Engine with external vector DBs. NOTE: This is the default tier under Spanner mode if not explicitly chosen. # Deprecated: Use `mode` instead to set the tier under Spanner. Sets the RagManagedDb to the Basic tier.
10102 },
10103 &quot;enterprise&quot;: { # Enterprise tier offers production grade performance along with autoscaling functionality. It is suitable for customers with large amounts of data or performance sensitive workloads. # Sets the RagManagedDb to the Enterprise tier.
10104 },
10105 &quot;scaled&quot;: { # Scaled tier offers production grade performance along with autoscaling functionality. It is suitable for customers with large amounts of data or performance sensitive workloads. # Deprecated: Use `mode` instead to set the tier under Spanner. Sets the RagManagedDb to the Scaled tier.
10106 },
10107 &quot;serverless&quot;: { # Message to configure the serverless mode offered by RAG Engine. # Sets the backend to be the serverless mode offered by RAG Engine.
10108 },
10109 &quot;spanner&quot;: { # Message to configure the Spanner database used by RagManagedDb. # Sets the RAG Engine backend to be RagManagedDb, built on top of Spanner. NOTE: This is the default mode (w/ Basic Tier) if not explicitly chosen.
10110 &quot;basic&quot;: { # Basic tier is a cost-effective and low compute tier suitable for the following cases: * Experimenting with RagManagedDb. * Small data size. * Latency insensitive workload. * Only using RAG Engine with external vector DBs. NOTE: This is the default tier under Spanner mode if not explicitly chosen. # Sets the RagManagedDb to the Basic tier. This is the default tier for Spanner mode if not explicitly chosen.
10111 },
10112 &quot;scaled&quot;: { # Scaled tier offers production grade performance along with autoscaling functionality. It is suitable for customers with large amounts of data or performance sensitive workloads. # Sets the RagManagedDb to the Scaled tier.
10113 },
10114 &quot;unprovisioned&quot;: { # Disables the RAG Engine service and deletes all your data held within this service. This will halt the billing of the service. NOTE: Once deleted the data cannot be recovered. To start using RAG Engine again, you will need to update the tier by calling the UpdateRagEngineConfig API. # Sets the RagManagedDb to the Unprovisioned tier.
10115 },
10116 },
10117 &quot;unprovisioned&quot;: { # Disables the RAG Engine service and deletes all your data held within this service. This will halt the billing of the service. NOTE: Once deleted the data cannot be recovered. To start using RAG Engine again, you will need to update the tier by calling the UpdateRagEngineConfig API. # Deprecated: Use `mode` instead to set the tier under Spanner. Sets the RagManagedDb to the Unprovisioned tier.
10118 },
10119 },
10120 }
10121
10122 x__xgafv: string, V1 error format.
10123 Allowed values
10124 1 - v1 error format
10125 2 - v2 error format
10126
10127 Returns:
10128 An object of the form:
10129
10130 { # This resource represents a long-running operation that is the result of a network API call.
10131 &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.
10132 &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.
10133 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
10134 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
10135 {
10136 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
10137 },
10138 ],
10139 &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.
10140 },
10141 &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.
10142 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
10143 },
10144 &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}`.
10145 &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`.
10146 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
10147 },
10148 }</pre>
10149 </div>
10150
10151 <div class="method">
10152 <code class="details" id="updateSemanticGovernancePolicyEngine">updateSemanticGovernancePolicyEngine(name, body=None, updateMask=None, x__xgafv=None)</code>
10153 <pre>Updates a SemanticGovernancePolicyEngine. This method performs an upsert operation. If the SemanticGovernancePolicyEngine resource does not exist, it will be created. Otherwise, it will be updated.
10154
10155 Args:
10156 name: string, Identifier. The resource name of the SemanticGovernancePolicyEngine. Format: projects/{project}/locations/{location}/semanticGovernancePolicyEngine (required)
10157 body: object, The request body.
10158 The object takes the form of:
10159
10160 { # Define a singleton SemanticGovernancePolicyEngine resource under a project and location.
10161 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this SemanticGovernancePolicyEngine was created.
10162 &quot;gatewayConfigs&quot;: { # Optional. Configurations for gateways. The keys are user-defined names for each gateway. At most 5 gateway configurations are allowed.
10163 &quot;a_key&quot;: { # Configuration for a single gateway.
10164 &quot;dnsRecord&quot;: &quot;A String&quot;, # Output only. The fully qualified record name of the created A-record in Cloud DNS.
10165 &quot;dnsZoneName&quot;: &quot;A String&quot;, # Optional. FQDN of the private DNS zone to create DNS record set for PSC endpoint.
10166 &quot;ipAddress&quot;: &quot;A String&quot;, # Output only. The private IP address of the PSC endpoint.
10167 &quot;network&quot;: &quot;A String&quot;, # Optional. The URI of the network resource where PSC-E will be provisioned. if not provided `default` network will be used. Format: projects/{project}/global/networks/{network}
10168 &quot;pscEndpoint&quot;: &quot;A String&quot;, # Output only. The self-link or name of the Private Service Connect endpoint forwarding rule.
10169 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the Gateway configuration.
10170 &quot;subnetwork&quot;: &quot;A String&quot;, # Optional. The URI of the subnetwork resource where PSC-E will be provisioned. if not provided `default` subnet will be used from the same {location} Format: projects/{project}/regions/{region}/subnetworks/{subnetwork}
10171 },
10172 },
10173 &quot;ipAddress&quot;: &quot;A String&quot;, # Output only. The private IPv4 address of the PSC endpoint.
10174 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name of the SemanticGovernancePolicyEngine. Format: projects/{project}/locations/{location}/semanticGovernancePolicyEngine
10175 &quot;pscForwardingRule&quot;: &quot;A String&quot;, # Output only. The URI of the PSC endpoint resource created in customer project. Format: projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}
10176 &quot;pscServiceAttachment&quot;: &quot;A String&quot;, # Output only. URI of the PSC attachment resource provided by SGP. Format: projects/{project}/regions/{region}/serviceAttachments/{service_attachment}
10177 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the SemanticGovernancePolicyEngine.
10178 &quot;targetProject&quot;: &quot;A String&quot;, # Optional. The project where network, subnetwork and dns resources are located. If not provided, it is assumed to be the same project of SemanticGovernancePolicyEngine. This field is for Shared VPC scenarios, where network resources may be in a target project and SGP engine in a service project.
10179 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this SemanticGovernancePolicyEngine was last updated.
10180 }
10181
10182 updateMask: string, Optional. Specifies the fields to be overwritten in the SemanticGovernancePolicyEngine resource by the update. The fields specified in the update_mask are relative to the resource itself. If no update_mask is provided, all fields are overwritten.
10183 x__xgafv: string, V1 error format.
10184 Allowed values
10185 1 - v1 error format
10186 2 - v2 error format
10187
10188 Returns:
10189 An object of the form:
10190
10191 { # This resource represents a long-running operation that is the result of a network API call.
10192 &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.
10193 &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.
10194 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
10195 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
10196 {
10197 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
10198 },
10199 ],
10200 &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.
10201 },
10202 &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.
10203 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
10204 },
10205 &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}`.
10206 &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`.
10207 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
10208 },
10209 }</pre>
10210 </div>
10211
10212 </body></html>