assistants
Creates, updates, deletes, gets or lists an assistants resource.
Overview
| Name | assistants |
| Type | Resource |
| Id | google.discoveryengine.assistants |
Fields
The following fields are returned by SELECT queries:
- projects_locations_collections_engines_assistants_get
- projects_locations_collections_engines_assistants_list
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Resource name of the assistant. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant} It must be a UTF-8 encoded string with a length limit of 1024 characters. |
customerPolicy | object | Optional. Customer policy for the assistant. (id: GoogleCloudDiscoveryengineV1AssistantCustomerPolicy) |
description | string | Optional. Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant. |
displayName | string | Required. The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters. |
enabledTools | object | Optional. Note: not implemented yet. Use enabled_actions instead. The enabled tools on this assistant. The keys are connector name, for example "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2, "transferTicket")], "gmail1ConnectorName": [(toolId3, "sendEmail"),..] } |
generationConfig | object | Optional. Configuration for the generation of the assistant response. (id: GoogleCloudDiscoveryengineV1AssistantGenerationConfig) |
webGroundingType | string | Optional. The type of web grounding to use. |
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Resource name of the assistant. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant} It must be a UTF-8 encoded string with a length limit of 1024 characters. |
customerPolicy | object | Optional. Customer policy for the assistant. (id: GoogleCloudDiscoveryengineV1AssistantCustomerPolicy) |
description | string | Optional. Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant. |
displayName | string | Required. The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters. |
enabledTools | object | Optional. Note: not implemented yet. Use enabled_actions instead. The enabled tools on this assistant. The keys are connector name, for example "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2, "transferTicket")], "gmail1ConnectorName": [(toolId3, "sendEmail"),..] } |
generationConfig | object | Optional. Configuration for the generation of the assistant response. (id: GoogleCloudDiscoveryengineV1AssistantGenerationConfig) |
webGroundingType | string | Optional. The type of web grounding to use. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
projects_locations_collections_engines_assistants_get | select | projectsId, locationsId, collectionsId, enginesId, assistantsId | Gets an Assistant. | |
projects_locations_collections_engines_assistants_list | select | projectsId, locationsId, collectionsId, enginesId | pageSize, pageToken | Lists all Assistants under an Engine. |
projects_locations_collections_engines_assistants_create | insert | projectsId, locationsId, collectionsId, enginesId | assistantId | Creates an Assistant. |
projects_locations_collections_engines_assistants_patch | update | projectsId, locationsId, collectionsId, enginesId, assistantsId | updateMask | Updates an Assistant |
projects_locations_collections_engines_assistants_delete | delete | projectsId, locationsId, collectionsId, enginesId, assistantsId | Deletes an Assistant. | |
projects_locations_collections_engines_assistants_stream_assist | exec | projectsId, locationsId, collectionsId, enginesId, assistantsId | Assists the user with a query in a streaming fashion. |
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 |
|---|---|---|
assistantsId | string | |
collectionsId | string | |
enginesId | string | |
locationsId | string | |
projectsId | string | |
assistantId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- projects_locations_collections_engines_assistants_get
- projects_locations_collections_engines_assistants_list
Gets an Assistant.
SELECT
name,
customerPolicy,
description,
displayName,
enabledTools,
generationConfig,
webGroundingType
FROM google.discoveryengine.assistants
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND collectionsId = '{{ collectionsId }}' -- required
AND enginesId = '{{ enginesId }}' -- required
AND assistantsId = '{{ assistantsId }}' -- required
;
Lists all Assistants under an Engine.
SELECT
name,
customerPolicy,
description,
displayName,
enabledTools,
generationConfig,
webGroundingType
FROM google.discoveryengine.assistants
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND collectionsId = '{{ collectionsId }}' -- required
AND enginesId = '{{ enginesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- projects_locations_collections_engines_assistants_create
- Manifest
Creates an Assistant.
INSERT INTO google.discoveryengine.assistants (
data__enabledTools,
data__description,
data__name,
data__webGroundingType,
data__customerPolicy,
data__generationConfig,
data__displayName,
projectsId,
locationsId,
collectionsId,
enginesId,
assistantId
)
SELECT
'{{ enabledTools }}',
'{{ description }}',
'{{ name }}',
'{{ webGroundingType }}',
'{{ customerPolicy }}',
'{{ generationConfig }}',
'{{ displayName }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ collectionsId }}',
'{{ enginesId }}',
'{{ assistantId }}'
RETURNING
name,
customerPolicy,
description,
displayName,
enabledTools,
generationConfig,
webGroundingType
;
# Description fields are for documentation purposes
- name: assistants
props:
- name: projectsId
value: string
description: Required parameter for the assistants resource.
- name: locationsId
value: string
description: Required parameter for the assistants resource.
- name: collectionsId
value: string
description: Required parameter for the assistants resource.
- name: enginesId
value: string
description: Required parameter for the assistants resource.
- name: enabledTools
value: object
description: >
Optional. Note: not implemented yet. Use enabled_actions instead. The enabled tools on this assistant. The keys are connector name, for example "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2, "transferTicket")], "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
- name: description
value: string
description: >
Optional. Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
- name: name
value: string
description: >
Immutable. Resource name of the assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` It must be a UTF-8 encoded string with a length limit of 1024 characters.
- name: webGroundingType
value: string
description: >
Optional. The type of web grounding to use.
valid_values: ['WEB_GROUNDING_TYPE_UNSPECIFIED', 'WEB_GROUNDING_TYPE_DISABLED', 'WEB_GROUNDING_TYPE_GOOGLE_SEARCH', 'WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH']
- name: customerPolicy
value: object
description: >
Optional. Customer policy for the assistant.
- name: generationConfig
value: object
description: >
Optional. Configuration for the generation of the assistant response.
- name: displayName
value: string
description: >
Required. The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
- name: assistantId
value: string
UPDATE examples
- projects_locations_collections_engines_assistants_patch
Updates an Assistant
UPDATE google.discoveryengine.assistants
SET
data__enabledTools = '{{ enabledTools }}',
data__description = '{{ description }}',
data__name = '{{ name }}',
data__webGroundingType = '{{ webGroundingType }}',
data__customerPolicy = '{{ customerPolicy }}',
data__generationConfig = '{{ generationConfig }}',
data__displayName = '{{ displayName }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND collectionsId = '{{ collectionsId }}' --required
AND enginesId = '{{ enginesId }}' --required
AND assistantsId = '{{ assistantsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
customerPolicy,
description,
displayName,
enabledTools,
generationConfig,
webGroundingType;
DELETE examples
- projects_locations_collections_engines_assistants_delete
Deletes an Assistant.
DELETE FROM google.discoveryengine.assistants
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND collectionsId = '{{ collectionsId }}' --required
AND enginesId = '{{ enginesId }}' --required
AND assistantsId = '{{ assistantsId }}' --required
;
Lifecycle Methods
- projects_locations_collections_engines_assistants_stream_assist
Assists the user with a query in a streaming fashion.
EXEC google.discoveryengine.assistants.projects_locations_collections_engines_assistants_stream_assist
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@collectionsId='{{ collectionsId }}' --required,
@enginesId='{{ enginesId }}' --required,
@assistantsId='{{ assistantsId }}' --required
@@json=
'{
"session": "{{ session }}",
"toolsSpec": "{{ toolsSpec }}",
"generationSpec": "{{ generationSpec }}",
"query": "{{ query }}",
"userMetadata": "{{ userMetadata }}"
}'
;