File: discoveryengine_v1beta.projects.locations.collections.engines.assistants.html

package info (click to toggle)
python-googleapi 2.188.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 573,720 kB
  • sloc: python: 11,217; javascript: 249; sh: 114; makefile: 59
file content (650 lines) | stat: -rw-r--r-- 61,429 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="discoveryengine_v1beta.html">Discovery Engine API</a> . <a href="discoveryengine_v1beta.projects.html">projects</a> . <a href="discoveryengine_v1beta.projects.locations.html">locations</a> . <a href="discoveryengine_v1beta.projects.locations.collections.html">collections</a> . <a href="discoveryengine_v1beta.projects.locations.collections.engines.html">engines</a> . <a href="discoveryengine_v1beta.projects.locations.collections.engines.assistants.html">assistants</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="discoveryengine_v1beta.projects.locations.collections.engines.assistants.agents.html">agents()</a></code>
</p>
<p class="firstline">Returns the agents Resource.</p>

<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#create">create(parent, assistantId=None, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates an Assistant.</p>
<p class="toc_element">
  <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
<p class="firstline">Deletes an Assistant.</p>
<p class="toc_element">
  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Gets an Assistant.</p>
<p class="toc_element">
  <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists all Assistants under an Engine.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
  <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates an Assistant</p>
