conversations
Creates, updates, deletes, gets or lists a conversations resource.
Overview
| Name | conversations |
| Type | Resource |
| Id | google.discoveryengine.conversations |
Fields
The following fields are returned by SELECT queries:
- projects_locations_collections_data_stores_conversations_get
- projects_locations_collections_engines_conversations_get
- projects_locations_data_stores_conversations_get
- projects_locations_collections_data_stores_conversations_list
- projects_locations_collections_engines_conversations_list
- projects_locations_data_stores_conversations_list
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Fully qualified name projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/* or projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*. |
endTime | string (google-datetime) | Output only. The time the conversation finished. |
messages | array | Conversation messages. |
startTime | string (google-datetime) | Output only. The time the conversation started. |
state | string | The state of the Conversation. (STATE_UNSPECIFIED, IN_PROGRESS, COMPLETED) |
userPseudoId | string | A unique identifier for tracking users. |
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Fully qualified name projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/* or projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*. |
endTime | string (google-datetime) | Output only. The time the conversation finished. |
messages | array | Conversation messages. |
startTime | string (google-datetime) | Output only. The time the conversation started. |
state | string | The state of the Conversation. (STATE_UNSPECIFIED, IN_PROGRESS, COMPLETED) |
userPseudoId | string | A unique identifier for tracking users. |
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Fully qualified name projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/* or projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*. |
endTime | string (google-datetime) | Output only. The time the conversation finished. |
messages | array | Conversation messages. |
startTime | string (google-datetime) | Output only. The time the conversation started. |
state | string | The state of the Conversation. (STATE_UNSPECIFIED, IN_PROGRESS, COMPLETED) |
userPseudoId | string | A unique identifier for tracking users. |
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Fully qualified name projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/* or projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*. |
endTime | string (google-datetime) | Output only. The time the conversation finished. |
messages | array | Conversation messages. |
startTime | string (google-datetime) | Output only. The time the conversation started. |
state | string | The state of the Conversation. (STATE_UNSPECIFIED, IN_PROGRESS, COMPLETED) |
userPseudoId | string | A unique identifier for tracking users. |
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Fully qualified name projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/* or projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*. |
endTime | string (google-datetime) | Output only. The time the conversation finished. |
messages | array | Conversation messages. |
startTime | string (google-datetime) | Output only. The time the conversation started. |
state | string | The state of the Conversation. (STATE_UNSPECIFIED, IN_PROGRESS, COMPLETED) |
userPseudoId | string | A unique identifier for tracking users. |
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Fully qualified name projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/* or projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*. |
endTime | string (google-datetime) | Output only. The time the conversation finished. |
messages | array | Conversation messages. |
startTime | string (google-datetime) | Output only. The time the conversation started. |
state | string | The state of the Conversation. (STATE_UNSPECIFIED, IN_PROGRESS, COMPLETED) |
userPseudoId | string | A unique identifier for tracking users. |
Methods
The following methods are available for this resource:
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 |
|---|---|---|
collectionsId | string | |
conversationsId | string | |
dataStoresId | string | |
enginesId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- projects_locations_collections_data_stores_conversations_get
- projects_locations_collections_engines_conversations_get
- projects_locations_data_stores_conversations_get
- projects_locations_collections_data_stores_conversations_list
- projects_locations_collections_engines_conversations_list
- projects_locations_data_stores_conversations_list
Gets a Conversation.
SELECT
name,
endTime,
messages,
startTime,
state,
userPseudoId
FROM google.discoveryengine.conversations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND collectionsId = '{{ collectionsId }}' -- required
AND dataStoresId = '{{ dataStoresId }}' -- required
AND conversationsId = '{{ conversationsId }}' -- required
;
Gets a Conversation.
SELECT
name,
endTime,
messages,
startTime,
state,
userPseudoId
FROM google.discoveryengine.conversations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND collectionsId = '{{ collectionsId }}' -- required
AND enginesId = '{{ enginesId }}' -- required
AND conversationsId = '{{ conversationsId }}' -- required
;
Gets a Conversation.
SELECT
name,
endTime,
messages,
startTime,
state,
userPseudoId
FROM google.discoveryengine.conversations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dataStoresId = '{{ dataStoresId }}' -- required
AND conversationsId = '{{ conversationsId }}' -- required
;
Lists all Conversations by their parent DataStore.
SELECT
name,
endTime,
messages,
startTime,
state,
userPseudoId
FROM google.discoveryengine.conversations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND collectionsId = '{{ collectionsId }}' -- required
AND dataStoresId = '{{ dataStoresId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
;
Lists all Conversations by their parent DataStore.
SELECT
name,
endTime,
messages,
startTime,
state,
userPseudoId
FROM google.discoveryengine.conversations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND collectionsId = '{{ collectionsId }}' -- required
AND enginesId = '{{ enginesId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
;
Lists all Conversations by their parent DataStore.
SELECT
name,
endTime,
messages,
startTime,
state,
userPseudoId
FROM google.discoveryengine.conversations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dataStoresId = '{{ dataStoresId }}' -- required
AND pageSize = '{{ pageSize }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- projects_locations_collections_data_stores_conversations_create
- projects_locations_collections_engines_conversations_create
- projects_locations_data_stores_conversations_create
- Manifest
Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.
INSERT INTO google.discoveryengine.conversations (
data__name,
data__state,
data__messages,
data__userPseudoId,
projectsId,
locationsId,
collectionsId,
dataStoresId
)
SELECT
'{{ name }}',
'{{ state }}',
'{{ messages }}',
'{{ userPseudoId }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ collectionsId }}',
'{{ dataStoresId }}'
RETURNING
name,
endTime,
messages,
startTime,
state,
userPseudoId
;
Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.
INSERT INTO google.discoveryengine.conversations (
data__name,
data__state,
data__messages,
data__userPseudoId,
projectsId,
locationsId,
collectionsId,
enginesId
)
SELECT
'{{ name }}',
'{{ state }}',
'{{ messages }}',
'{{ userPseudoId }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ collectionsId }}',
'{{ enginesId }}'
RETURNING
name,
endTime,
messages,
startTime,
state,
userPseudoId
;
Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.
INSERT INTO google.discoveryengine.conversations (
data__name,
data__state,
data__messages,
data__userPseudoId,
projectsId,
locationsId,
dataStoresId
)
SELECT
'{{ name }}',
'{{ state }}',
'{{ messages }}',
'{{ userPseudoId }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ dataStoresId }}'
RETURNING
name,
endTime,
messages,
startTime,
state,
userPseudoId
;
# Description fields are for documentation purposes
- name: conversations
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the conversations resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the conversations resource.
- name: collectionsId
value: "{{ collectionsId }}"
description: Required parameter for the conversations resource.
- name: dataStoresId
value: "{{ dataStoresId }}"
description: Required parameter for the conversations resource.
- name: enginesId
value: "{{ enginesId }}"
description: Required parameter for the conversations resource.
- name: name
value: "{{ name }}"
description: |
Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`.
- name: state
value: "{{ state }}"
description: |
The state of the Conversation.
valid_values: ['STATE_UNSPECIFIED', 'IN_PROGRESS', 'COMPLETED']
- name: messages
description: |
Conversation messages.
value:
- reply:
summary:
summaryText: "{{ summaryText }}"
summarySkippedReasons:
- "{{ summarySkippedReasons }}"
safetyAttributes:
scores:
- {{ scores }}
categories:
- "{{ categories }}"
summaryWithMetadata:
summary: "{{ summary }}"
citationMetadata:
citations: "{{ citations }}"
references:
- title: "{{ title }}"
document: "{{ document }}"
uri: "{{ uri }}"
chunkContents: "{{ chunkContents }}"
createTime: "{{ createTime }}"
userInput:
input: "{{ input }}"
context:
contextDocuments:
- "{{ contextDocuments }}"
activeDocument: "{{ activeDocument }}"
- name: userPseudoId
value: "{{ userPseudoId }}"
description: |
A unique identifier for tracking users.
UPDATE examples
- projects_locations_collections_data_stores_conversations_patch
- projects_locations_collections_engines_conversations_patch
- projects_locations_data_stores_conversations_patch
Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.
UPDATE google.discoveryengine.conversations
SET
data__name = '{{ name }}',
data__state = '{{ state }}',
data__messages = '{{ messages }}',
data__userPseudoId = '{{ userPseudoId }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND collectionsId = '{{ collectionsId }}' --required
AND dataStoresId = '{{ dataStoresId }}' --required
AND conversationsId = '{{ conversationsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
endTime,
messages,
startTime,
state,
userPseudoId;
Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.
UPDATE google.discoveryengine.conversations
SET
data__name = '{{ name }}',
data__state = '{{ state }}',
data__messages = '{{ messages }}',
data__userPseudoId = '{{ userPseudoId }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND collectionsId = '{{ collectionsId }}' --required
AND enginesId = '{{ enginesId }}' --required
AND conversationsId = '{{ conversationsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
endTime,
messages,
startTime,
state,
userPseudoId;
Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.
UPDATE google.discoveryengine.conversations
SET
data__name = '{{ name }}',
data__state = '{{ state }}',
data__messages = '{{ messages }}',
data__userPseudoId = '{{ userPseudoId }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dataStoresId = '{{ dataStoresId }}' --required
AND conversationsId = '{{ conversationsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
endTime,
messages,
startTime,
state,
userPseudoId;
DELETE examples
- projects_locations_collections_data_stores_conversations_delete
- projects_locations_collections_engines_conversations_delete
- projects_locations_data_stores_conversations_delete
Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.
DELETE FROM google.discoveryengine.conversations
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND collectionsId = '{{ collectionsId }}' --required
AND dataStoresId = '{{ dataStoresId }}' --required
AND conversationsId = '{{ conversationsId }}' --required
;
Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.
DELETE FROM google.discoveryengine.conversations
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND collectionsId = '{{ collectionsId }}' --required
AND enginesId = '{{ enginesId }}' --required
AND conversationsId = '{{ conversationsId }}' --required
;
Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.
DELETE FROM google.discoveryengine.conversations
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dataStoresId = '{{ dataStoresId }}' --required
AND conversationsId = '{{ conversationsId }}' --required
;
Lifecycle Methods
- projects_locations_data_stores_conversations_converse
- projects_locations_collections_data_stores_conversations_converse
- projects_locations_collections_engines_conversations_converse
Converses a conversation.
EXEC google.discoveryengine.conversations.projects_locations_data_stores_conversations_converse
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@dataStoresId='{{ dataStoresId }}' --required,
@conversationsId='{{ conversationsId }}' --required
@@json=
'{
"conversation": "{{ conversation }}",
"boostSpec": "{{ boostSpec }}",
"summarySpec": "{{ summarySpec }}",
"filter": "{{ filter }}",
"servingConfig": "{{ servingConfig }}",
"query": "{{ query }}",
"safeSearch": {{ safeSearch }},
"userLabels": "{{ userLabels }}"
}'
;
Converses a conversation.
EXEC google.discoveryengine.conversations.projects_locations_collections_data_stores_conversations_converse
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@collectionsId='{{ collectionsId }}' --required,
@dataStoresId='{{ dataStoresId }}' --required,
@conversationsId='{{ conversationsId }}' --required
@@json=
'{
"conversation": "{{ conversation }}",
"boostSpec": "{{ boostSpec }}",
"summarySpec": "{{ summarySpec }}",
"filter": "{{ filter }}",
"servingConfig": "{{ servingConfig }}",
"query": "{{ query }}",
"safeSearch": {{ safeSearch }},
"userLabels": "{{ userLabels }}"
}'
;
Converses a conversation.
EXEC google.discoveryengine.conversations.projects_locations_collections_engines_conversations_converse
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@collectionsId='{{ collectionsId }}' --required,
@enginesId='{{ enginesId }}' --required,
@conversationsId='{{ conversationsId }}' --required
@@json=
'{
"conversation": "{{ conversation }}",
"boostSpec": "{{ boostSpec }}",
"summarySpec": "{{ summarySpec }}",
"filter": "{{ filter }}",
"servingConfig": "{{ servingConfig }}",
"query": "{{ query }}",
"safeSearch": {{ safeSearch }},
"userLabels": "{{ userLabels }}"
}'
;