| 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="workspaceevents_v1.html">Google Workspace Events API</a> . <a href="workspaceevents_v1.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="#stream">stream(body=None, x__xgafv=None)</a></code></p> |
| 82 |
<p class="firstline">SendStreamingMessage is a streaming call that will return a stream of task update events until the Task is in an interrupted or terminal state.</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="stream">stream(body=None, x__xgafv=None)</code> |
| 91 |
<pre>SendStreamingMessage is a streaming call that will return a stream of task update events until the Task is in an interrupted or terminal state. |
| 92 |
|
| 93 |
Args: |
| 94 |
body: object, The request body. |
| 95 |
The object takes the form of: |
| 96 |
|
| 97 |
{ # /////////// Request Messages /////////// |
| 98 |
"configuration": { # Configuration of a send message request. # Configuration for the send request. |
| 99 |
"acceptedOutputModes": [ # The output modes that the agent is expected to respond with. |
| 100 |
"A String", |
| 101 |
], |
| 102 |
"blocking": True or False, # If true, the message will be blocking until the task is completed. If false, the message will be non-blocking and the task will be returned immediately. It is the caller's responsibility to check for any task updates. |
| 103 |
"historyLength": 42, # The maximum number of messages to include in the history. if 0, the history will be unlimited. |
| 104 |
"pushNotification": { # Configuration for setting up push notifications for task updates. # A configuration of a webhook that can be used to receive updates |
| 105 |
"authentication": { # Defines authentication details, used for push notifications. # Information about the authentication to sent with the notification |
| 106 |
"credentials": "A String", # Optional credentials |
| 107 |
"schemes": [ # Supported authentication schemes - e.g. Basic, Bearer, etc |
| 108 |
"A String", |
| 109 |
], |
| 110 |
}, |
| 111 |
"id": "A String", # A unique identifier (e.g. UUID) for this push notification. |
| 112 |
"token": "A String", # Token unique for this task/session |
| 113 |
"url": "A String", # Url to send the notification too |
| 114 |
}, |
| 115 |
}, |
| 116 |
"message": { # Message is one unit of communication between client and server. It is associated with a context and optionally a task. Since the server is responsible for the context definition, it must always provide a context_id in its messages. The client can optionally provide the context_id if it knows the context to associate the message to. Similarly for task_id, except the server decides if a task is created and whether to include the task_id. # Required. The message to send to the agent. |
| 117 |
"content": [ # protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content. |
| 118 |
{ # 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). |
| 119 |
"data": { # DataPart represents a structured blob. This is most commonly a JSON payload. |
| 120 |
"data": { |
| 121 |
"a_key": "", # Properties of the object. |
| 122 |
}, |
| 123 |
}, |
| 124 |
"file": { # FilePart represents the different ways files can be provided. If files are small, directly feeding the bytes is supported via file_with_bytes. If the file is large, the agent should read the content as appropriate directly from the file_with_uri source. |
| 125 |
"fileWithBytes": "A String", |
| 126 |
"fileWithUri": "A String", |
| 127 |
"mimeType": "A String", |
| 128 |
"name": "A String", |
| 129 |
}, |
| 130 |
"metadata": { # Optional metadata associated with this part. |
| 131 |
"a_key": "", # Properties of the object. |
| 132 |
}, |
| 133 |
"text": "A String", |
| 134 |
}, |
| 135 |
], |
| 136 |
"contextId": "A String", # The context id of the message. This is optional and if set, the message will be associated with the given context. |
| 137 |
"extensions": [ # The URIs of extensions that are present or contributed to this Message. |
| 138 |
"A String", |
| 139 |
], |
| 140 |
"messageId": "A String", # The unique identifier (e.g. UUID)of the message. This is required and created by the message creator. |
| 141 |
"metadata": { # protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message. |
| 142 |
"a_key": "", # Properties of the object. |
| 143 |
}, |
| 144 |
"role": "A String", # A role for the message. |
| 145 |
"taskId": "A String", # The task id of the message. This is optional and if set, the message will be associated with the given task. |
| 146 |
}, |
| 147 |
"metadata": { # Optional metadata for the request. |
| 148 |
"a_key": "", # Properties of the object. |
| 149 |
}, |
| 150 |
"tenant": "A String", # Optional tenant, provided as a path parameter. Experimental, might still change for 1.0 release. |
| 151 |
} |
| 152 |
|
| 153 |
x__xgafv: string, V1 error format. |
| 154 |
Allowed values |
| 155 |
1 - v1 error format |
| 156 |
2 - v2 error format |
| 157 |
|
| 158 |
Returns: |
| 159 |
An object of the form: |
| 160 |
|
| 161 |
{ # The stream response for a message. The stream should be one of the following sequences: If the response is a message, the stream should contain one, and only one, message and then close If the response is a task lifecycle, the first response should be a Task object followed by zero or more TaskStatusUpdateEvents and TaskArtifactUpdateEvents. The stream should complete when the Task if in an interrupted or terminal state. A stream that ends before these conditions are met are |
| 162 |
"artifactUpdate": { # TaskArtifactUpdateEvent represents a task delta where an artifact has been generated. |
| 163 |
"append": True or False, # Whether this should be appended to a prior one produced |
| 164 |
"artifact": { # Artifacts are the container for task completed results. These are similar to Messages but are intended to be the product of a task, as opposed to point-to-point communication. # The artifact itself |
| 165 |
"artifactId": "A String", # Unique identifier (e.g. UUID) for the artifact. It must be at least unique within a task. |
| 166 |
"description": "A String", # A human readable description of the artifact, optional. |
| 167 |
"extensions": [ # The URIs of extensions that are present or contributed to this Artifact. |
| 168 |
"A String", |
| 169 |
], |
| 170 |
"metadata": { # Optional metadata included with the artifact. |
| 171 |
"a_key": "", # Properties of the object. |
| 172 |
}, |
| 173 |
"name": "A String", # A human readable name for the artifact. |
| 174 |
"parts": [ # The content of the artifact. |
| 175 |
{ # 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). |
| 176 |
"data": { # DataPart represents a structured blob. This is most commonly a JSON payload. |
| 177 |
"data": { |
| 178 |
"a_key": "", # Properties of the object. |
| 179 |
}, |
| 180 |
}, |
| 181 |
"file": { # FilePart represents the different ways files can be provided. If files are small, directly feeding the bytes is supported via file_with_bytes. If the file is large, the agent should read the content as appropriate directly from the file_with_uri source. |
| 182 |
"fileWithBytes": "A String", |
| 183 |
"fileWithUri": "A String", |
| 184 |
"mimeType": "A String", |
| 185 |
"name": "A String", |
| 186 |
}, |
| 187 |
"metadata": { # Optional metadata associated with this part. |
| 188 |
"a_key": "", # Properties of the object. |
| 189 |
}, |
| 190 |
"text": "A String", |
| 191 |
}, |
| 192 |
], |
| 193 |
}, |
| 194 |
"contextId": "A String", # The id of the context that this task belongs too |
| 195 |
"lastChunk": True or False, # Whether this represents the last part of an artifact |
| 196 |
"metadata": { # Optional metadata associated with the artifact update. |
| 197 |
"a_key": "", # Properties of the object. |
| 198 |
}, |
| 199 |
"taskId": "A String", # The id of the task for this artifact |
| 200 |
}, |
| 201 |
"message": { # Message is one unit of communication between client and server. It is associated with a context and optionally a task. Since the server is responsible for the context definition, it must always provide a context_id in its messages. The client can optionally provide the context_id if it knows the context to associate the message to. Similarly for task_id, except the server decides if a task is created and whether to include the task_id. |
| 202 |
"content": [ # protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content. |
| 203 |
{ # 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). |
| 204 |
"data": { # DataPart represents a structured blob. This is most commonly a JSON payload. |
| 205 |
"data": { |
| 206 |
"a_key": "", # Properties of the object. |
| 207 |
}, |
| 208 |
}, |
| 209 |
"file": { # FilePart represents the different ways files can be provided. If files are small, directly feeding the bytes is supported via file_with_bytes. If the file is large, the agent should read the content as appropriate directly from the file_with_uri source. |
| 210 |
"fileWithBytes": "A String", |
| 211 |
"fileWithUri": "A String", |
| 212 |
"mimeType": "A String", |
| 213 |
"name": "A String", |
| 214 |
}, |
| 215 |
"metadata": { # Optional metadata associated with this part. |
| 216 |
"a_key": "", # Properties of the object. |
| 217 |
}, |
| 218 |
"text": "A String", |
| 219 |
}, |
| 220 |
], |
| 221 |
"contextId": "A String", # The context id of the message. This is optional and if set, the message will be associated with the given context. |
| 222 |
"extensions": [ # The URIs of extensions that are present or contributed to this Message. |
| 223 |
"A String", |
| 224 |
], |
| 225 |
"messageId": "A String", # The unique identifier (e.g. UUID)of the message. This is required and created by the message creator. |
| 226 |
"metadata": { # protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message. |
| 227 |
"a_key": "", # Properties of the object. |
| 228 |
}, |
| 229 |
"role": "A String", # A role for the message. |
| 230 |
"taskId": "A String", # The task id of the message. This is optional and if set, the message will be associated with the given task. |
| 231 |
}, |
| 232 |
"statusUpdate": { # TaskStatusUpdateEvent is a delta even on a task indicating that a task has changed. |
| 233 |
"contextId": "A String", # The id of the context that the task belongs to |
| 234 |
"final": True or False, # Whether this is the last status update expected for this task. |
| 235 |
"metadata": { # Optional metadata to associate with the task update. |
| 236 |
"a_key": "", # Properties of the object. |
| 237 |
}, |
| 238 |
"status": { # A container for the status of a task # The new status of the task. |
| 239 |
"message": { # Message is one unit of communication between client and server. It is associated with a context and optionally a task. Since the server is responsible for the context definition, it must always provide a context_id in its messages. The client can optionally provide the context_id if it knows the context to associate the message to. Similarly for task_id, except the server decides if a task is created and whether to include the task_id. # A message associated with the status. |
| 240 |
"content": [ # protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content. |
| 241 |
{ # 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). |
| 242 |
"data": { # DataPart represents a structured blob. This is most commonly a JSON payload. |
| 243 |
"data": { |
| 244 |
"a_key": "", # Properties of the object. |
| 245 |
}, |
| 246 |
}, |
| 247 |
"file": { # FilePart represents the different ways files can be provided. If files are small, directly feeding the bytes is supported via file_with_bytes. If the file is large, the agent should read the content as appropriate directly from the file_with_uri source. |
| 248 |
"fileWithBytes": "A String", |
| 249 |
"fileWithUri": "A String", |
| 250 |
"mimeType": "A String", |
| 251 |
"name": "A String", |
| 252 |
}, |
| 253 |
"metadata": { # Optional metadata associated with this part. |
| 254 |
"a_key": "", # Properties of the object. |
| 255 |
}, |
| 256 |
"text": "A String", |
| 257 |
}, |
| 258 |
], |
| 259 |
"contextId": "A String", # The context id of the message. This is optional and if set, the message will be associated with the given context. |
| 260 |
"extensions": [ # The URIs of extensions that are present or contributed to this Message. |
| 261 |
"A String", |
| 262 |
], |
| 263 |
"messageId": "A String", # The unique identifier (e.g. UUID)of the message. This is required and created by the message creator. |
| 264 |
"metadata": { # protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message. |
| 265 |
"a_key": "", # Properties of the object. |
| 266 |
}, |
| 267 |
"role": "A String", # A role for the message. |
| 268 |
"taskId": "A String", # The task id of the message. This is optional and if set, the message will be associated with the given task. |
| 269 |
}, |
| 270 |
"state": "A String", # The current state of this task |
| 271 |
"timestamp": "A String", # Timestamp when the status was recorded. Example: "2023-10-27T10:00:00Z" |
| 272 |
}, |
| 273 |
"taskId": "A String", # The id of the task that is changed |
| 274 |
}, |
| 275 |
"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. |
| 276 |
"artifacts": [ # A set of output artifacts for a Task. |
| 277 |
{ # Artifacts are the container for task completed results. These are similar to Messages but are intended to be the product of a task, as opposed to point-to-point communication. |
| 278 |
"artifactId": "A String", # Unique identifier (e.g. UUID) for the artifact. It must be at least unique within a task. |
| 279 |
"description": "A String", # A human readable description of the artifact, optional. |
| 280 |
"extensions": [ # The URIs of extensions that are present or contributed to this Artifact. |
| 281 |
"A String", |
| 282 |
], |
| 283 |
"metadata": { # Optional metadata included with the artifact. |
| 284 |
"a_key": "", # Properties of the object. |
| 285 |
}, |
| 286 |
"name": "A String", # A human readable name for the artifact. |
| 287 |
"parts": [ # The content of the artifact. |
| 288 |
{ # 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). |
| 289 |
"data": { # DataPart represents a structured blob. This is most commonly a JSON payload. |
| 290 |
"data": { |
| 291 |
"a_key": "", # Properties of the object. |
| 292 |
}, |
| 293 |
}, |
| 294 |
"file": { # FilePart represents the different ways files can be provided. If files are small, directly feeding the bytes is supported via file_with_bytes. If the file is large, the agent should read the content as appropriate directly from the file_with_uri source. |
| 295 |
"fileWithBytes": "A String", |
| 296 |
"fileWithUri": "A String", |
| 297 |
"mimeType": "A String", |
| 298 |
"name": "A String", |
| 299 |
}, |
| 300 |
"metadata": { # Optional metadata associated with this part. |
| 301 |
"a_key": "", # Properties of the object. |
| 302 |
}, |
| 303 |
"text": "A String", |
| 304 |
}, |
| 305 |
], |
| 306 |
}, |
| 307 |
], |
| 308 |
"contextId": "A String", # Unique identifier (e.g. UUID) for the contextual collection of interactions (tasks and messages). Created by the A2A server. |
| 309 |
"history": [ # protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a task. |
| 310 |
{ # Message is one unit of communication between client and server. It is associated with a context and optionally a task. Since the server is responsible for the context definition, it must always provide a context_id in its messages. The client can optionally provide the context_id if it knows the context to associate the message to. Similarly for task_id, except the server decides if a task is created and whether to include the task_id. |
| 311 |
"content": [ # protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content. |
| 312 |
{ # 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). |
| 313 |
"data": { # DataPart represents a structured blob. This is most commonly a JSON payload. |
| 314 |
"data": { |
| 315 |
"a_key": "", # Properties of the object. |
| 316 |
}, |
| 317 |
}, |
| 318 |
"file": { # FilePart represents the different ways files can be provided. If files are small, directly feeding the bytes is supported via file_with_bytes. If the file is large, the agent should read the content as appropriate directly from the file_with_uri source. |
| 319 |
"fileWithBytes": "A String", |
| 320 |
"fileWithUri": "A String", |
| 321 |
"mimeType": "A String", |
| 322 |
"name": "A String", |
| 323 |
}, |
| 324 |
"metadata": { # Optional metadata associated with this part. |
| 325 |
"a_key": "", # Properties of the object. |
| 326 |
}, |
| 327 |
"text": "A String", |
| 328 |
}, |
| 329 |
], |
| 330 |
"contextId": "A String", # The context id of the message. This is optional and if set, the message will be associated with the given context. |
| 331 |
"extensions": [ # The URIs of extensions that are present or contributed to this Message. |
| 332 |
"A String", |
| 333 |
], |
| 334 |
"messageId": "A String", # The unique identifier (e.g. UUID)of the message. This is required and created by the message creator. |
| 335 |
"metadata": { # protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message. |
| 336 |
"a_key": "", # Properties of the object. |
| 337 |
}, |
| 338 |
"role": "A String", # A role for the message. |
| 339 |
"taskId": "A String", # The task id of the message. This is optional and if set, the message will be associated with the given task. |
| 340 |
}, |
| 341 |
], |
| 342 |
"id": "A String", # Unique identifier (e.g. UUID) for the task, generated by the server for a new task. |
| 343 |
"metadata": { # protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task. |
| 344 |
"a_key": "", # Properties of the object. |
| 345 |
}, |
| 346 |
"status": { # A container for the status of a task # The current status of a Task, including state and a message. |
| 347 |
"message": { # Message is one unit of communication between client and server. It is associated with a context and optionally a task. Since the server is responsible for the context definition, it must always provide a context_id in its messages. The client can optionally provide the context_id if it knows the context to associate the message to. Similarly for task_id, except the server decides if a task is created and whether to include the task_id. # A message associated with the status. |
| 348 |
"content": [ # protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content. |
| 349 |
{ # 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). |
| 350 |
"data": { # DataPart represents a structured blob. This is most commonly a JSON payload. |
| 351 |
"data": { |
| 352 |
"a_key": "", # Properties of the object. |
| 353 |
}, |
| 354 |
}, |
| 355 |
"file": { # FilePart represents the different ways files can be provided. If files are small, directly feeding the bytes is supported via file_with_bytes. If the file is large, the agent should read the content as appropriate directly from the file_with_uri source. |
| 356 |
"fileWithBytes": "A String", |
| 357 |
"fileWithUri": "A String", |
| 358 |
"mimeType": "A String", |
| 359 |
"name": "A String", |
| 360 |
}, |
| 361 |
"metadata": { # Optional metadata associated with this part. |
| 362 |
"a_key": "", # Properties of the object. |
| 363 |
}, |
| 364 |
"text": "A String", |
| 365 |
}, |
| 366 |
], |
| 367 |
"contextId": "A String", # The context id of the message. This is optional and if set, the message will be associated with the given context. |
| 368 |
"extensions": [ # The URIs of extensions that are present or contributed to this Message. |
| 369 |
"A String", |
| 370 |
], |
| 371 |
"messageId": "A String", # The unique identifier (e.g. UUID)of the message. This is required and created by the message creator. |
| 372 |
"metadata": { # protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message. |
| 373 |
"a_key": "", # Properties of the object. |
| 374 |
}, |
| 375 |
"role": "A String", # A role for the message. |
| 376 |
"taskId": "A String", # The task id of the message. This is optional and if set, the message will be associated with the given task. |
| 377 |
}, |
| 378 |
"state": "A String", # The current state of this task |
| 379 |
"timestamp": "A String", # Timestamp when the status was recorded. Example: "2023-10-27T10:00:00Z" |
| 380 |
}, |
| 381 |
}, |
| 382 |
}</pre> |
| 383 |
</div> |
| 384 |
|
| 385 |
</body></html> |