blob: ed4ca7ddadd4ea6b5fe08194dab40d0115adf0ca [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="contactcenterinsights_v1.html">Contact Center AI Insights API</a> . <a href="contactcenterinsights_v1.projects.html">projects</a> . <a href="contactcenterinsights_v1.projects.locations.html">locations</a> . <a href="contactcenterinsights_v1.projects.locations.assistantSessions.html">assistantSessions</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="#create">create(parent, assistantSessionId=None, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates an assistant session.</p>
<p class="toc_element">
<code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Gets an assistant session.</p>
<p class="toc_element">
<code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists assistant sessions.</p>
<p class="toc_element">
<code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
<code><a href="#streamChat">streamChat(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Streams chat messages from the assistant.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="create">create(parent, assistantSessionId=None, body=None, x__xgafv=None)</code>
<pre>Creates an assistant session.
Args:
parent: string, Required. The parent resource where this assistant session will be created. Format: projects/{project}/locations/{location} (required)
body: object, The request body.
The object takes the form of:
{ # Represents a conversation session with the Assistant Agent.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the session was created.
&quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the session.
&quot;messages&quot;: [ # Optional. History of messages in the session.
{ # A message in an assistant session.
&quot;chunks&quot;: [ # Required. Content of the message.
{ # A chunk of data in an assistant message.
&quot;text&quot;: &quot;A String&quot;, # Optional. Text data.
},
],
&quot;eventTime&quot;: &quot;A String&quot;, # Required. Timestamp when the message was sent or received.
&quot;role&quot;: &quot;A String&quot;, # Required. Role within the conversation.
},
],
&quot;name&quot;: &quot;A String&quot;, # Identifier. Resource name of the session. Format: projects/{project}/locations/{location}/assistantSessions/{assistant_session}
&quot;requester&quot;: &quot;A String&quot;, # Output only. The user who initiated the session.
&quot;state&quot;: &quot;A String&quot;, # Output only. The status of the session.
&quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time the session was last updated.
}
assistantSessionId: string, Optional. The ID to use for the assistant session, which will become the final component of the assistant session&#x27;s resource name. If not provided, a random UUID will be generated by the server. This value should be 4-64 characters and must match the regular expression `^[a-z0-9-]{4,64}$`.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Represents a conversation session with the Assistant Agent.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the session was created.
&quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the session.
&quot;messages&quot;: [ # Optional. History of messages in the session.
{ # A message in an assistant session.
&quot;chunks&quot;: [ # Required. Content of the message.
{ # A chunk of data in an assistant message.
&quot;text&quot;: &quot;A String&quot;, # Optional. Text data.
},
],
&quot;eventTime&quot;: &quot;A String&quot;, # Required. Timestamp when the message was sent or received.
&quot;role&quot;: &quot;A String&quot;, # Required. Role within the conversation.
},
],
&quot;name&quot;: &quot;A String&quot;, # Identifier. Resource name of the session. Format: projects/{project}/locations/{location}/assistantSessions/{assistant_session}
&quot;requester&quot;: &quot;A String&quot;, # Output only. The user who initiated the session.
&quot;state&quot;: &quot;A String&quot;, # Output only. The status of the session.
&quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time the session was last updated.
}</pre>
</div>
<div class="method">
<code class="details" id="get">get(name, x__xgafv=None)</code>
<pre>Gets an assistant session.
Args:
name: string, Required. The name of the assistant session to retrieve. Format: `projects/{project}/locations/{location}/assistantSessions/{assistant_session}` (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Represents a conversation session with the Assistant Agent.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the session was created.
&quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the session.
&quot;messages&quot;: [ # Optional. History of messages in the session.
{ # A message in an assistant session.
&quot;chunks&quot;: [ # Required. Content of the message.
{ # A chunk of data in an assistant message.
&quot;text&quot;: &quot;A String&quot;, # Optional. Text data.
},
],
&quot;eventTime&quot;: &quot;A String&quot;, # Required. Timestamp when the message was sent or received.
&quot;role&quot;: &quot;A String&quot;, # Required. Role within the conversation.
},
],
&quot;name&quot;: &quot;A String&quot;, # Identifier. Resource name of the session. Format: projects/{project}/locations/{location}/assistantSessions/{assistant_session}
&quot;requester&quot;: &quot;A String&quot;, # Output only. The user who initiated the session.
&quot;state&quot;: &quot;A String&quot;, # Output only. The status of the session.
&quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time the session was last updated.
}</pre>
</div>
<div class="method">
<code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
<pre>Lists assistant sessions.
Args:
parent: string, Required. The parent resource, which owns this collection of assistant sessions. Format: `projects/{project}/locations/{location}` (required)
filter: string, Optional. A filter to reduce results to a specific subset.
pageSize: integer, Optional. The maximum number of assistant sessions to return in a single response. If unspecified, at most 100 assistant sessions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
pageToken: string, Optional. A page token, received from a previous `ListAssistantSessions` call. Provide this to retrieve the subsequent page.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response to list assistant sessions.
&quot;assistantSessions&quot;: [ # The assistant sessions.
{ # Represents a conversation session with the Assistant Agent.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the session was created.
&quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the session.
&quot;messages&quot;: [ # Optional. History of messages in the session.
{ # A message in an assistant session.
&quot;chunks&quot;: [ # Required. Content of the message.
{ # A chunk of data in an assistant message.
&quot;text&quot;: &quot;A String&quot;, # Optional. Text data.
},
],
&quot;eventTime&quot;: &quot;A String&quot;, # Required. Timestamp when the message was sent or received.
&quot;role&quot;: &quot;A String&quot;, # Required. Role within the conversation.
},
],
&quot;name&quot;: &quot;A String&quot;, # Identifier. Resource name of the session. Format: projects/{project}/locations/{location}/assistantSessions/{assistant_session}
&quot;requester&quot;: &quot;A String&quot;, # Output only. The user who initiated the session.
&quot;state&quot;: &quot;A String&quot;, # Output only. The status of the session.
&quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time the session was last updated.
},
],
&quot;nextPageToken&quot;: &quot;A String&quot;, # A token, which can be sent as `page_token` to retrieve the next page.
}</pre>
</div>
<div class="method">
<code class="details" id="list_next">list_next(previous_request, previous_response)</code>
<pre>Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call &#x27;execute()&#x27; on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
<div class="method">
<code class="details" id="streamChat">streamChat(name, body=None, x__xgafv=None)</code>
<pre>Streams chat messages from the assistant.
Args:
name: string, Required. The name of the assistant session to stream chat. Format: `projects/{project}/locations/{location}/assistantSessions/{assistant_session}` (required)
body: object, The request body.
The object takes the form of:
{ # Request to stream chat.
&quot;message&quot;: &quot;A String&quot;, # Required. The message to send to the assistant.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response from streaming chat.
&quot;chunk&quot;: { # A chunk of data in an assistant message. # A chunk of the assistant response message.
&quot;text&quot;: &quot;A String&quot;, # Optional. Text data.
},
&quot;eventId&quot;: &quot;A String&quot;, # The unique ID of the event.
&quot;eventTime&quot;: &quot;A String&quot;, # The time when the event occurred.
&quot;statusMessage&quot;: &quot;A String&quot;, # A status message.
}</pre>
</div>
</body></html>