Skip to main content

generators

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

Overview

Namegenerators
TypeResource
Idgoogle.dialogflow.generators

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe unique identifier of the generator. Must be set for the Generators.UpdateGenerator method. Generators.CreateGenerate populates the name automatically. Format: projects//locations//agents//generators/.
displayNamestringRequired. The human-readable name of the generator, unique within the agent. The prompt contains pre-defined parameters such as $conversation, $last-user-utterance, etc. populated by Dialogflow. It can also contain custom placeholders which will be resolved during fulfillment.
llmModelSettingsobjectThe LLM model settings. (id: GoogleCloudDialogflowCxV3LlmModelSettings)
modelParameterobjectParameters passed to the LLM to configure its behavior. (id: GoogleCloudDialogflowCxV3GeneratorModelParameter)
placeholdersarrayOptional. List of custom placeholders in the prompt text.
promptTextobjectRequired. Prompt for the LLM model. (id: GoogleCloudDialogflowCxV3Phrase)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_agents_generators_getselectprojectsId, locationsId, agentsId, generatorsIdlanguageCodeRetrieves the specified generator.
projects_locations_agents_generators_listselectprojectsId, locationsId, agentsIdlanguageCode, pageSize, pageTokenReturns the list of all generators in the specified agent.
projects_locations_agents_generators_createinsertprojectsId, locationsId, agentsIdlanguageCodeCreates a generator in the specified agent.
projects_locations_agents_generators_patchupdateprojectsId, locationsId, agentsId, generatorsIdlanguageCode, updateMaskUpdate the specified generator.
projects_locations_agents_generators_deletedeleteprojectsId, locationsId, agentsId, generatorsIdforceDeletes the specified generators.

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.

NameDatatypeDescription
agentsIdstring
generatorsIdstring
locationsIdstring
projectsIdstring
forceboolean
languageCodestring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieves the specified generator.

SELECT
name,
displayName,
llmModelSettings,
modelParameter,
placeholders,
promptText
FROM google.dialogflow.generators
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND generatorsId = '{{ generatorsId }}' -- required
AND languageCode = '{{ languageCode }}';

INSERT examples

Creates a generator in the specified agent.

INSERT INTO google.dialogflow.generators (
data__name,
data__displayName,
data__promptText,
data__placeholders,
data__llmModelSettings,
data__modelParameter,
projectsId,
locationsId,
agentsId,
languageCode
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ promptText }}',
'{{ placeholders }}',
'{{ llmModelSettings }}',
'{{ modelParameter }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ agentsId }}',
'{{ languageCode }}'
RETURNING
name,
displayName,
llmModelSettings,
modelParameter,
placeholders,
promptText
;

UPDATE examples

Update the specified generator.

UPDATE google.dialogflow.generators
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__promptText = '{{ promptText }}',
data__placeholders = '{{ placeholders }}',
data__llmModelSettings = '{{ llmModelSettings }}',
data__modelParameter = '{{ modelParameter }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND generatorsId = '{{ generatorsId }}' --required
AND languageCode = '{{ languageCode}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
displayName,
llmModelSettings,
modelParameter,
placeholders,
promptText;

DELETE examples

Deletes the specified generators.

DELETE FROM google.dialogflow.generators
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND generatorsId = '{{ generatorsId }}' --required
AND force = '{{ force }}';