<p class="toc_element">
  <code><a href="#streamAssist">streamAssist(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Assists the user with a query in a streaming fashion.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="create">create(parent, assistantId=None, body=None, x__xgafv=None)</code>
  <pre>Creates an Assistant.

Args:
  parent: string, Required. The parent resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` (required)
  body: object, The request body.
    The object takes the form of:

{ # Discovery Engine Assistant resource.
  &quot;customerPolicy&quot;: { # Customer-defined policy for the assistant. # Optional. Customer policy for the assistant.
    &quot;bannedPhrases&quot;: [ # Optional. List of banned phrases.
      { # Definition of a customer-defined banned phrase. A banned phrase is not allowed to appear in the user query or the LLM response, or else the answer will be refused.
        &quot;ignoreDiacritics&quot;: True or False, # Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, &quot;cafe&quot; would match &quot;café&quot;.
        &quot;matchType&quot;: &quot;A String&quot;, # Optional. Match type for the banned phrase.
        &quot;phrase&quot;: &quot;A String&quot;, # Required. The raw string content to be banned.
      },
    ],
    &quot;modelArmorConfig&quot;: { # Configuration for customer defined Model Armor templates to be used for sanitizing user prompts and assistant responses. # Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.
      &quot;failureMode&quot;: &quot;A String&quot;, # Optional. Defines the failure mode for Model Armor sanitization.
      &quot;responseTemplate&quot;: &quot;A String&quot;, # Optional. The resource name of the Model Armor template for sanitizing assistant responses. Format: `projects/{project}/locations/{location}/templates/{template_id}` If not specified, no sanitization will be applied to the assistant response.
      &quot;userPromptTemplate&quot;: &quot;A String&quot;, # Optional. The resource name of the Model Armor template for sanitizing user prompts. Format: `projects/{project}/locations/{location}/templates/{template_id}` If not specified, no sanitization will be applied to the user prompt.
    },
  },
  &quot;defaultWebGroundingToggleOff&quot;: True or False, # Optional. This field controls the default web grounding toggle for end users if `web_grounding_type` is set to `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is set to false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web grounding enabled by default on UI. If true, grounding toggle will be disabled by default on UI. End users can still enable web grounding in the UI if web grounding is enabled.
  &quot;description&quot;: &quot;A String&quot;, # Optional. Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
  &quot;enabledTools&quot;: { # Optional. Note: not implemented yet. Use enabled_actions instead. The enabled tools on this assistant. The keys are connector name, for example &quot;projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {&quot;jira1ConnectorName&quot;: [(toolId1, &quot;createTicket&quot;), (toolId2, &quot;transferTicket&quot;)], &quot;gmail1ConnectorName&quot;: [(toolId3, &quot;sendEmail&quot;),..] }
    &quot;a_key&quot;: { # The enabled tools on a connector
      &quot;toolInfo&quot;: [ # The list of tools with corresponding tool information.
        { # Information to identify a tool.
          &quot;toolDisplayName&quot;: &quot;A String&quot;, # The display name of the tool.
          &quot;toolName&quot;: &quot;A String&quot;, # The name of the tool as defined by DataConnectorService.QueryAvailableActions. Note: it&#x27;s using `action` in the DataConnectorService apis, but they are the same as the `tool` here.
        },
      ],
    },
  },
  &quot;generationConfig&quot;: { # Configuration for the generation of the assistant response. # Optional. Configuration for the generation of the assistant response.
    &quot;allowedModelIds&quot;: [ # Optional. The list of models that are allowed to be used for assistant.
      &quot;A String&quot;,
    ],
    &quot;defaultLanguage&quot;: &quot;A String&quot;, # The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as `en`. If not specified, the language will be automatically detected.
    &quot;defaultModelId&quot;: &quot;A String&quot;, # Optional. The default model to use for assistant.
    &quot;systemInstruction&quot;: { # System instruction, also known as the prompt preamble for LLM calls. # System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
      &quot;additionalSystemInstruction&quot;: &quot;A String&quot;, # Optional. Additional system instruction that will be added to the default system instruction.
    },
  },
  &quot;name&quot;: &quot;A String&quot;, # Immutable. Resource name of the assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` It must be a UTF-8 encoded string with a length limit of 1024 characters.
  &quot;webGroundingType&quot;: &quot;A String&quot;, # Optional. The type of web grounding to use.
}

  assistantId: string, Required. The ID to use for the Assistant, which will become the final component of the Assistant&#x27;s resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) with a length limit of 63 characters.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Discovery Engine Assistant resource.
  &quot;customerPolicy&quot;: { # Customer-defined policy for the assistant. # Optional. Customer policy for the assistant.
    &quot;bannedPhrases&quot;: [ # Optional. List of banned phrases.
      { # Definition of a customer-defined banned phrase. A banned phrase is not allowed to appear in the user query or the LLM response, or else the answer will be refused.
        &quot;ignoreDiacritics&quot;: True or False, # Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, &quot;cafe&quot; would match &quot;café&quot;.
        &quot;matchType&quot;: &quot;A String&quot;, # Optional. Match type for the banned phrase.
        &quot;phrase&quot;: &quot;A String&quot;, # Required. The raw string content to be banned.
      },
    ],
    &quot;modelArmorConfig&quot;: { # Configuration for customer defined Model Armor templates to be used for sanitizing user prompts and assistant responses. # Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.
      &quot;failureMode&quot;: &quot;A String&quot;, # Optional. Defines the failure mode for Model Armor sanitization.
      &quot;responseTemplate&quot;: &quot;A String&quot;, # Optional. The resource name of the Model Armor template for sanitizing assistant responses. Format: `projects/{project}/locations/{location}/templates/{template_id}` If not specified, no sanitization will be applied to the assistant response.
      &quot;userPromptTemplate&quot;: &quot;A String&quot;, # Optional. The resource name of the Model Armor template for sanitizing user prompts. Format: `projects/{project}/locations/{location}/templates/{template_id}` If not specified, no sanitization will be applied to the user prompt.
    },
  },
  &quot;defaultWebGroundingToggleOff&quot;: True or False, # Optional. This field controls the default web grounding toggle for end users if `web_grounding_type` is set to `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is set to false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web grounding enabled by default on UI. If true, grounding toggle will be disabled by default on UI. End users can still enable web grounding in the UI if web grounding is enabled.
  &quot;description&quot;: &quot;A String&quot;, # Optional. Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
  &quot;enabledTools&quot;: { # Optional. Note: not implemented yet. Use enabled_actions instead. The enabled tools on this assistant. The keys are connector name, for example &quot;projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {&quot;jira1ConnectorName&quot;: [(toolId1, &quot;createTicket&quot;), (toolId2, &quot;transferTicket&quot;)], &quot;gmail1ConnectorName&quot;: [(toolId3, &quot;sendEmail&quot;),..] }
    &quot;a_key&quot;: { # The enabled tools on a connector
      &quot;toolInfo&quot;: [ # The list of tools with corresponding tool information.
        { # Information to identify a tool.
          &quot;toolDisplayName&quot;: &quot;A String&quot;, # The display name of the tool.
          &quot;toolName&quot;: &quot;A String&quot;, # The name of the tool as defined by DataConnectorService.QueryAvailableActions. Note: it&#x27;s using `action` in the DataConnectorService apis, but they are the same as the `tool` here.
        },
      ],
    },
  },
  &quot;generationConfig&quot;: { # Configuration for the generation of the assistant response. # Optional. Configuration for the generation of the assistant response.
    &quot;allowedModelIds&quot;: [ # Optional. The list of models that are allowed to be used for assistant.
      &quot;A String&quot;,
    ],
    &quot;defaultLanguage&quot;: &quot;A String&quot;, # The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as `en`. If not specified, the language will be automatically detected.
    &quot;defaultModelId&quot;: &quot;A String&quot;, # Optional. The default model to use for assistant.
    &quot;systemInstruction&quot;: { # System instruction, also known as the prompt preamble for LLM calls. # System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
      &quot;additionalSystemInstruction&quot;: &quot;A String&quot;, # Optional. Additional system instruction that will be added to the default system instruction.
    },
  },
  &quot;name&quot;: &quot;A String&quot;, # Immutable. Resource name of the assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` It must be a UTF-8 encoded string with a length limit of 1024 characters.
  &quot;webGroundingType&quot;: &quot;A String&quot;, # Optional. The type of web grounding to use.
}</pre>
</div>

