assistant_sessions
Creates, updates, deletes, gets or lists an assistant_sessions resource.
Overview
| Name | assistant_sessions |
| Type | Resource |
| Id | google.contactcenterinsights.assistant_sessions |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Resource name of the session. Format: projects/{project}/locations/{location}/assistantSessions/{assistant_session} |
createTime | string (google-datetime) | Output only. The time the session was created. |
displayName | string | Optional. The display name of the session. |
messages | array | Optional. History of messages in the session. |
requester | string | Output only. The user who initiated the session. |
state | string | Output only. The status of the session. (STATE_UNSPECIFIED, PROCESSING, IDLE) |
updateTime | string (google-datetime) | Output only. The time the session was last updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Resource name of the session. Format: projects/{project}/locations/{location}/assistantSessions/{assistant_session} |
createTime | string (google-datetime) | Output only. The time the session was created. |
displayName | string | Optional. The display name of the session. |
messages | array | Optional. History of messages in the session. |
requester | string | Output only. The user who initiated the session. |
state | string | Output only. The status of the session. (STATE_UNSPECIFIED, PROCESSING, IDLE) |
updateTime | string (google-datetime) | Output only. The time the session was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, assistantSessionsId | Gets an assistant session. | |
list | select | projectsId, locationsId | pageSize, pageToken, filter | Lists assistant sessions. |
create | insert | projectsId, locationsId | assistantSessionId | Creates an assistant session. |
stream_chat | exec | projectsId, locationsId, assistantSessionsId | Streams chat messages from the assistant. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
assistantSessionsId | string | |
locationsId | string | |
projectsId | string | |
assistantSessionId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT examples
- get
- list
Gets an assistant session.
SELECT
name,
createTime,
displayName,
messages,
requester,
state,
updateTime
FROM google.contactcenterinsights.assistant_sessions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND assistantSessionsId = '{{ assistantSessionsId }}' -- required
;
Lists assistant sessions.
SELECT
name,
createTime,
displayName,
messages,
requester,
state,
updateTime
FROM google.contactcenterinsights.assistant_sessions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
;
INSERT examples
- create
- Manifest
Creates an assistant session.
INSERT INTO google.contactcenterinsights.assistant_sessions (
data__messages,
data__name,
data__displayName,
projectsId,
locationsId,
assistantSessionId
)
SELECT
'{{ messages }}',
'{{ name }}',
'{{ displayName }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ assistantSessionId }}'
RETURNING
name,
createTime,
displayName,
messages,
requester,
state,
updateTime
;
# Description fields are for documentation purposes
- name: assistant_sessions
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the assistant_sessions resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the assistant_sessions resource.
- name: messages
description: |
Optional. History of messages in the session.
value:
- chunks: "{{ chunks }}"
eventTime: "{{ eventTime }}"
role: "{{ role }}"
- name: name
value: "{{ name }}"
description: |
Identifier. Resource name of the session. Format: projects/{project}/locations/{location}/assistantSessions/{assistant_session}
- name: displayName
value: "{{ displayName }}"
description: |
Optional. The display name of the session.
- name: assistantSessionId
value: "{{ assistantSessionId }}"
Lifecycle Methods
- stream_chat
Streams chat messages from the assistant.
EXEC google.contactcenterinsights.assistant_sessions.stream_chat
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@assistantSessionsId='{{ assistantSessionsId }}' --required
@@json=
'{
"message": "{{ message }}"
}'
;