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_collections_data_stores_conversations_list
- projects_locations_collections_engines_conversations_list
- projects_locations_data_stores_conversations_get
- projects_locations_data_stores_conversations_list
Successful response
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. |
userPseudoId | string | A unique identifier for tracking users. |
Successful response
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. |
userPseudoId | string | A unique identifier for tracking users. |
Successful response
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. |
userPseudoId | string | A unique identifier for tracking users. |
Successful response
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. |
userPseudoId | string | A unique identifier for tracking users. |
Successful response
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. |
userPseudoId | string | A unique identifier for tracking users. |
Successful response
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. |
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_collections_data_stores_conversations_list
- projects_locations_collections_engines_conversations_list
- projects_locations_data_stores_conversations_get
- 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;
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
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 dataStoresId = '{{ dataStoresId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
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__userPseudoId,
data__messages,
projectsId,
locationsId,
collectionsId,
dataStoresId
)
SELECT
'{{ name }}',
'{{ state }}',
'{{ userPseudoId }}',
'{{ messages }}',
'{{ 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__userPseudoId,
data__messages,
projectsId,
locationsId,
collectionsId,
enginesId
)
SELECT
'{{ name }}',
'{{ state }}',
'{{ userPseudoId }}',
'{{ messages }}',
'{{ 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__userPseudoId,
data__messages,
projectsId,
locationsId,
dataStoresId
)
SELECT
'{{ name }}',
'{{ state }}',
'{{ userPseudoId }}',
'{{ messages }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ dataStoresId }}'
RETURNING
name,
endTime,
messages,
startTime,
state,
userPseudoId
;
# Description fields are for documentation purposes
- name: conversations
props:
- name: projectsId
value: string
description: Required parameter for the conversations resource.
- name: locationsId
value: string
description: Required parameter for the conversations resource.
- name: collectionsId
value: string
description: Required parameter for the conversations resource.
- name: dataStoresId
value: string
description: Required parameter for the conversations resource.
- name: enginesId
value: string
description: Required parameter for the conversations resource.
- name: name
value: string
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: string
description: >
The state of the Conversation.
valid_values: ['STATE_UNSPECIFIED', 'IN_PROGRESS', 'COMPLETED']
- name: userPseudoId
value: string
description: >
A unique identifier for tracking users.
- name: messages
value: array
description: >
Conversation messages.
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__userPseudoId = '{{ userPseudoId }}',
data__messages = '{{ messages }}'
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__userPseudoId = '{{ userPseudoId }}',
data__messages = '{{ messages }}'
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__userPseudoId = '{{ userPseudoId }}',
data__messages = '{{ messages }}'
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_collections_data_stores_conversations_converse
- projects_locations_collections_engines_conversations_converse
- projects_locations_data_stores_conversations_converse
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=
'{
"query": "{{ query }}",
"servingConfig": "{{ servingConfig }}",
"conversation": "{{ conversation }}",
"safeSearch": {{ safeSearch }},
"userLabels": "{{ userLabels }}",
"summarySpec": "{{ summarySpec }}",
"filter": "{{ filter }}",
"boostSpec": "{{ boostSpec }}"
}';
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=
'{
"query": "{{ query }}",
"servingConfig": "{{ servingConfig }}",
"conversation": "{{ conversation }}",
"safeSearch": {{ safeSearch }},
"userLabels": "{{ userLabels }}",
"summarySpec": "{{ summarySpec }}",
"filter": "{{ filter }}",
"boostSpec": "{{ boostSpec }}"
}';
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=
'{
"query": "{{ query }}",
"servingConfig": "{{ servingConfig }}",
"conversation": "{{ conversation }}",
"safeSearch": {{ safeSearch }},
"userLabels": "{{ userLabels }}",
"summarySpec": "{{ summarySpec }}",
"filter": "{{ filter }}",
"boostSpec": "{{ boostSpec }}"
}';