<div class="method">
    <code class="details" id="delete">delete(name, x__xgafv=None)</code>
  <pre>Deletes an Assistant.

Args:
  name: string, Required. Resource name of Assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` If the caller does not have permission to delete the Assistant, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Assistant to delete does not exist, a NOT_FOUND error is returned. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}</pre>
</div>

<div class="method">
    <code class="details" id="get">get(name, x__xgafv=None)</code>
  <pre>Gets an Assistant.

Args:
  name: string, Required. Resource name of Assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Discovery Engine Assistant resource.
  &quot;customerPolicy&quot;: { # Customer-defined policy for the assistant. # Optional. Customer policy for the assistant.
    &quot;bannedPhrases&quot;: [ # Optional. List of banned phrases.
      { # Definition of a customer-defined banned phrase. A banned phrase is not allowed to appear in the user query or the LLM response, or else the answer will be refused.
        &quot;ignoreDiacritics&quot;: True or False, # Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, &quot;cafe&quot; would match &quot;café&quot;.
        &quot;matchType&quot;: &quot;A String&quot;, # Optional. Match type for the banned phrase.
        &quot;phrase&quot;: &quot;A String&quot;, # Required. The raw string content to be banned.
      },
    ],
    &quot;modelArmorConfig&quot;: { # Configuration for customer defined Model Armor templates to be used for sanitizing user prompts and assistant responses. # Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.
      &quot;failureMode&quot;: &quot;A String&quot;, # Optional. Defines the failure mode for Model Armor sanitization.
      &quot;responseTemplate&quot;: &quot;A String&quot;, # Optional. The resource name of the Model Armor template for sanitizing assistant responses. Format: `projects/{project}/locations/{location}/templates/{template_id}` If not specified, no sanitization will be applied to the assistant response.
      &quot;userPromptTemplate&quot;: &quot;A String&quot;, # Optional. The resource name of the Model Armor template for sanitizing user prompts. Format: `projects/{project}/locations/{location}/templates/{template_id}` If not specified, no sanitization will be applied to the user prompt.
    },
  },
  &quot;defaultWebGroundingToggleOff&quot;: True or False, # Optional. This field controls the default web grounding toggle for end users if `web_grounding_type` is set to `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is set to false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web grounding enabled by default on UI. If true, grounding toggle will be disabled by default on UI. End users can still enable web grounding in the UI if web grounding is enabled.
  &quot;description&quot;: &quot;A String&quot;, # Optional. Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
  &quot;enabledTools&quot;: { # Optional. Note: not implemented yet. Use enabled_actions instead. The enabled tools on this assistant. The keys are connector name, for example &quot;projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {&quot;jira1ConnectorName&quot;: [(toolId1, &quot;createTicket&quot;), (toolId2, &quot;transferTicket&quot;)], &quot;gmail1ConnectorName&quot;: [(toolId3, &quot;sendEmail&quot;),..] }
    &quot;a_key&quot;: { # The enabled tools on a connector
      &quot;toolInfo&quot;: [ # The list of tools with corresponding tool information.
        { # Information to identify a tool.
          &quot;toolDisplayName&quot;: &quot;A String&quot;, # The display name of the tool.
          &quot;toolName&quot;: &quot;A String&quot;, # The name of the tool as defined by DataConnectorService.QueryAvailableActions. Note: it&#x27;s using `action` in the DataConnectorService apis, but they are the same as the `tool` here.
        },
      ],
    },
  },
  &quot;generationConfig&quot;: { # Configuration for the generation of the assistant response. # Optional. Configuration for the generation of the assistant response.
    &quot;allowedModelIds&quot;: [ # Optional. The list of models that are allowed to be used for assistant.
      &quot;A String&quot;,
    ],
    &quot;defaultLanguage&quot;: &quot;A String&quot;, # The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as `en`. If not specified, the language will be automatically detected.
    &quot;defaultModelId&quot;: &quot;A String&quot;, # Optional. The default model to use for assistant.
    &quot;systemInstruction&quot;: { # System instruction, also known as the prompt preamble for LLM calls. # System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
      &quot;additionalSystemInstruction&quot;: &quot;A String&quot;, # Optional. Additional system instruction that will be added to the default system instruction.
    },
  },
  &quot;name&quot;: &quot;A String&quot;, # Immutable. Resource name of the assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` It must be a UTF-8 encoded string with a length limit of 1024 characters.
  &quot;webGroundingType&quot;: &quot;A String&quot;, # Optional. The type of web grounding to use.
}</pre>
</div>

<div class="method">
    <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
  <pre>Lists all Assistants under an Engine.

