| 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="ces_v1beta.html">Gemini Enterprise for Customer Experience API</a> . <a href="ces_v1beta.projects.html">projects</a> . <a href="ces_v1beta.projects.locations.html">locations</a> . <a href="ces_v1beta.projects.locations.apps.html">apps</a> . <a href="ces_v1beta.projects.locations.apps.message.html">message</a></h1> |
| 76 |
<h2>Instance Methods</h2> |
| 77 |
<p class="toc_element"> |
| 78 |
<code><a href="#close">close()</a></code></p> |
| 79 |
<p class="firstline">Close httplib2 connections.</p> |
| 80 |
<p class="toc_element"> |
| 81 |
<code><a href="#send">send(tenant, body=None, x__xgafv=None)</a></code></p> |
| 82 |
<p class="firstline">Sends a message to an agent.</p> |
| 83 |
<h3>Method Details</h3> |
| 84 |
<div class="method"> |
| 85 |
<code class="details" id="close">close()</code> |
| 86 |
<pre>Close httplib2 connections.</pre> |
| 87 |
</div> |
| 88 |
|
| 89 |
<div class="method"> |
| 90 |
<code class="details" id="send">send(tenant, body=None, x__xgafv=None)</code> |
| 91 |
<pre>Sends a message to an agent. |
| 92 |
|
| 93 |
Args: |
| 94 |
tenant: string, Optional. Tenant ID, provided as a path parameter. (required) |
| 95 |
body: object, The request body. |
| 96 |
The object takes the form of: |
| 97 |
|
| 98 |
{ # Represents a request for the `SendMessage` method. |
| 99 |
"configuration": { # Configuration of a send message request. # Configuration for the send request. |
| 100 |
"acceptedOutputModes": [ # A list of media types the client is prepared to accept for response parts. Agents SHOULD use this to tailor their output. |
| 101 |
"A String", |
| 102 |
], |
| 103 |
"historyLength": 42, # The maximum number of most recent messages from the task's history to retrieve in the response. An unset value means the client does not impose any limit. A value of zero is a request to not include any messages. The server MUST NOT return more messages than the provided value, but MAY apply a lower limit. |
| 104 |
"returnImmediately": True or False, # If `true`, the operation returns immediately after creating the task, even if processing is still in progress. If `false` (default), the operation MUST wait until the task reaches a terminal (`COMPLETED`, `FAILED`, `CANCELED`, `REJECTED`) or interrupted (`INPUT_REQUIRED`, `AUTH_REQUIRED`) state before returning. |
| 105 |
"taskPushNotificationConfig": { # A container associating a push notification configuration with a specific task. # Configuration for the agent to send push notifications for task updates. Task id should be empty when sending this configuration in a `SendMessage` request. |
| 106 |
"authentication": { # Defines authentication details, used for push notifications. # Authentication information required to send the notification. |
| 107 |
"credentials": "A String", # Push Notification credentials. Format depends on the scheme (e.g., token for Bearer). |
| 108 |
"scheme": "A String", # Required. HTTP Authentication Scheme from the [IANA registry](https://www.iana.org/assignments/http-authschemes/). Examples: `Bearer`, `Basic`, `Digest`. Scheme names are case-insensitive per [RFC 9110 Section 11.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.1). |
| 109 |
}, |
| 110 |
"id": "A String", # The push notification configuration details. A unique identifier (e.g. UUID) for this push notification configuration. |
| 111 |
"taskId": "A String", # The ID of the task this configuration is associated with. |
| 112 |
"tenant": "A String", # Optional. Tenant ID. |
| 113 |
"token": "A String", # A token unique for this task or session. |
| 114 |
"url": "A String", # Required. The URL where the notification should be sent. |
| 115 |
}, |
| 116 |
}, |
| 117 |
"message": { # `Message` is one unit of communication between client and server. It can be associated with a context and/or a task. For server messages, `context_id` must be provided, and `task_id` only if a task was created. For client messages, both fields are optional, with the caveat that if both are provided, they have to match (the `context_id` has to be the one that is set on the task). If only `task_id` is provided, the server will infer `context_id` from it. # Required. The message to send to the agent. |
| 118 |
"contextId": "A String", # Optional. The context id of the message. If set, the message will be associated with the given context. |
| 119 |
"extensions": [ # The URIs of extensions that are present or contributed to this Message. |
| 120 |
"A String", |
| 121 |
], |
| 122 |
"messageId": "A String", # Required. The unique identifier (e.g. UUID) of the message. This is created by the message creator. |
| 123 |
"metadata": { # Optional. Any metadata to provide along with the message. |
| 124 |
"a_key": "", # Properties of the object. |
| 125 |
}, |
| 126 |
"parts": [ # Required. Parts is the container of the message content. |
| 127 |
{ # `Part` represents a container for a section of communication content. Parts can be purely textual, some sort of file (image, video, etc) or a structured data blob (i.e. JSON). |
| 128 |
"data": "", # Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null). |
| 129 |
"filename": "A String", # An optional `filename` for the file (e.g., "document.pdf"). |
| 130 |
"mediaType": "A String", # The `media_type` (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png"). This field is available for all part types. |
| 131 |
"metadata": { # Optional. metadata associated with this part. |
| 132 |
"a_key": "", # Properties of the object. |
| 133 |
}, |
| 134 |
"raw": "A String", # The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string. |
| 135 |
"text": "A String", # The string content of the `text` part. |
| 136 |
"url": "A String", # A `url` pointing to the file's content. |
| 137 |
}, |
| 138 |
], |
| 139 |
"referenceTaskIds": [ # A list of task IDs that this message references for additional context. |
| 140 |
"A String", |
| 141 |
], |
| 142 |
"role": "A String", # Required. Identifies the sender of the message. |
| 143 |
"taskId": "A String", # Optional. The task id of the message. If set, the message will be associated with the given task. |
| 144 |
}, |
| 145 |
"metadata": { # A flexible key-value map for passing additional context or parameters. |
| 146 |
"a_key": "", # Properties of the object. |
| 147 |
}, |
| 148 |
} |
| 149 |
|
| 150 |
x__xgafv: string, V1 error format. |
| 151 |
Allowed values |
| 152 |
1 - v1 error format |
| 153 |
2 - v2 error format |
| 154 |
|
| 155 |
Returns: |
| 156 |
An object of the form: |
| 157 |
|
| 158 |
{ # Represents the response for the `SendMessage` method. |
| 159 |
"message": { # `Message` is one unit of communication between client and server. It can be associated with a context and/or a task. For server messages, `context_id` must be provided, and `task_id` only if a task was created. For client messages, both fields are optional, with the caveat that if both are provided, they have to match (the `context_id` has to be the one that is set on the task). If only `task_id` is provided, the server will infer `context_id` from it. # A message from the agent. |
| 160 |
"contextId": "A String", # Optional. The context id of the message. If set, the message will be associated with the given context. |
| 161 |
"extensions": [ # The URIs of extensions that are present or contributed to this Message. |
| 162 |
"A String", |
| 163 |
], |
| 164 |
"messageId": "A String", # Required. The unique identifier (e.g. UUID) of the message. This is created by the message creator. |
| 165 |
"metadata": { # Optional. Any metadata to provide along with the message. |
| 166 |
"a_key": "", # Properties of the object. |
| 167 |
}, |
| 168 |
"parts": [ # Required. Parts is the container of the message content. |
| 169 |
{ # `Part` represents a container for a section of communication content. Parts can be purely textual, some sort of file (image, video, etc) or a structured data blob (i.e. JSON). |
| 170 |
"data": "", # Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null). |
| 171 |
"filename": "A String", # An optional `filename` for the file (e.g., "document.pdf"). |
| 172 |
"mediaType": "A String", # The `media_type` (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png"). This field is available for all part types. |
| 173 |
"metadata": { # Optional. metadata associated with this part. |
| 174 |
"a_key": "", # Properties of the object. |
| 175 |
}, |
| 176 |
"raw": "A String", # The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string. |
| 177 |
"text": "A String", # The string content of the `text` part. |
| 178 |
"url": "A String", # A `url` pointing to the file's content. |
| 179 |
}, |
| 180 |
], |
| 181 |
"referenceTaskIds": [ # A list of task IDs that this message references for additional context. |
| 182 |
"A String", |
| 183 |
], |
| 184 |
"role": "A String", # Required. Identifies the sender of the message. |
| 185 |
"taskId": "A String", # Optional. The task id of the message. If set, the message will be associated with the given task. |
| 186 |
}, |
| 187 |
"task": { # `Task` is the core unit of action for A2A. It has a current status and when results are created for the task they are stored in the artifact. If there are multiple turns for a task, these are stored in history. # The task created or updated by the message. |
| 188 |
"artifacts": [ # A set of output artifacts for a `Task`. |
| 189 |
{ # Artifacts represent task outputs. |
| 190 |
"artifactId": "A String", # Required. Unique identifier (e.g. UUID) for the artifact. It must be unique within a task. |
| 191 |
"description": "A String", # Optional. A human readable description of the artifact. |
| 192 |
"extensions": [ # The URIs of extensions that are present or contributed to this Artifact. |
| 193 |
"A String", |
| 194 |
], |
| 195 |
"metadata": { # Optional. Metadata included with the artifact. |
| 196 |
"a_key": "", # Properties of the object. |
| 197 |
}, |
| 198 |
"name": "A String", # A human readable name for the artifact. |
| 199 |
"parts": [ # Required. The content of the artifact. Must contain at least one part. |
| 200 |
{ # `Part` represents a container for a section of communication content. Parts can be purely textual, some sort of file (image, video, etc) or a structured data blob (i.e. JSON). |
| 201 |
"data": "", # Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null). |
| 202 |
"filename": "A String", # An optional `filename` for the file (e.g., "document.pdf"). |
| 203 |
"mediaType": "A String", # The `media_type` (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png"). This field is available for all part types. |
| 204 |
"metadata": { # Optional. metadata associated with this part. |
| 205 |
"a_key": "", # Properties of the object. |
| 206 |
}, |
| 207 |
"raw": "A String", # The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string. |
| 208 |
"text": "A String", # The string content of the `text` part. |
| 209 |
"url": "A String", # A `url` pointing to the file's content. |
| 210 |
}, |
| 211 |
], |
| 212 |
}, |
| 213 |
], |
| 214 |
"contextId": "A String", # Unique identifier (e.g. UUID) for the contextual collection of interactions (tasks and messages). |
| 215 |
"history": [ # protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`. |
| 216 |
{ # `Message` is one unit of communication between client and server. It can be associated with a context and/or a task. For server messages, `context_id` must be provided, and `task_id` only if a task was created. For client messages, both fields are optional, with the caveat that if both are provided, they have to match (the `context_id` has to be the one that is set on the task). If only `task_id` is provided, the server will infer `context_id` from it. |
| 217 |
"contextId": "A String", # Optional. The context id of the message. If set, the message will be associated with the given context. |
| 218 |
"extensions": [ # The URIs of extensions that are present or contributed to this Message. |
| 219 |
"A String", |
| 220 |
], |
| 221 |
"messageId": "A String", # Required. The unique identifier (e.g. UUID) of the message. This is created by the message creator. |
| 222 |
"metadata": { # Optional. Any metadata to provide along with the message. |
| 223 |
"a_key": "", # Properties of the object. |
| 224 |
}, |
| 225 |
"parts": [ # Required. Parts is the container of the message content. |
| 226 |
{ # `Part` represents a container for a section of communication content. Parts can be purely textual, some sort of file (image, video, etc) or a structured data blob (i.e. JSON). |
| 227 |
"data": "", # Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null). |
| 228 |
"filename": "A String", # An optional `filename` for the file (e.g., "document.pdf"). |
| 229 |
"mediaType": "A String", # The `media_type` (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png"). This field is available for all part types. |
| 230 |
"metadata": { # Optional. metadata associated with this part. |
| 231 |
"a_key": "", # Properties of the object. |
| 232 |
}, |
| 233 |
"raw": "A String", # The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string. |
| 234 |
"text": "A String", # The string content of the `text` part. |
| 235 |
"url": "A String", # A `url` pointing to the file's content. |
| 236 |
}, |
| 237 |
], |
| 238 |
"referenceTaskIds": [ # A list of task IDs that this message references for additional context. |
| 239 |
"A String", |
| 240 |
], |
| 241 |
"role": "A String", # Required. Identifies the sender of the message. |
| 242 |
"taskId": "A String", # Optional. The task id of the message. If set, the message will be associated with the given task. |
| 243 |
}, |
| 244 |
], |
| 245 |
"id": "A String", # Required. Unique identifier (e.g. UUID) for the task, generated by the server for a new task. |
| 246 |
"metadata": { # protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task. |
| 247 |
"a_key": "", # Properties of the object. |
| 248 |
}, |
| 249 |
"status": { # A container for the status of a task # Required. The current status of a `Task`, including `state` and a `message`. |
| 250 |
"message": { # `Message` is one unit of communication between client and server. It can be associated with a context and/or a task. For server messages, `context_id` must be provided, and `task_id` only if a task was created. For client messages, both fields are optional, with the caveat that if both are provided, they have to match (the `context_id` has to be the one that is set on the task). If only `task_id` is provided, the server will infer `context_id` from it. # A message associated with the status. |
| 251 |
"contextId": "A String", # Optional. The context id of the message. If set, the message will be associated with the given context. |
| 252 |
"extensions": [ # The URIs of extensions that are present or contributed to this Message. |
| 253 |
"A String", |
| 254 |
], |
| 255 |
"messageId": "A String", # Required. The unique identifier (e.g. UUID) of the message. This is created by the message creator. |
| 256 |
"metadata": { # Optional. Any metadata to provide along with the message. |
| 257 |
"a_key": "", # Properties of the object. |
| 258 |
}, |
| 259 |
"parts": [ # Required. Parts is the container of the message content. |
| 260 |
{ # `Part` represents a container for a section of communication content. Parts can be purely textual, some sort of file (image, video, etc) or a structured data blob (i.e. JSON). |
| 261 |
"data": "", # Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null). |
| 262 |
"filename": "A String", # An optional `filename` for the file (e.g., "document.pdf"). |
| 263 |
"mediaType": "A String", # The `media_type` (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png"). This field is available for all part types. |
| 264 |
"metadata": { # Optional. metadata associated with this part. |
| 265 |
"a_key": "", # Properties of the object. |
| 266 |
}, |
| 267 |
"raw": "A String", # The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string. |
| 268 |
"text": "A String", # The string content of the `text` part. |
| 269 |
"url": "A String", # A `url` pointing to the file's content. |
| 270 |
}, |
| 271 |
], |
| 272 |
"referenceTaskIds": [ # A list of task IDs that this message references for additional context. |
| 273 |
"A String", |
| 274 |
], |
| 275 |
"role": "A String", # Required. Identifies the sender of the message. |
| 276 |
"taskId": "A String", # Optional. The task id of the message. If set, the message will be associated with the given task. |
| 277 |
}, |
| 278 |
"state": "A String", # Required. The current state of this task. |
| 279 |
"timestamp": "A String", # ISO 8601 Timestamp when the status was recorded. Example: "2023-10-27T10:00:00Z" |
| 280 |
}, |
| 281 |
}, |
| 282 |
}</pre> |
| 283 |
</div> |
| 284 |
|
| 285 |
</body></html> |