Debian Codegraph @

docs/dyn/aiplatform_v1beta1.projects.locations.exampleStores.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> . <a href="aiplatform_v1beta1.projects.locations.exampleStores.html">exampleStores</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="aiplatform_v1beta1.projects.locations.exampleStores.operations.html">operations()</a></code>
79 </p>
80 <p class="firstline">Returns the operations Resource.</p>
81
82 <p class="toc_element">
83 <code><a href="#close">close()</a></code></p>
84 <p class="firstline">Close httplib2 connections.</p>
85 <p class="toc_element">
86 <code><a href="#create">create(parent, exampleStore_createTime=None, exampleStore_description=None, exampleStore_displayName=None, exampleStore_exampleStoreConfig_vertexEmbeddingModel=None, exampleStore_name=None, exampleStore_updateTime=None, x__xgafv=None)</a></code></p>
87 <p class="firstline">Create an ExampleStore.</p>
88 <p class="toc_element">
89 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
90 <p class="firstline">Delete an ExampleStore.</p>
91 <p class="toc_element">
92 <code><a href="#fetchExamples">fetchExamples(exampleStore, body=None, x__xgafv=None)</a></code></p>
93 <p class="firstline">Get Examples from the Example Store.</p>
94 <p class="toc_element">
95 <code><a href="#fetchExamples_next">fetchExamples_next()</a></code></p>
96 <p class="firstline">Retrieves the next page of results.</p>
97 <p class="toc_element">
98 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
99 <p class="firstline">Get an ExampleStore.</p>
100 <p class="toc_element">
101 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
102 <p class="firstline">List ExampleStores in a Location.</p>
103 <p class="toc_element">
104 <code><a href="#list_next">list_next()</a></code></p>
105 <p class="firstline">Retrieves the next page of results.</p>
106 <p class="toc_element">
107 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
108 <p class="firstline">Update an ExampleStore.</p>
109 <p class="toc_element">
110 <code><a href="#removeExamples">removeExamples(exampleStore, body=None, x__xgafv=None)</a></code></p>
111 <p class="firstline">Remove Examples from the Example Store.</p>
112 <p class="toc_element">
113 <code><a href="#searchExamples">searchExamples(exampleStore, body=None, x__xgafv=None)</a></code></p>
114 <p class="firstline">Search for similar Examples for given selection criteria.</p>
115 <p class="toc_element">
116 <code><a href="#upsertExamples">upsertExamples(exampleStore, body=None, x__xgafv=None)</a></code></p>
117 <p class="firstline">Create or update Examples in the Example Store.</p>
118 <h3>Method Details</h3>
119 <div class="method">
120 <code class="details" id="close">close()</code>
121 <pre>Close httplib2 connections.</pre>
122 </div>
123
124 <div class="method">
125 <code class="details" id="create">create(parent, exampleStore_createTime=None, exampleStore_description=None, exampleStore_displayName=None, exampleStore_exampleStoreConfig_vertexEmbeddingModel=None, exampleStore_name=None, exampleStore_updateTime=None, x__xgafv=None)</code>
126 <pre>Create an ExampleStore.
127
128 Args:
129 parent: string, Required. The resource name of the Location to create the ExampleStore in. Format: `projects/{project}/locations/{location}` (required)
130 exampleStore_createTime: string, Output only. Timestamp when this ExampleStore was created.
131 exampleStore_description: string, Optional. Description of the ExampleStore.
132 exampleStore_displayName: string, Required. Display name of the ExampleStore.
133 exampleStore_exampleStoreConfig_vertexEmbeddingModel: string, Required. The embedding model to be used for vector embedding. Immutable. Supported models: * &quot;text-embedding-005&quot; * &quot;text-multilingual-embedding-002&quot;
134 exampleStore_name: string, Identifier. The resource name of the ExampleStore. This is a unique identifier. Format: projects/{project}/locations/{location}/exampleStores/{example_store}
135 exampleStore_updateTime: string, Output only. Timestamp when this ExampleStore was most recently updated.
136 x__xgafv: string, V1 error format.
137 Allowed values
138 1 - v1 error format
139 2 - v2 error format
140
141 Returns:
142 An object of the form:
143
144 { # This resource represents a long-running operation that is the result of a network API call.
145 &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.
146 &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.
147 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
148 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
149 {
150 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
151 },
152 ],
153 &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.
154 },
155 &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.
156 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
157 },
158 &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}`.
159 &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`.
160 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
161 },
162 }</pre>
163 </div>
164
165 <div class="method">
166 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
167 <pre>Delete an ExampleStore.
168
169 Args:
170 name: string, Required. The resource name of the ExampleStore to be deleted. Format: `projects/{project}/locations/{location}/exampleStores/{example_store}` (required)
171 x__xgafv: string, V1 error format.
172 Allowed values
173 1 - v1 error format
174 2 - v2 error format
175
176 Returns:
177 An object of the form:
178
179 { # This resource represents a long-running operation that is the result of a network API call.
180 &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.
181 &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.
182 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
183 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
184 {
185 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
186 },
187 ],
188 &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.
189 },
190 &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.
191 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
192 },
193 &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}`.
194 &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`.
195 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
196 },
197 }</pre>
198 </div>
199
200 <div class="method">
201 <code class="details" id="fetchExamples">fetchExamples(exampleStore, body=None, x__xgafv=None)</code>
202 <pre>Get Examples from the Example Store.
203
204 Args:
205 exampleStore: string, Required. The name of the ExampleStore resource that the examples should be fetched from. Format: `projects/{project}/locations/{location}/exampleStores/{example_store}` (required)
206 body: object, The request body.
207 The object takes the form of:
208
209 { # Request message for ExampleStoreService.FetchExamples.
210 &quot;exampleIds&quot;: [ # Optional. Example IDs to fetch. If both metadata filters and Example IDs are specified, then both ID and metadata filtering will be applied.
211 &quot;A String&quot;,
212 ],
213 &quot;pageSize&quot;: 42, # Optional. The maximum number of examples to return. The service may return fewer than this value. If unspecified, at most 100 examples will be returned.
214 &quot;pageToken&quot;: &quot;A String&quot;, # Optional. The next_page_token value returned from a previous list ExampleStoreService.FetchExamplesResponse call.
215 &quot;storedContentsExampleFilter&quot;: { # The metadata filters that will be used to remove or fetch StoredContentsExamples. If a field is unspecified, then no filtering for that field will be applied. # The metadata filters for StoredContentsExamples.
216 &quot;functionNames&quot;: { # Filters for examples&#x27; array metadata fields. An array field is example metadata where multiple values are attributed to a single example. # Optional. The function names for filtering.
217 &quot;arrayOperator&quot;: &quot;A String&quot;, # Required. The operator logic to use for filtering.
218 &quot;values&quot;: [ # Required. The values by which to filter examples.
219 &quot;A String&quot;,
220 ],
221 },
222 &quot;searchKeys&quot;: [ # Optional. The search keys for filtering. Only examples with one of the specified search keys (StoredContentsExample.search_key) are eligible to be returned.
223 &quot;A String&quot;,
224 ],
225 },
226 }
227
228 x__xgafv: string, V1 error format.
229 Allowed values
230 1 - v1 error format
231 2 - v2 error format
232
233 Returns:
234 An object of the form:
235
236 { # Response message for ExampleStoreService.FetchExamples.
237 &quot;examples&quot;: [ # The examples in the Example Store that satisfy the metadata filters.
238 {
239 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this Example was created.
240 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name for Example.
241 &quot;exampleId&quot;: &quot;A String&quot;, # Optional. Immutable. Unique identifier of an example. If not specified when upserting new examples, the example_id will be generated.
242 &quot;storedContentsExample&quot;: { # A ContentsExample to be used with GenerateContent alongside information required for storage and retrieval with Example Store. # An example of chat history and its expected outcome to be used with GenerateContent.
243 &quot;contentsExample&quot;: { # A single example of a conversation with the model. # Required. The example to be used with GenerateContent.
244 &quot;contents&quot;: [ # Required. The content of the conversation with the model that resulted in the expected output.
245 { # 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.
246 &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.
247 { # 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.
248 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
249 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
250 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
251 },
252 &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.
253 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
254 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
255 },
256 &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.
257 &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.
258 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
259 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
260 },
261 &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.
262 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
263 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
264 },
265 &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`.
266 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
267 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
268 { # Partial argument value of the function call.
269 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
270 &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;.
271 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
272 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
273 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
274 &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.
275 },
276 ],
277 &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.
278 },
279 &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.
280 &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`.
281 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
282 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
283 { # 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.
284 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
285 &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.
286 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
287 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
288 },
289 &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.
290 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
291 &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.
292 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
293 },
294 },
295 ],
296 &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.
297 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
298 },
299 &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.
300 },
301 &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.
302 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
303 &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.
304 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
305 },
306 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
307 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
308 },
309 &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.
310 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
311 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
312 &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.
313 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
314 &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].
315 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
316 },
317 },
318 ],
319 &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;.
320 },
321 ],
322 &quot;expectedContents&quot;: [ # Required. The expected output for the given `contents`. To represent multi-step reasoning, this is a repeated field that contains the iterative steps of the expected output.
323 { # A single step of the expected output.
324 &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. A single step&#x27;s content.
325 &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.
326 { # 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.
327 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
328 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
329 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
330 },
331 &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.
332 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
333 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
334 },
335 &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.
336 &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.
337 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
338 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
339 },
340 &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.
341 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
342 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
343 },
344 &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`.
345 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
346 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
347 { # Partial argument value of the function call.
348 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
349 &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;.
350 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
351 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
352 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
353 &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.
354 },
355 ],
356 &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.
357 },
358 &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.
359 &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`.
360 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
361 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
362 { # 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.
363 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
364 &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.
365 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
366 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
367 },
368 &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.
369 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
370 &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.
371 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
372 },
373 },
374 ],
375 &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.
376 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
377 },
378 &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.
379 },
380 &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.
381 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
382 &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.
383 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
384 },
385 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
386 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
387 },
388 &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.
389 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
390 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
391 &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.
392 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
393 &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].
394 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
395 },
396 },
397 ],
398 &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;.
399 },
400 },
401 ],
402 },
403 &quot;searchKey&quot;: &quot;A String&quot;, # Optional. (Optional) the search key used for retrieval. If not provided at upload-time, the search key will be generated from `contents_example.contents` using the method provided by `search_key_generation_method`. The generated search key will be included in retrieved examples.
404 &quot;searchKeyGenerationMethod&quot;: { # Options for generating the search key from the conversation history. # Optional. The method used to generate the search key from `contents_example.contents`. This is ignored when uploading an example if `search_key` is provided.
405 &quot;lastEntry&quot;: { # Configuration for using only the last entry of the conversation history as the search key. # Use only the last entry of the conversation history (`contents_example.contents`) as the search key.
406 },
407 },
408 },
409 },
410 ],
411 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token, which can be sent as FetchExamplesRequest.page_token to retrieve the next page. Absence of this field indicates there are no subsequent pages.
412 }</pre>
413 </div>
414
415 <div class="method">
416 <code class="details" id="fetchExamples_next">fetchExamples_next()</code>
417 <pre>Retrieves the next page of results.
418
419 Args:
420 previous_request: The request for the previous page. (required)
421 previous_response: The response from the request for the previous page. (required)
422
423 Returns:
424 A request object that you can call &#x27;execute()&#x27; on to request the next
425 page. Returns None if there are no more items in the collection.
426 </pre>
427 </div>
428
429 <div class="method">
430 <code class="details" id="get">get(name, x__xgafv=None)</code>
431 <pre>Get an ExampleStore.
432
433 Args:
434 name: string, Required. The resource name of the ExampleStore. Format: `projects/{project}/locations/{location}/exampleStores/{example_store}` (required)
435 x__xgafv: string, V1 error format.
436 Allowed values
437 1 - v1 error format
438 2 - v2 error format
439
440 Returns:
441 An object of the form:
442
443 { # Represents an executable service to manage and retrieve examples.
444 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ExampleStore was created.
445 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the ExampleStore.
446 &quot;displayName&quot;: &quot;A String&quot;, # Required. Display name of the ExampleStore.
447 &quot;exampleStoreConfig&quot;: { # Configuration for the Example Store. # Required. Example Store config.
448 &quot;vertexEmbeddingModel&quot;: &quot;A String&quot;, # Required. The embedding model to be used for vector embedding. Immutable. Supported models: * &quot;text-embedding-005&quot; * &quot;text-multilingual-embedding-002&quot;
449 },
450 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name of the ExampleStore. This is a unique identifier. Format: projects/{project}/locations/{location}/exampleStores/{example_store}
451 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ExampleStore was most recently updated.
452 }</pre>
453 </div>
454
455 <div class="method">
456 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
457 <pre>List ExampleStores in a Location.
458
459 Args:
460 parent: string, Required. The resource name of the Location to list the ExampleStores from. Format: `projects/{project}/locations/{location}` (required)
461 filter: string, Optional. The standard list filter. More detail in [AIP-160](https://google.aip.dev/160).
462 pageSize: integer, Optional. The standard list page size.
463 pageToken: string, Optional. The standard list page token.
464 x__xgafv: string, V1 error format.
465 Allowed values
466 1 - v1 error format
467 2 - v2 error format
468
469 Returns:
470 An object of the form:
471
472 { # Response message for ExampleStoreService.ListExampleStores.
473 &quot;exampleStores&quot;: [ # List of ExampleStore in the requested page.
474 { # Represents an executable service to manage and retrieve examples.
475 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ExampleStore was created.
476 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the ExampleStore.
477 &quot;displayName&quot;: &quot;A String&quot;, # Required. Display name of the ExampleStore.
478 &quot;exampleStoreConfig&quot;: { # Configuration for the Example Store. # Required. Example Store config.
479 &quot;vertexEmbeddingModel&quot;: &quot;A String&quot;, # Required. The embedding model to be used for vector embedding. Immutable. Supported models: * &quot;text-embedding-005&quot; * &quot;text-multilingual-embedding-002&quot;
480 },
481 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name of the ExampleStore. This is a unique identifier. Format: projects/{project}/locations/{location}/exampleStores/{example_store}
482 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ExampleStore was most recently updated.
483 },
484 ],
485 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve the next page of results. Pass to ListExampleStoresRequest.page_token to obtain that page.
486 }</pre>
487 </div>
488
489 <div class="method">
490 <code class="details" id="list_next">list_next()</code>
491 <pre>Retrieves the next page of results.
492
493 Args:
494 previous_request: The request for the previous page. (required)
495 previous_response: The response from the request for the previous page. (required)
496
497 Returns:
498 A request object that you can call &#x27;execute()&#x27; on to request the next
499 page. Returns None if there are no more items in the collection.
500 </pre>
501 </div>
502
503 <div class="method">
504 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
505 <pre>Update an ExampleStore.
506
507 Args:
508 name: string, Identifier. The resource name of the ExampleStore. This is a unique identifier. Format: projects/{project}/locations/{location}/exampleStores/{example_store} (required)
509 body: object, The request body.
510 The object takes the form of:
511
512 { # Represents an executable service to manage and retrieve examples.
513 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ExampleStore was created.
514 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the ExampleStore.
515 &quot;displayName&quot;: &quot;A String&quot;, # Required. Display name of the ExampleStore.
516 &quot;exampleStoreConfig&quot;: { # Configuration for the Example Store. # Required. Example Store config.
517 &quot;vertexEmbeddingModel&quot;: &quot;A String&quot;, # Required. The embedding model to be used for vector embedding. Immutable. Supported models: * &quot;text-embedding-005&quot; * &quot;text-multilingual-embedding-002&quot;
518 },
519 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name of the ExampleStore. This is a unique identifier. Format: projects/{project}/locations/{location}/exampleStores/{example_store}
520 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this ExampleStore was most recently updated.
521 }
522
523 updateMask: string, Optional. Mask specifying which fields to update. Supported fields: * `display_name` * `description`
524 x__xgafv: string, V1 error format.
525 Allowed values
526 1 - v1 error format
527 2 - v2 error format
528
529 Returns:
530 An object of the form:
531
532 { # This resource represents a long-running operation that is the result of a network API call.
533 &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.
534 &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.
535 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
536 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
537 {
538 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
539 },
540 ],
541 &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.
542 },
543 &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.
544 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
545 },
546 &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}`.
547 &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`.
548 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
549 },
550 }</pre>
551 </div>
552
553 <div class="method">
554 <code class="details" id="removeExamples">removeExamples(exampleStore, body=None, x__xgafv=None)</code>
555 <pre>Remove Examples from the Example Store.
556
557 Args:
558 exampleStore: string, Required. The name of the ExampleStore resource that the examples should be removed from. Format: `projects/{project}/locations/{location}/exampleStores/{example_store}` (required)
559 body: object, The request body.
560 The object takes the form of:
561
562 { # Request message for ExampleStoreService.RemoveExamples.
563 &quot;exampleIds&quot;: [ # Optional. Example IDs to remove. If both metadata filters and Example IDs are specified, the metadata filters will be applied to the specified examples in order to identify which should be removed.
564 &quot;A String&quot;,
565 ],
566 &quot;storedContentsExampleFilter&quot;: { # The metadata filters that will be used to remove or fetch StoredContentsExamples. If a field is unspecified, then no filtering for that field will be applied. # The metadata filters for StoredContentsExamples.
567 &quot;functionNames&quot;: { # Filters for examples&#x27; array metadata fields. An array field is example metadata where multiple values are attributed to a single example. # Optional. The function names for filtering.
568 &quot;arrayOperator&quot;: &quot;A String&quot;, # Required. The operator logic to use for filtering.
569 &quot;values&quot;: [ # Required. The values by which to filter examples.
570 &quot;A String&quot;,
571 ],
572 },
573 &quot;searchKeys&quot;: [ # Optional. The search keys for filtering. Only examples with one of the specified search keys (StoredContentsExample.search_key) are eligible to be returned.
574 &quot;A String&quot;,
575 ],
576 },
577 }
578
579 x__xgafv: string, V1 error format.
580 Allowed values
581 1 - v1 error format
582 2 - v2 error format
583
584 Returns:
585 An object of the form:
586
587 { # Response message for ExampleStoreService.RemoveExamples.
588 &quot;exampleIds&quot;: [ # The IDs for the removed examples.
589 &quot;A String&quot;,
590 ],
591 }</pre>
592 </div>
593
594 <div class="method">
595 <code class="details" id="searchExamples">searchExamples(exampleStore, body=None, x__xgafv=None)</code>
596 <pre>Search for similar Examples for given selection criteria.
597
598 Args:
599 exampleStore: string, Required. The name of the ExampleStore resource that examples are retrieved from. Format: `projects/{project}/locations/{location}/exampleStores/{example_store}` (required)
600 body: object, The request body.
601 The object takes the form of:
602
603 { # Request message for ExampleStoreService.SearchExamples.
604 &quot;storedContentsExampleParameters&quot;: { # The metadata filters that will be used to search StoredContentsExamples. If a field is unspecified, then no filtering for that field will be applied # The parameters of StoredContentsExamples to be searched.
605 &quot;contentSearchKey&quot;: { # The chat history to use to generate the search key for retrieval. # The chat history to use to generate the search key for retrieval.
606 &quot;contents&quot;: [ # Required. The conversation for generating a search key.
607 { # 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.
608 &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.
609 { # 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.
610 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
611 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
612 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
613 },
614 &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.
615 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
616 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
617 },
618 &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.
619 &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.
620 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
621 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
622 },
623 &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.
624 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
625 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
626 },
627 &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`.
628 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
629 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
630 { # Partial argument value of the function call.
631 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
632 &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;.
633 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
634 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
635 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
636 &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.
637 },
638 ],
639 &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.
640 },
641 &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.
642 &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`.
643 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
644 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
645 { # 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.
646 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
647 &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.
648 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
649 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
650 },
651 &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.
652 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
653 &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.
654 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
655 },
656 },
657 ],
658 &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.
659 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
660 },
661 &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.
662 },
663 &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.
664 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
665 &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.
666 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
667 },
668 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
669 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
670 },
671 &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.
672 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
673 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
674 &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.
675 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
676 &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].
677 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
678 },
679 },
680 ],
681 &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;.
682 },
683 ],
684 &quot;searchKeyGenerationMethod&quot;: { # Options for generating the search key from the conversation history. # Required. The method of generating a search key.
685 &quot;lastEntry&quot;: { # Configuration for using only the last entry of the conversation history as the search key. # Use only the last entry of the conversation history (`contents_example.contents`) as the search key.
686 },
687 },
688 },
689 &quot;functionNames&quot;: { # Filters for examples&#x27; array metadata fields. An array field is example metadata where multiple values are attributed to a single example. # Optional. The function names for filtering.
690 &quot;arrayOperator&quot;: &quot;A String&quot;, # Required. The operator logic to use for filtering.
691 &quot;values&quot;: [ # Required. The values by which to filter examples.
692 &quot;A String&quot;,
693 ],
694 },
695 &quot;searchKey&quot;: &quot;A String&quot;, # The exact search key to use for retrieval.
696 },
697 &quot;topK&quot;: &quot;A String&quot;, # Optional. The number of similar examples to return.
698 }
699
700 x__xgafv: string, V1 error format.
701 Allowed values
702 1 - v1 error format
703 2 - v2 error format
704
705 Returns:
706 An object of the form:
707
708 { # Response message for ExampleStoreService.SearchExamples.
709 &quot;results&quot;: [ # The results of searching for similar examples.
710 { # The result of the similar example.
711 &quot;example&quot;: { # The example that is similar to the searched query.
712 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this Example was created.
713 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name for Example.
714 &quot;exampleId&quot;: &quot;A String&quot;, # Optional. Immutable. Unique identifier of an example. If not specified when upserting new examples, the example_id will be generated.
715 &quot;storedContentsExample&quot;: { # A ContentsExample to be used with GenerateContent alongside information required for storage and retrieval with Example Store. # An example of chat history and its expected outcome to be used with GenerateContent.
716 &quot;contentsExample&quot;: { # A single example of a conversation with the model. # Required. The example to be used with GenerateContent.
717 &quot;contents&quot;: [ # Required. The content of the conversation with the model that resulted in the expected output.
718 { # 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.
719 &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.
720 { # 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.
721 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
722 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
723 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
724 },
725 &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.
726 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
727 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
728 },
729 &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.
730 &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.
731 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
732 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
733 },
734 &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.
735 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
736 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
737 },
738 &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`.
739 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
740 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
741 { # Partial argument value of the function call.
742 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
743 &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;.
744 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
745 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
746 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
747 &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.
748 },
749 ],
750 &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.
751 },
752 &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.
753 &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`.
754 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
755 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
756 { # 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.
757 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
758 &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.
759 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
760 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
761 },
762 &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.
763 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
764 &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.
765 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
766 },
767 },
768 ],
769 &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.
770 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
771 },
772 &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.
773 },
774 &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.
775 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
776 &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.
777 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
778 },
779 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
780 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
781 },
782 &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.
783 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
784 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
785 &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.
786 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
787 &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].
788 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
789 },
790 },
791 ],
792 &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;.
793 },
794 ],
795 &quot;expectedContents&quot;: [ # Required. The expected output for the given `contents`. To represent multi-step reasoning, this is a repeated field that contains the iterative steps of the expected output.
796 { # A single step of the expected output.
797 &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. A single step&#x27;s content.
798 &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.
799 { # 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.
800 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
801 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
802 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
803 },
804 &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.
805 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
806 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
807 },
808 &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.
809 &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.
810 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
811 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
812 },
813 &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.
814 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
815 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
816 },
817 &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`.
818 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
819 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
820 { # Partial argument value of the function call.
821 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
822 &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;.
823 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
824 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
825 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
826 &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.
827 },
828 ],
829 &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.
830 },
831 &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.
832 &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`.
833 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
834 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
835 { # 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.
836 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
837 &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.
838 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
839 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
840 },
841 &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.
842 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
843 &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.
844 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
845 },
846 },
847 ],
848 &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.
849 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
850 },
851 &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.
852 },
853 &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.
854 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
855 &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.
856 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
857 },
858 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
859 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
860 },
861 &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.
862 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
863 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
864 &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.
865 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
866 &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].
867 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
868 },
869 },
870 ],
871 &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;.
872 },
873 },
874 ],
875 },
876 &quot;searchKey&quot;: &quot;A String&quot;, # Optional. (Optional) the search key used for retrieval. If not provided at upload-time, the search key will be generated from `contents_example.contents` using the method provided by `search_key_generation_method`. The generated search key will be included in retrieved examples.
877 &quot;searchKeyGenerationMethod&quot;: { # Options for generating the search key from the conversation history. # Optional. The method used to generate the search key from `contents_example.contents`. This is ignored when uploading an example if `search_key` is provided.
878 &quot;lastEntry&quot;: { # Configuration for using only the last entry of the conversation history as the search key. # Use only the last entry of the conversation history (`contents_example.contents`) as the search key.
879 },
880 },
881 },
882 },
883 &quot;similarityScore&quot;: 3.14, # The similarity score of this example.
884 },
885 ],
886 }</pre>
887 </div>
888
889 <div class="method">
890 <code class="details" id="upsertExamples">upsertExamples(exampleStore, body=None, x__xgafv=None)</code>
891 <pre>Create or update Examples in the Example Store.
892
893 Args:
894 exampleStore: string, Required. The name of the ExampleStore resource that examples are added to or updated in. Format: `projects/{project}/locations/{location}/exampleStores/{example_store}` (required)
895 body: object, The request body.
896 The object takes the form of:
897
898 { # Request message for ExampleStoreService.UpsertExamples.
899 &quot;examples&quot;: [ # Required. A list of examples to be created/updated.
900 {
901 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this Example was created.
902 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name for Example.
903 &quot;exampleId&quot;: &quot;A String&quot;, # Optional. Immutable. Unique identifier of an example. If not specified when upserting new examples, the example_id will be generated.
904 &quot;storedContentsExample&quot;: { # A ContentsExample to be used with GenerateContent alongside information required for storage and retrieval with Example Store. # An example of chat history and its expected outcome to be used with GenerateContent.
905 &quot;contentsExample&quot;: { # A single example of a conversation with the model. # Required. The example to be used with GenerateContent.
906 &quot;contents&quot;: [ # Required. The content of the conversation with the model that resulted in the expected output.
907 { # 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.
908 &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.
909 { # 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.
910 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
911 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
912 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
913 },
914 &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.
915 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
916 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
917 },
918 &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.
919 &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.
920 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
921 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
922 },
923 &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.
924 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
925 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
926 },
927 &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`.
928 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
929 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
930 { # Partial argument value of the function call.
931 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
932 &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;.
933 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
934 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
935 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
936 &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.
937 },
938 ],
939 &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.
940 },
941 &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.
942 &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`.
943 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
944 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
945 { # 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.
946 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
947 &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.
948 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
949 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
950 },
951 &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.
952 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
953 &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.
954 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
955 },
956 },
957 ],
958 &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.
959 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
960 },
961 &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.
962 },
963 &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.
964 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
965 &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.
966 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
967 },
968 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
969 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
970 },
971 &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.
972 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
973 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
974 &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.
975 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
976 &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].
977 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
978 },
979 },
980 ],
981 &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;.
982 },
983 ],
984 &quot;expectedContents&quot;: [ # Required. The expected output for the given `contents`. To represent multi-step reasoning, this is a repeated field that contains the iterative steps of the expected output.
985 { # A single step of the expected output.
986 &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. A single step&#x27;s content.
987 &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.
988 { # 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.
989 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
990 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
991 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
992 },
993 &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.
994 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
995 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
996 },
997 &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.
998 &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.
999 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
1000 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1001 },
1002 &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.
1003 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
1004 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1005 },
1006 &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`.
1007 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
1008 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
1009 { # Partial argument value of the function call.
1010 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
1011 &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;.
1012 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
1013 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
1014 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
1015 &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.
1016 },
1017 ],
1018 &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.
1019 },
1020 &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.
1021 &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`.
1022 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
1023 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
1024 { # 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.
1025 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
1026 &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.
1027 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
1028 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1029 },
1030 &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.
1031 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
1032 &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.
1033 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1034 },
1035 },
1036 ],
1037 &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.
1038 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1039 },
1040 &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.
1041 },
1042 &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.
1043 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
1044 &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.
1045 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1046 },
1047 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
1048 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
1049 },
1050 &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.
1051 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
1052 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
1053 &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.
1054 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
1055 &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].
1056 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
1057 },
1058 },
1059 ],
1060 &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;.
1061 },
1062 },
1063 ],
1064 },
1065 &quot;searchKey&quot;: &quot;A String&quot;, # Optional. (Optional) the search key used for retrieval. If not provided at upload-time, the search key will be generated from `contents_example.contents` using the method provided by `search_key_generation_method`. The generated search key will be included in retrieved examples.
1066 &quot;searchKeyGenerationMethod&quot;: { # Options for generating the search key from the conversation history. # Optional. The method used to generate the search key from `contents_example.contents`. This is ignored when uploading an example if `search_key` is provided.
1067 &quot;lastEntry&quot;: { # Configuration for using only the last entry of the conversation history as the search key. # Use only the last entry of the conversation history (`contents_example.contents`) as the search key.
1068 },
1069 },
1070 },
1071 },
1072 ],
1073 &quot;overwrite&quot;: True or False, # Optional. A flag indicating whether an example can be overwritten if it already exists. If False (default) and the example already exists, the example will not be updated. This does not affect behavior if the example does not exist already.
1074 }
1075
1076 x__xgafv: string, V1 error format.
1077 Allowed values
1078 1 - v1 error format
1079 2 - v2 error format
1080
1081 Returns:
1082 An object of the form:
1083
1084 { # Response message for ExampleStoreService.UpsertExamples.
1085 &quot;results&quot;: [ # A list of results for creating/updating. It&#x27;s either a successfully created/updated example or a status with an error message.
1086 { # The result for creating/updating a single example.
1087 &quot;example&quot;: { # The example created/updated successfully.
1088 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this Example was created.
1089 &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name for Example.
1090 &quot;exampleId&quot;: &quot;A String&quot;, # Optional. Immutable. Unique identifier of an example. If not specified when upserting new examples, the example_id will be generated.
1091 &quot;storedContentsExample&quot;: { # A ContentsExample to be used with GenerateContent alongside information required for storage and retrieval with Example Store. # An example of chat history and its expected outcome to be used with GenerateContent.
1092 &quot;contentsExample&quot;: { # A single example of a conversation with the model. # Required. The example to be used with GenerateContent.
1093 &quot;contents&quot;: [ # Required. The content of the conversation with the model that resulted in the expected output.
1094 { # 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.
1095 &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.
1096 { # 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.
1097 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
1098 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
1099 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
1100 },
1101 &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.
1102 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
1103 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
1104 },
1105 &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.
1106 &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.
1107 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
1108 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1109 },
1110 &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.
1111 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
1112 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1113 },
1114 &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`.
1115 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
1116 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
1117 { # Partial argument value of the function call.
1118 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
1119 &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;.
1120 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
1121 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
1122 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
1123 &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.
1124 },
1125 ],
1126 &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.
1127 },
1128 &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.
1129 &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`.
1130 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
1131 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
1132 { # 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.
1133 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
1134 &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.
1135 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
1136 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1137 },
1138 &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.
1139 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
1140 &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.
1141 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1142 },
1143 },
1144 ],
1145 &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.
1146 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1147 },
1148 &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.
1149 },
1150 &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.
1151 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
1152 &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.
1153 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1154 },
1155 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
1156 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
1157 },
1158 &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.
1159 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
1160 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
1161 &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.
1162 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
1163 &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].
1164 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
1165 },
1166 },
1167 ],
1168 &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;.
1169 },
1170 ],
1171 &quot;expectedContents&quot;: [ # Required. The expected output for the given `contents`. To represent multi-step reasoning, this is a repeated field that contains the iterative steps of the expected output.
1172 { # A single step of the expected output.
1173 &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. A single step&#x27;s content.
1174 &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.
1175 { # 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.
1176 &quot;codeExecutionResult&quot;: { # Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. # Optional. The result of executing the ExecutableCode.
1177 &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
1178 &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
1179 },
1180 &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.
1181 &quot;code&quot;: &quot;A String&quot;, # Required. The code to be executed.
1182 &quot;language&quot;: &quot;A String&quot;, # Required. Programming language of the `code`.
1183 },
1184 &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.
1185 &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.
1186 &quot;fileUri&quot;: &quot;A String&quot;, # Required. The URI of the file in Google Cloud Storage.
1187 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1188 },
1189 &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.
1190 &quot;args&quot;: { # Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.
1191 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1192 },
1193 &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`.
1194 &quot;name&quot;: &quot;A String&quot;, # Optional. The name of the function to call. Matches FunctionDeclaration.name.
1195 &quot;partialArgs&quot;: [ # Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally.
1196 { # Partial argument value of the function call.
1197 &quot;boolValue&quot;: True or False, # Optional. Represents a boolean value.
1198 &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;.
1199 &quot;nullValue&quot;: &quot;A String&quot;, # Optional. Represents a null value.
1200 &quot;numberValue&quot;: 3.14, # Optional. Represents a double value.
1201 &quot;stringValue&quot;: &quot;A String&quot;, # Optional. Represents a string value.
1202 &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.
1203 },
1204 ],
1205 &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.
1206 },
1207 &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.
1208 &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`.
1209 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
1210 &quot;parts&quot;: [ # Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
1211 { # 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.
1212 &quot;fileData&quot;: { # URI based data for function response. # URI based data.
1213 &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.
1214 &quot;fileUri&quot;: &quot;A String&quot;, # Required. URI.
1215 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1216 },
1217 &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.
1218 &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
1219 &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.
1220 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1221 },
1222 },
1223 ],
1224 &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.
1225 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
1226 },
1227 &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.
1228 },
1229 &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.
1230 &quot;data&quot;: &quot;A String&quot;, # Required. The raw bytes of the data.
1231 &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.
1232 &quot;mimeType&quot;: &quot;A String&quot;, # Required. The IANA standard MIME type of the source data.
1233 },
1234 &quot;mediaResolution&quot;: { # per part media resolution. Media resolution for the input media. # per part media resolution. Media resolution for the input media.
1235 &quot;level&quot;: &quot;A String&quot;, # The tokenization quality used for given media.
1236 },
1237 &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.
1238 &quot;thought&quot;: True or False, # Optional. Indicates whether the `part` represents the model&#x27;s thought process or reasoning.
1239 &quot;thoughtSignature&quot;: &quot;A String&quot;, # Optional. An opaque signature for the thought so it can be reused in subsequent requests.
1240 &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.
1241 &quot;endOffset&quot;: &quot;A String&quot;, # Optional. The end offset of the video.
1242 &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].
1243 &quot;startOffset&quot;: &quot;A String&quot;, # Optional. The start offset of the video.
1244 },
1245 },
1246 ],
1247 &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;.
1248 },
1249 },
1250 ],
1251 },
1252 &quot;searchKey&quot;: &quot;A String&quot;, # Optional. (Optional) the search key used for retrieval. If not provided at upload-time, the search key will be generated from `contents_example.contents` using the method provided by `search_key_generation_method`. The generated search key will be included in retrieved examples.
1253 &quot;searchKeyGenerationMethod&quot;: { # Options for generating the search key from the conversation history. # Optional. The method used to generate the search key from `contents_example.contents`. This is ignored when uploading an example if `search_key` is provided.
1254 &quot;lastEntry&quot;: { # Configuration for using only the last entry of the conversation history as the search key. # Use only the last entry of the conversation history (`contents_example.contents`) as the search key.
1255 },
1256 },
1257 },
1258 },
1259 &quot;status&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 message of the example that was not created/updated successfully.
1260 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1261 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
1262 {
1263 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1264 },
1265 ],
1266 &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.
1267 },
1268 },
1269 ],
1270 }</pre>
1271 </div>
1272
1273 </body></html>