Args:
  parent: string, Required. The parent resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` (required)
  pageSize: integer, Maximum number of Assistants to return. If unspecified, defaults to 100. The maximum allowed value is 1000; anything above that will be coerced down to 1000.
  pageToken: string, A page token ListAssistantsResponse.next_page_token, received from a previous AssistantService.ListAssistants call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAssistants must match the call that provided the page token.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for the AssistantService.ListAssistants method.
  &quot;assistants&quot;: [ # All the customer&#x27;s Assistants.
    { # Discovery Engine Assistant resource.
      &quot;customerPolicy&quot;: { # Customer-defined policy for the assistant. # Optional. Customer policy for the assistant.
        &quot;bannedPhrases&quot;: [ # Optional. List of banned phrases.
          { # Definition of a customer-defined banned phrase. A banned phrase is not allowed to appear in the user query or the LLM response, or else the answer will be refused.
            &quot;ignoreDiacritics&quot;: True or False, # Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, &quot;cafe&quot; would match &quot;café&quot;.
            &quot;matchType&quot;: &quot;A String&quot;, # Optional. Match type for the banned phrase.
            &quot;phrase&quot;: &quot;A String&quot;, # Required. The raw string content to be banned.
          },
        ],
        &quot;modelArmorConfig&quot;: { # Configuration for customer defined Model Armor templates to be used for sanitizing user prompts and assistant responses. # Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.
          &quot;failureMode&quot;: &quot;A String&quot;, # Optional. Defines the failure mode for Model Armor sanitization.
          &quot;responseTemplate&quot;: &quot;A String&quot;, # Optional. The resource name of the Model Armor template for sanitizing assistant responses. Format: `projects/{project}/locations/{location}/templates/{template_id}` If not specified, no sanitization will be applied to the assistant response.
          &quot;userPromptTemplate&quot;: &quot;A String&quot;, # Optional. The resource name of the Model Armor template for sanitizing user prompts. Format: `projects/{project}/locations/{location}/templates/{template_id}` If not specified, no sanitization will be applied to the user prompt.
        },
      },
      &quot;defaultWebGroundingToggleOff&quot;: True or False, # Optional. This field controls the default web grounding toggle for end users if `web_grounding_type` is set to `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is set to false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web grounding enabled by default on UI. If true, grounding toggle will be disabled by default on UI. End users can still enable web grounding in the UI if web grounding is enabled.
      &quot;description&quot;: &quot;A String&quot;, # Optional. Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
      &quot;displayName&quot;: &quot;A String&quot;, # Required. The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
      &quot;enabledTools&quot;: { # Optional. Note: not implemented yet. Use enabled_actions instead. The enabled tools on this assistant. The keys are connector name, for example &quot;projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {&quot;jira1ConnectorName&quot;: [(toolId1, &quot;createTicket&quot;), (toolId2, &quot;transferTicket&quot;)], &quot;gmail1ConnectorName&quot;: [(toolId3, &quot;sendEmail&quot;),..] }
        &quot;a_key&quot;: { # The enabled tools on a connector
          &quot;toolInfo&quot;: [ # The list of tools with corresponding tool information.
            { # Information to identify a tool.
              &quot;toolDisplayName&quot;: &quot;A String&quot;, # The display name of the tool.
              &quot;toolName&quot;: &quot;A String&quot;, # The name of the tool as defined by DataConnectorService.QueryAvailableActions. Note: it&#x27;s using `action` in the DataConnectorService apis, but they are the same as the `tool` here.
            },
          ],
        },
      },
      &quot;generationConfig&quot;: { # Configuration for the generation of the assistant response. # Optional. Configuration for the generation of the assistant response.
        &quot;allowedModelIds&quot;: [ # Optional. The list of models that are allowed to be used for assistant.
          &quot;A String&quot;,
        ],
        &quot;defaultLanguage&quot;: &quot;A String&quot;, # The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as `en`. If not specified, the language will be automatically detected.
        &quot;defaultModelId&quot;: &quot;A String&quot;, # Optional. The default model to use for assistant.
        &quot;systemInstruction&quot;: { # System instruction, also known as the prompt preamble for LLM calls. # System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
          &quot;additionalSystemInstruction&quot;: &quot;A String&quot;, # Optional. Additional system instruction that will be added to the default system instruction.
        },
      },
      &quot;name&quot;: &quot;A String&quot;, # Immutable. Resource name of the assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` It must be a UTF-8 encoded string with a length limit of 1024 characters.
      &quot;webGroundingType&quot;: &quot;A String&quot;, # Optional. The type of web grounding to use.
    },
  ],
  &quot;nextPageToken&quot;: &quot;A String&quot;, # A token that can be sent as ListAssistantsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.
}</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next()</code>
  <pre>Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call &#x27;execute()&#x27; on to request the next
          page. Returns None if there are no more items in the collection.
        </pre>
</div>

<div class="method">
    <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
  <pre>Updates an Assistant

