blob: c0742277a587fa66ed419c375a8676c8661e19cd [file] [edit]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="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>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#send">send(tenant, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Sends a message to an agent.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="send">send(tenant, body=None, x__xgafv=None)</code>
<pre>Sends a message to an agent.
Args:
tenant: string, Optional. Tenant ID, provided as a path parameter. (required)
body: object, The request body.
The object takes the form of:
{ # Represents a request for the `SendMessage` method.
&quot;configuration&quot;: { # Configuration of a send message request. # Configuration for the send request.
&quot;acceptedOutputModes&quot;: [ # A list of media types the client is prepared to accept for response parts. Agents SHOULD use this to tailor their output.
&quot;A String&quot;,
],
&quot;historyLength&quot;: 42, # The maximum number of most recent messages from the task&#x27;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.
&quot;returnImmediately&quot;: 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.
&quot;taskPushNotificationConfig&quot;: { # 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.
&quot;authentication&quot;: { # Defines authentication details, used for push notifications. # Authentication information required to send the notification.
&quot;credentials&quot;: &quot;A String&quot;, # Push Notification credentials. Format depends on the scheme (e.g., token for Bearer).
&quot;scheme&quot;: &quot;A String&quot;, # 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).
},
&quot;id&quot;: &quot;A String&quot;, # The push notification configuration details. A unique identifier (e.g. UUID) for this push notification configuration.
&quot;taskId&quot;: &quot;A String&quot;, # The ID of the task this configuration is associated with.
&quot;tenant&quot;: &quot;A String&quot;, # Optional. Tenant ID.
&quot;token&quot;: &quot;A String&quot;, # A token unique for this task or session.
&quot;url&quot;: &quot;A String&quot;, # Required. The URL where the notification should be sent.
},
},
&quot;message&quot;: { # `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.
&quot;contextId&quot;: &quot;A String&quot;, # Optional. The context id of the message. If set, the message will be associated with the given context.
&quot;extensions&quot;: [ # The URIs of extensions that are present or contributed to this Message.
&quot;A String&quot;,
],
&quot;messageId&quot;: &quot;A String&quot;, # Required. The unique identifier (e.g. UUID) of the message. This is created by the message creator.
&quot;metadata&quot;: { # Optional. Any metadata to provide along with the message.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
&quot;parts&quot;: [ # Required. Parts is the container of the message content.
{ # `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).
&quot;data&quot;: &quot;&quot;, # Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null).
&quot;filename&quot;: &quot;A String&quot;, # An optional `filename` for the file (e.g., &quot;document.pdf&quot;).
&quot;mediaType&quot;: &quot;A String&quot;, # The `media_type` (MIME type) of the part content (e.g., &quot;text/plain&quot;, &quot;application/json&quot;, &quot;image/png&quot;). This field is available for all part types.
&quot;metadata&quot;: { # Optional. metadata associated with this part.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
&quot;raw&quot;: &quot;A String&quot;, # The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string.
&quot;text&quot;: &quot;A String&quot;, # The string content of the `text` part.
&quot;url&quot;: &quot;A String&quot;, # A `url` pointing to the file&#x27;s content.
},
],
&quot;referenceTaskIds&quot;: [ # A list of task IDs that this message references for additional context.
&quot;A String&quot;,
],
&quot;role&quot;: &quot;A String&quot;, # Required. Identifies the sender of the message.
&quot;taskId&quot;: &quot;A String&quot;, # Optional. The task id of the message. If set, the message will be associated with the given task.
},
&quot;metadata&quot;: { # A flexible key-value map for passing additional context or parameters.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Represents the response for the `SendMessage` method.
&quot;message&quot;: { # `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.
&quot;contextId&quot;: &quot;A String&quot;, # Optional. The context id of the message. If set, the message will be associated with the given context.
&quot;extensions&quot;: [ # The URIs of extensions that are present or contributed to this Message.
&quot;A String&quot;,
],
&quot;messageId&quot;: &quot;A String&quot;, # Required. The unique identifier (e.g. UUID) of the message. This is created by the message creator.
&quot;metadata&quot;: { # Optional. Any metadata to provide along with the message.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
&quot;parts&quot;: [ # Required. Parts is the container of the message content.
{ # `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).
&quot;data&quot;: &quot;&quot;, # Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null).
&quot;filename&quot;: &quot;A String&quot;, # An optional `filename` for the file (e.g., &quot;document.pdf&quot;).
&quot;mediaType&quot;: &quot;A String&quot;, # The `media_type` (MIME type) of the part content (e.g., &quot;text/plain&quot;, &quot;application/json&quot;, &quot;image/png&quot;). This field is available for all part types.
&quot;metadata&quot;: { # Optional. metadata associated with this part.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
&quot;raw&quot;: &quot;A String&quot;, # The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string.
&quot;text&quot;: &quot;A String&quot;, # The string content of the `text` part.
&quot;url&quot;: &quot;A String&quot;, # A `url` pointing to the file&#x27;s content.
},
],
&quot;referenceTaskIds&quot;: [ # A list of task IDs that this message references for additional context.
&quot;A String&quot;,
],
&quot;role&quot;: &quot;A String&quot;, # Required. Identifies the sender of the message.
&quot;taskId&quot;: &quot;A String&quot;, # Optional. The task id of the message. If set, the message will be associated with the given task.
},
&quot;task&quot;: { # `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.
&quot;artifacts&quot;: [ # A set of output artifacts for a `Task`.
{ # Artifacts represent task outputs.
&quot;artifactId&quot;: &quot;A String&quot;, # Required. Unique identifier (e.g. UUID) for the artifact. It must be unique within a task.
&quot;description&quot;: &quot;A String&quot;, # Optional. A human readable description of the artifact.
&quot;extensions&quot;: [ # The URIs of extensions that are present or contributed to this Artifact.
&quot;A String&quot;,
],
&quot;metadata&quot;: { # Optional. Metadata included with the artifact.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
&quot;name&quot;: &quot;A String&quot;, # A human readable name for the artifact.
&quot;parts&quot;: [ # Required. The content of the artifact. Must contain at least one part.
{ # `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).
&quot;data&quot;: &quot;&quot;, # Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null).
&quot;filename&quot;: &quot;A String&quot;, # An optional `filename` for the file (e.g., &quot;document.pdf&quot;).
&quot;mediaType&quot;: &quot;A String&quot;, # The `media_type` (MIME type) of the part content (e.g., &quot;text/plain&quot;, &quot;application/json&quot;, &quot;image/png&quot;). This field is available for all part types.
&quot;metadata&quot;: { # Optional. metadata associated with this part.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
&quot;raw&quot;: &quot;A String&quot;, # The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string.
&quot;text&quot;: &quot;A String&quot;, # The string content of the `text` part.
&quot;url&quot;: &quot;A String&quot;, # A `url` pointing to the file&#x27;s content.
},
],
},
],
&quot;contextId&quot;: &quot;A String&quot;, # Unique identifier (e.g. UUID) for the contextual collection of interactions (tasks and messages).
&quot;history&quot;: [ # protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
{ # `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.
&quot;contextId&quot;: &quot;A String&quot;, # Optional. The context id of the message. If set, the message will be associated with the given context.
&quot;extensions&quot;: [ # The URIs of extensions that are present or contributed to this Message.
&quot;A String&quot;,
],
&quot;messageId&quot;: &quot;A String&quot;, # Required. The unique identifier (e.g. UUID) of the message. This is created by the message creator.
&quot;metadata&quot;: { # Optional. Any metadata to provide along with the message.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
&quot;parts&quot;: [ # Required. Parts is the container of the message content.
{ # `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).
&quot;data&quot;: &quot;&quot;, # Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null).
&quot;filename&quot;: &quot;A String&quot;, # An optional `filename` for the file (e.g., &quot;document.pdf&quot;).
&quot;mediaType&quot;: &quot;A String&quot;, # The `media_type` (MIME type) of the part content (e.g., &quot;text/plain&quot;, &quot;application/json&quot;, &quot;image/png&quot;). This field is available for all part types.
&quot;metadata&quot;: { # Optional. metadata associated with this part.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
&quot;raw&quot;: &quot;A String&quot;, # The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string.
&quot;text&quot;: &quot;A String&quot;, # The string content of the `text` part.
&quot;url&quot;: &quot;A String&quot;, # A `url` pointing to the file&#x27;s content.
},
],
&quot;referenceTaskIds&quot;: [ # A list of task IDs that this message references for additional context.
&quot;A String&quot;,
],
&quot;role&quot;: &quot;A String&quot;, # Required. Identifies the sender of the message.
&quot;taskId&quot;: &quot;A String&quot;, # Optional. The task id of the message. If set, the message will be associated with the given task.
},
],
&quot;id&quot;: &quot;A String&quot;, # Required. Unique identifier (e.g. UUID) for the task, generated by the server for a new task.
&quot;metadata&quot;: { # protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
&quot;status&quot;: { # A container for the status of a task # Required. The current status of a `Task`, including `state` and a `message`.
&quot;message&quot;: { # `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.
&quot;contextId&quot;: &quot;A String&quot;, # Optional. The context id of the message. If set, the message will be associated with the given context.
&quot;extensions&quot;: [ # The URIs of extensions that are present or contributed to this Message.
&quot;A String&quot;,
],
&quot;messageId&quot;: &quot;A String&quot;, # Required. The unique identifier (e.g. UUID) of the message. This is created by the message creator.
&quot;metadata&quot;: { # Optional. Any metadata to provide along with the message.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
&quot;parts&quot;: [ # Required. Parts is the container of the message content.
{ # `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).
&quot;data&quot;: &quot;&quot;, # Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null).
&quot;filename&quot;: &quot;A String&quot;, # An optional `filename` for the file (e.g., &quot;document.pdf&quot;).
&quot;mediaType&quot;: &quot;A String&quot;, # The `media_type` (MIME type) of the part content (e.g., &quot;text/plain&quot;, &quot;application/json&quot;, &quot;image/png&quot;). This field is available for all part types.
&quot;metadata&quot;: { # Optional. metadata associated with this part.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
&quot;raw&quot;: &quot;A String&quot;, # The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string.
&quot;text&quot;: &quot;A String&quot;, # The string content of the `text` part.
&quot;url&quot;: &quot;A String&quot;, # A `url` pointing to the file&#x27;s content.
},
],
&quot;referenceTaskIds&quot;: [ # A list of task IDs that this message references for additional context.
&quot;A String&quot;,
],
&quot;role&quot;: &quot;A String&quot;, # Required. Identifies the sender of the message.
&quot;taskId&quot;: &quot;A String&quot;, # Optional. The task id of the message. If set, the message will be associated with the given task.
},
&quot;state&quot;: &quot;A String&quot;, # Required. The current state of this task.
&quot;timestamp&quot;: &quot;A String&quot;, # ISO 8601 Timestamp when the status was recorded. Example: &quot;2023-10-27T10:00:00Z&quot;
},
},
}</pre>
</div>
</body></html>