Skip to main content

conversations

Creates, updates, deletes, gets or lists a conversations resource.

Overview

Nameconversations
TypeResource
Idgoogle.discoveryengine.conversations

Fields

NameDatatypeDescription
namestringImmutable. Fully qualified name projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/* or projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*.
endTimestringOutput only. The time the conversation finished.
messagesarrayConversation messages.
startTimestringOutput only. The time the conversation started.
statestringThe state of the Conversation.
userPseudoIdstringA unique identifier for tracking users.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_collections_data_stores_conversations_getSELECTcollectionsId, conversationsId, dataStoresId, locationsId, projectsIdGets a Conversation.
projects_locations_collections_data_stores_conversations_listSELECTcollectionsId, dataStoresId, locationsId, projectsIdLists all Conversations by their parent DataStore.
projects_locations_collections_engines_conversations_getSELECTcollectionsId, conversationsId, enginesId, locationsId, projectsIdGets a Conversation.
projects_locations_collections_engines_conversations_listSELECTcollectionsId, enginesId, locationsId, projectsIdLists all Conversations by their parent DataStore.
projects_locations_data_stores_conversations_getSELECTconversationsId, dataStoresId, locationsId, projectsIdGets a Conversation.
projects_locations_data_stores_conversations_listSELECTdataStoresId, locationsId, projectsIdLists all Conversations by their parent DataStore.
projects_locations_collections_data_stores_conversations_createINSERTcollectionsId, dataStoresId, locationsId, projectsIdCreates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.
projects_locations_collections_engines_conversations_createINSERTcollectionsId, enginesId, locationsId, projectsIdCreates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.
projects_locations_data_stores_conversations_createINSERTdataStoresId, locationsId, projectsIdCreates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.
projects_locations_collections_data_stores_conversations_deleteDELETEcollectionsId, conversationsId, dataStoresId, locationsId, projectsIdDeletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.
projects_locations_collections_engines_conversations_deleteDELETEcollectionsId, conversationsId, enginesId, locationsId, projectsIdDeletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.
projects_locations_data_stores_conversations_deleteDELETEconversationsId, dataStoresId, locationsId, projectsIdDeletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.
projects_locations_collections_data_stores_conversations_patchUPDATEcollectionsId, conversationsId, dataStoresId, locationsId, projectsIdUpdates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.
projects_locations_collections_engines_conversations_patchUPDATEcollectionsId, conversationsId, enginesId, locationsId, projectsIdUpdates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.
projects_locations_data_stores_conversations_patchUPDATEconversationsId, dataStoresId, locationsId, projectsIdUpdates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.
projects_locations_collections_data_stores_conversations_converseEXECcollectionsId, conversationsId, dataStoresId, locationsId, projectsIdConverses a conversation.
projects_locations_collections_engines_conversations_converseEXECcollectionsId, conversationsId, enginesId, locationsId, projectsIdConverses a conversation.
projects_locations_data_stores_conversations_converseEXECconversationsId, dataStoresId, locationsId, projectsIdConverses a conversation.

SELECT examples

Lists all Conversations by their parent DataStore.

SELECT
name,
endTime,
messages,
startTime,
state,
userPseudoId
FROM google.discoveryengine.conversations
WHERE dataStoresId = '{{ dataStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new conversations resource.

/*+ create */
INSERT INTO google.discoveryengine.conversations (
dataStoresId,
locationsId,
projectsId,
name,
state,
userPseudoId,
messages
)
SELECT
'{{ dataStoresId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ state }}',
'{{ userPseudoId }}',
'{{ messages }}'
;

UPDATE example

Updates a conversations resource.

/*+ update */
UPDATE google.discoveryengine.conversations
SET
name = '{{ name }}',
state = '{{ state }}',
userPseudoId = '{{ userPseudoId }}',
messages = '{{ messages }}'
WHERE
conversationsId = '{{ conversationsId }}'
AND dataStoresId = '{{ dataStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified conversations resource.

/*+ delete */
DELETE FROM google.discoveryengine.conversations
WHERE conversationsId = '{{ conversationsId }}'
AND dataStoresId = '{{ dataStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';