Args:
  name: string, Immutable. Resource name of the assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` It must be a UTF-8 encoded string with a length limit of 1024 characters. (required)
  body: object, The request body.
    The object takes the form of:

{ # Discovery Engine Assistant resource.
  &quot;customerPolicy&quot;: { # Customer-defined policy for the assistant. # Optional. Customer policy for the assistant.
    &quot;bannedPhrases&quot;: [ # Optional. List of banned phrases.
      { # Definition of a customer-defined banned phrase. A banned phrase is not allowed to appear in the user query or the LLM response, or else the answer will be refused.
        &quot;ignoreDiacritics&quot;: True or False, # Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, &quot;cafe&quot; would match &quot;café&quot;.
        &quot;matchType&quot;: &quot;A String&quot;, # Optional. Match type for the banned phrase.
        &quot;phrase&quot;: &quot;A String&quot;, # Required. The raw string content to be banned.
      },
    ],
    &quot;modelArmorConfig&quot;: { # Configuration for customer defined Model Armor templates to be used for sanitizing user prompts and assistant responses. # Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.
      &quot;failureMode&quot;: &quot;A String&quot;, # Optional. Defines the failure mode for Model Armor sanitization.
      &quot;responseTemplate&quot;: &quot;A String&quot;, # Optional. The resource name of the Model Armor template for sanitizing assistant responses. Format: `projects/{project}/locations/{location}/templates/{template_id}` If not specified, no sanitization will be applied to the assistant response.
      &quot;userPromptTemplate&quot;: &quot;A String&quot;, # Optional. The resource name of the Model Armor template for sanitizing user prompts. Format: `projects/{project}/locations/{location}/templates/{template_id}` If not specified, no sanitization will be applied to the user prompt.
    },
  },
  &quot;defaultWebGroundingToggleOff&quot;: True or False, # Optional. This field controls the default web grounding toggle for end users if `web_grounding_type` is set to `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is set to false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web grounding enabled by default on UI. If true, grounding toggle will be disabled by default on UI. End users can still enable web grounding in the UI if web grounding is enabled.
  &quot;description&quot;: &quot;A String&quot;, # Optional. Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
  &quot;enabledTools&quot;: { # Optional. Note: not implemented yet. Use enabled_actions instead. The enabled tools on this assistant. The keys are connector name, for example &quot;projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {&quot;jira1ConnectorName&quot;: [(toolId1, &quot;createTicket&quot;), (toolId2, &quot;transferTicket&quot;)], &quot;gmail1ConnectorName&quot;: [(toolId3, &quot;sendEmail&quot;),..] }
    &quot;a_key&quot;: { # The enabled tools on a connector
      &quot;toolInfo&quot;: [ # The list of tools with corresponding tool information.
        { # Information to identify a tool.
          &quot;toolDisplayName&quot;: &quot;A String&quot;, # The display name of the tool.
          &quot;toolName&quot;: &quot;A String&quot;, # The name of the tool as defined by DataConnectorService.QueryAvailableActions. Note: it&#x27;s using `action` in the DataConnectorService apis, but they are the same as the `tool` here.
        },
      ],
    },
  },
  &quot;generationConfig&quot;: { # Configuration for the generation of the assistant response. # Optional. Configuration for the generation of the assistant response.
    &quot;allowedModelIds&quot;: [ # Optional. The list of models that are allowed to be used for assistant.
      &quot;A String&quot;,
    ],
    &quot;defaultLanguage&quot;: &quot;A String&quot;, # The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as `en`. If not specified, the language will be automatically detected.
    &quot;defaultModelId&quot;: &quot;A String&quot;, # Optional. The default model to use for assistant.
    &quot;systemInstruction&quot;: { # System instruction, also known as the prompt preamble for LLM calls. # System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
      &quot;additionalSystemInstruction&quot;: &quot;A String&quot;, # Optional. Additional system instruction that will be added to the default system instruction.
    },
  },
  &quot;name&quot;: &quot;A String&quot;, # Immutable. Resource name of the assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` It must be a UTF-8 encoded string with a length limit of 1024 characters.
  &quot;webGroundingType&quot;: &quot;A String&quot;, # Optional. The type of web grounding to use.
}

  updateMask: string, The list of fields to update.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Discovery Engine Assistant resource.
  &quot;customerPolicy&quot;: { # Customer-defined policy for the assistant. # Optional. Customer policy for the assistant.
    &quot;bannedPhrases&quot;: [ # Optional. List of banned phrases.
      { # Definition of a customer-defined banned phrase. A banned phrase is not allowed to appear in the user query or the LLM response, or else the answer will be refused.
        &quot;ignoreDiacritics&quot;: True or False, # Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, &quot;cafe&quot; would match &quot;café&quot;.
        &quot;matchType&quot;: &quot;A String&quot;, # Optional. Match type for the banned phrase.
        &quot;phrase&quot;: &quot;A String&quot;, # Required. The raw string content to be banned.
      },
    ],
    &quot;modelArmorConfig&quot;: { # Configuration for customer defined Model Armor templates to be used for sanitizing user prompts and assistant responses. # Optional. Model Armor configuration to be used for sanitizing user prompts and assistant responses.
      &quot;failureMode&quot;: &quot;A String&quot;, # Optional. Defines the failure mode for Model Armor sanitization.
      &quot;responseTemplate&quot;: &quot;A String&quot;, # Optional. The resource name of the Model Armor template for sanitizing assistant responses. Format: `projects/{project}/locations/{location}/templates/{template_id}` If not specified, no sanitization will be applied to the assistant response.
      &quot;userPromptTemplate&quot;: &quot;A String&quot;, # Optional. The resource name of the Model Armor template for sanitizing user prompts. Format: `projects/{project}/locations/{location}/templates/{template_id}` If not specified, no sanitization will be applied to the user prompt.
    },
  },
  &quot;defaultWebGroundingToggleOff&quot;: True or False, # Optional. This field controls the default web grounding toggle for end users if `web_grounding_type` is set to `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is set to false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web grounding enabled by default on UI. If true, grounding toggle will be disabled by default on UI. End users can still enable web grounding in the UI if web grounding is enabled.
  &quot;description&quot;: &quot;A String&quot;, # Optional. Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
  &quot;enabledTools&quot;: { # Optional. Note: not implemented yet. Use enabled_actions instead. The enabled tools on this assistant. The keys are connector name, for example &quot;projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {&quot;jira1ConnectorName&quot;: [(toolId1, &quot;createTicket&quot;), (toolId2, &quot;transferTicket&quot;)], &quot;gmail1ConnectorName&quot;: [(toolId3, &quot;sendEmail&quot;),..] }
    &quot;a_key&quot;: { # The enabled tools on a connector
      &quot;toolInfo&quot;: [ # The list of tools with corresponding tool information.
        { # Information to identify a tool.
          &quot;toolDisplayName&quot;: &quot;A String&quot;, # The display name of the tool.
          &quot;toolName&quot;: &quot;A String&quot;, # The name of the tool as defined by DataConnectorService.QueryAvailableActions. Note: it&#x27;s using `action` in the DataConnectorService apis, but they are the same as the `tool` here.
        },
      ],
    },
  },
  &quot;generationConfig&quot;: { # Configuration for the generation of the assistant response. # Optional. Configuration for the generation of the assistant response.
    &quot;allowedModelIds&quot;: [ # Optional. The list of models that are allowed to be used for assistant.
      &quot;A String&quot;,
    ],
    &quot;defaultLanguage&quot;: &quot;A String&quot;, # The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as `en`. If not specified, the language will be automatically detected.
    &quot;defaultModelId&quot;: &quot;A String&quot;, # Optional. The default model to use for assistant.
    &quot;systemInstruction&quot;: { # System instruction, also known as the prompt preamble for LLM calls. # System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
      &quot;additionalSystemInstruction&quot;: &quot;A String&quot;, # Optional. Additional system instruction that will be added to the default system instruction.
    },
  },
  &quot;name&quot;: &quot;A String&quot;, # Immutable. Resource name of the assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` It must be a UTF-8 encoded string with a length limit of 1024 characters.
  &quot;webGroundingType&quot;: &quot;A String&quot;, # Optional. The type of web grounding to use.
}</pre>
</div>

