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
Successful response
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) |
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_patch | update | projectsId , locationsId , collectionsId , enginesId , assistantsId | updateMask | Updates 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 | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_collections_engines_assistants_get
Gets an Assistant.
SELECT
name,
customerPolicy,
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;
UPDATE
examples
- projects_locations_collections_engines_assistants_patch
Updates an Assistant
UPDATE google.discoveryengine.assistants
SET
data__name = '{{ name }}',
data__generationConfig = '{{ generationConfig }}',
data__webGroundingType = '{{ webGroundingType }}',
data__enabledTools = '{{ enabledTools }}',
data__customerPolicy = '{{ customerPolicy }}'
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,
enabledTools,
generationConfig,
webGroundingType;
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=
'{
"query": "{{ query }}",
"session": "{{ session }}",
"userMetadata": "{{ userMetadata }}",
"toolsSpec": "{{ toolsSpec }}",
"generationSpec": "{{ generationSpec }}"
}';