<div class="method">
    <code class="details" id="streamAssist">streamAssist(name, body=None, x__xgafv=None)</code>
  <pre>Assists the user with a query in a streaming fashion.

Args:
  name: string, Required. The resource name of the Assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` (required)
  body: object, The request body.
    The object takes the form of:

{ # Request for the AssistantService.StreamAssist method.
  &quot;generationSpec&quot;: { # Assistant generation specification for the request. This allows to override the default generation configuration at the engine level. # Optional. Specification of the generation configuration for the request.
    &quot;modelId&quot;: &quot;A String&quot;, # Optional. The Vertex AI model_id used for the generative model. If not set, the default Assistant model will be used.
  },
  &quot;query&quot;: { # Defines a user inputed query. # Optional. Current user query. Empty query is only supported if `file_ids` are provided. In this case, the answer will be generated based on those context files.
    &quot;queryId&quot;: &quot;A String&quot;, # Output only. Unique Id for the query.
    &quot;text&quot;: &quot;A String&quot;, # Plain text.
  },
  &quot;session&quot;: &quot;A String&quot;, # Optional. The session to use for the request. If specified, the assistant has access to the session history, and the query and the answer are stored there. If `-` is specified as the session ID, or it is left empty, then a new session is created with an automatically generated ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
  &quot;toolsSpec&quot;: { # Specification of tools that are used to serve the request. # Optional. Specification of tools that are used to serve the request.
    &quot;imageGenerationSpec&quot;: { # Specification of the image generation tool. # Optional. Specification of the image generation tool.
    },
    &quot;vertexAiSearchSpec&quot;: { # Specification of the Vertex AI Search tool. # Optional. Specification of the Vertex AI Search tool.
      &quot;dataStoreSpecs&quot;: [ # Optional. Specs defining DataStores to filter on in a search call and configurations for those data stores. This is only considered for Engines with multiple data stores.
        { # A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.
          &quot;boostSpec&quot;: { # Boost specification to boost certain documents. # Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            &quot;conditionBoostSpecs&quot;: [ # Condition boost specifications. If a document matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
              { # Boost applies to documents which match a condition.
                &quot;boost&quot;: 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.
                &quot;boostControlSpec&quot;: { # Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. # Complex specification for custom ranking based on customer defined attribute value.
                  &quot;attributeType&quot;: &quot;A String&quot;, # The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
                  &quot;controlPoints&quot;: [ # The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
                    { # The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
                      &quot;attributeValue&quot;: &quot;A String&quot;, # Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.
                      &quot;boostAmount&quot;: 3.14, # The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
                    },
                  ],
                  &quot;fieldName&quot;: &quot;A String&quot;, # The name of the field whose value will be used to determine the boost amount.
                  &quot;interpolationType&quot;: &quot;A String&quot;, # The interpolation type to be applied to connect the control points listed below.
                },
                &quot;condition&quot;: &quot;A String&quot;, # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID &quot;doc_1&quot; or &quot;doc_2&quot;, and color &quot;Red&quot; or &quot;Blue&quot;: `(document_id: ANY(&quot;doc_1&quot;, &quot;doc_2&quot;)) AND (color: ANY(&quot;Red&quot;, &quot;Blue&quot;))`
              },
            ],
          },
          &quot;customSearchOperators&quot;: &quot;A String&quot;, # Optional. Custom search operators which if specified will be used to filter results from workspace data stores. For more information on custom search operators, see [SearchOperators](https://support.google.com/cloudsearch/answer/6172299).
          &quot;dataStore&quot;: &quot;A String&quot;, # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. The path must include the project number, project id is not supported for this field.
          &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)
        },
      ],
      &quot;filter&quot;: &quot;A String&quot;, # Optional. The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field &#x27;name&#x27; in their schema. In this case the filter would look like this: filter --&gt; name:&#x27;ANY(&quot;king kong&quot;)&#x27; For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
    },
    &quot;videoGenerationSpec&quot;: { # Specification of the video generation tool. # Optional. Specification of the video generation tool.
    },
    &quot;webGroundingSpec&quot;: { # Specification of the web grounding tool. # Optional. Specification of the web grounding tool. If field is present, enables grounding with web search. Works only if Assistant.web_grounding_type is WEB_GROUNDING_TYPE_GOOGLE_SEARCH or WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH.
    },
  },
  &quot;userMetadata&quot;: { # User metadata of the request. # Optional. Information about the user initiating the query.
    &quot;preferredLanguageCode&quot;: &quot;A String&quot;, # Optional. Preferred language to be used for answering if language detection fails. Also used as the language of error messages created by actions, regardless of language detection results.
    &quot;timeZone&quot;: &quot;A String&quot;, # Optional. IANA time zone, e.g. Europe/Budapest.
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response for the AssistantService.StreamAssist method.
  &quot;answer&quot;: { # AssistAnswer resource, main part of AssistResponse. # Assist answer resource object containing parts of the assistant&#x27;s final answer for the user&#x27;s query. Not present if the current response doesn&#x27;t add anything to previously sent AssistAnswer.replies. Observe AssistAnswer.state to see if more parts are to be expected. While the state is `IN_PROGRESS`, the AssistAnswer.replies field in each response will contain replies (reply fragments) to be appended to the ones received in previous responses. AssistAnswer.name won&#x27;t be filled. If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response is the last response and AssistAnswer.name will have a value.
    &quot;assistSkippedReasons&quot;: [ # Reasons for not answering the assist call.
      &quot;A String&quot;,
    ],
    &quot;customerPolicyEnforcementResult&quot;: { # Customer policy enforcement results. Contains the results of the various policy checks, like the banned phrases or the Model Armor checks. # Optional. The field contains information about the various policy checks&#x27; results like the banned phrases or the Model Armor checks. This field is populated only if the assist call was skipped due to a policy violation.
      &quot;policyResults&quot;: [ # Customer policy enforcement results. Populated only if the assist call was skipped due to a policy violation. It contains results from those filters that blocked the processing of the query.
        { # Customer policy enforcement result for a single policy type.
          &quot;bannedPhraseEnforcementResult&quot;: { # Customer policy enforcement result for the banned phrase policy. # The policy enforcement result for the banned phrase policy.
            &quot;bannedPhrases&quot;: [ # The banned phrases that were found in the query or the answer.
              &quot;A String&quot;,
            ],
          },
          &quot;modelArmorEnforcementResult&quot;: { # Customer policy enforcement result for the Model Armor policy. # The policy enforcement result for the Model Armor policy.
            &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 returned by Model Armor if the policy enforcement failed for some reason.
              &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
              &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
                {
                  &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
                },
              ],
              &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.
            },
            &quot;modelArmorViolation&quot;: &quot;A String&quot;, # The Model Armor violation that was found.
          },
        },
      ],
      &quot;verdict&quot;: &quot;A String&quot;, # Final verdict of the customer policy enforcement. If only one policy blocked the processing, the verdict is BLOCK.
    },
    &quot;name&quot;: &quot;A String&quot;, # Immutable. Identifier. Resource name of the `AssistAnswer`. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}` This field must be a UTF-8 encoded string with a length limit of 1024 characters.
    &quot;replies&quot;: [ # Replies of the assistant.
      { # One part of the multi-part response of the assist call.
        &quot;groundedContent&quot;: { # A piece of content and possibly its grounding information. Not all content needs grounding. Phrases like &quot;Of course, I will gladly search it for you.&quot; do not need grounding. # Possibly grounded response text or media from the assistant.
          &quot;citationMetadata&quot;: { # A collection of source attributions for a piece of content. # Source attribution of the generated content. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            &quot;citations&quot;: [ # Output only. List of citations.
              { # Source attributions for content.
                &quot;endIndex&quot;: 42, # Output only. End index into the content.
                &quot;license&quot;: &quot;A String&quot;, # Output only. License of the attribution.
                &quot;publicationDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Publication date of the attribution.
                  &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
                  &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
                  &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
                },
                &quot;startIndex&quot;: 42, # Output only. Start index into the content.
                &quot;title&quot;: &quot;A String&quot;, # Output only. Title of the attribution.
                &quot;uri&quot;: &quot;A String&quot;, # Output only. Url reference of the attribution.
              },
            ],
          },
          &quot;content&quot;: { # Multi-modal content. # The content.
            &quot;codeExecutionResult&quot;: { # Result of executing ExecutableCode. # Result of executing an ExecutableCode.
              &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
              &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
            },
            &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed by the model. # Code generated by the model that is meant to be executed.
              &quot;code&quot;: &quot;A String&quot;, # Required. The code content. Currently only supports Python.
            },
            &quot;file&quot;: { # A file, e.g., an audio summary. # A file, e.g., an audio summary.
              &quot;fileId&quot;: &quot;A String&quot;, # Required. The file ID.
              &quot;mimeType&quot;: &quot;A String&quot;, # Required. The media type (MIME type) of the file.
            },
            &quot;inlineData&quot;: { # Inline blob. # Inline binary data.
              &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
              &quot;mimeType&quot;: &quot;A String&quot;, # Required. The media type (MIME type) of the generated data.
            },
            &quot;role&quot;: &quot;A String&quot;, # The producer of the content. Can be &quot;model&quot; or &quot;user&quot;.
            &quot;text&quot;: &quot;A String&quot;, # Inline text.
            &quot;thought&quot;: True or False, # Optional. Indicates if the part is thought from the model.
          },
          &quot;textGroundingMetadata&quot;: { # Grounding details for text sources. # Metadata for grounding based on text sources.
            &quot;references&quot;: [ # References for the grounded text.
              { # Referenced content and related document metadata.
                &quot;content&quot;: &quot;A String&quot;, # Referenced text content.
                &quot;documentMetadata&quot;: { # Document metadata. # Document metadata.
                  &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                  &quot;domain&quot;: &quot;A String&quot;, # Domain name from the document URI. Note that the `uri` field may contain a URL that redirects to the actual website, in which case this will contain the domain name of the target site.
                  &quot;mimeType&quot;: &quot;A String&quot;, # The mime type of the document. https://www.iana.org/assignments/media-types/media-types.xhtml.
                  &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                  &quot;title&quot;: &quot;A String&quot;, # Title.
                  &quot;uri&quot;: &quot;A String&quot;, # URI for the document. It may contain a URL that redirects to the actual website.
                },
              },
            ],
            &quot;segments&quot;: [ # Grounding information for parts of the text.
              { # Grounding information for a segment of the text.
                &quot;endIndex&quot;: &quot;A String&quot;, # End of the segment, exclusive.
                &quot;groundingScore&quot;: 3.14, # Score for the segment.
                &quot;referenceIndices&quot;: [ # References for the segment.
                  42,
                ],
                &quot;startIndex&quot;: &quot;A String&quot;, # Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one).
                &quot;text&quot;: &quot;A String&quot;, # The text segment itself.
              },
            ],
          },
        },
      },
    ],
    &quot;state&quot;: &quot;A String&quot;, # State of the answer generation.
  },
  &quot;assistToken&quot;: &quot;A String&quot;, # A global unique ID that identifies the current pair of request and stream of responses. Used for feedback and support.
  &quot;invocationTools&quot;: [ # The tool names of the tools that were invoked.
    &quot;A String&quot;,
  ],
  &quot;sessionInfo&quot;: { # Information about the session. # Session information. Only included in the final StreamAssistResponse of the response stream.
    &quot;session&quot;: &quot;A String&quot;, # Name of the newly generated or continued session. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`.
  },
}</pre>
</div>

</body></html>