Google Cloud Dialogflow Cx V3 Client - Class Playbook (0.10.1)

Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class Playbook.

Playbook is the basic building block to instruct the LLM how to execute a certain task.

A playbook consists of a goal to accomplish, an optional list of step by step instructions (the step instruction may refers to name of the custom or default plugin tools to use) to perform the task, a list of contextual input data to be passed in at the beginning of the invoked, and a list of output parameters to store the playbook result.

Generated from protobuf message google.cloud.dialogflow.cx.v3.Playbook

Namespace

Google \ Cloud \ Dialogflow \ Cx \ V3

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

The unique identifier of the playbook. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>.

↳ display_name string

Required. The human-readable name of the playbook, unique within an agent.

↳ goal string

Required. High level description of the goal the playbook intend to accomplish. A goal should be concise since it's visible to other playbooks that may reference this playbook.

↳ input_parameter_definitions array<ParameterDefinition>

Optional. Defined structured input parameters for this playbook.

↳ output_parameter_definitions array<ParameterDefinition>

Optional. Defined structured output parameters for this playbook.

↳ instruction Playbook\Instruction

Instruction to accomplish target goal.

↳ token_count int|string

Output only. Estimated number of tokes current playbook takes when sent to the LLM.

↳ create_time Google\Protobuf\Timestamp

Output only. The timestamp of initial playbook creation.

↳ update_time Google\Protobuf\Timestamp

Output only. Last time the playbook version was updated.

↳ referenced_playbooks array

Output only. The resource name of other playbooks referenced by the current playbook in the instructions.

↳ referenced_flows array

Output only. The resource name of flows referenced by the current playbook in the instructions.

↳ referenced_tools array

Optional. The resource name of tools referenced by the current playbook in the instructions. If not provided explicitly, they are will be implied using the tool being referenced in goal and steps.

↳ inline_actions array

Optional. Output only. Names of inline actions scoped to this playbook. These actions are in addition to those belonging to referenced tools, child playbooks, and flows, e.g. actions that are defined in the playbook's code block.

↳ code_block CodeBlock

Optional. The playbook's scoped code block, which may implement handlers and actions.

↳ llm_model_settings LlmModelSettings

Optional. Llm model settings for the playbook.

↳ handlers array<Handler>

Optional. A list of registered handlers to execuate based on the specified triggers.

↳ playbook_type int

Optional. Type of the playbook.

getName

The unique identifier of the playbook.

Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>.

Returns
Type Description
string

setName

The unique identifier of the playbook.

Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>.

Parameter
Name Description
var string
Returns
Type Description
$this

getDisplayName

Required. The human-readable name of the playbook, unique within an agent.

Returns
Type Description
string

setDisplayName

Required. The human-readable name of the playbook, unique within an agent.

Parameter
Name Description
var string
Returns
Type Description
$this

getGoal

Required. High level description of the goal the playbook intend to accomplish. A goal should be concise since it's visible to other playbooks that may reference this playbook.

Returns
Type Description
string

setGoal

Required. High level description of the goal the playbook intend to accomplish. A goal should be concise since it's visible to other playbooks that may reference this playbook.

Parameter
Name Description
var string
Returns
Type Description
$this

getInputParameterDefinitions

Optional. Defined structured input parameters for this playbook.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setInputParameterDefinitions

Optional. Defined structured input parameters for this playbook.

Parameter
Name Description
var array<ParameterDefinition>
Returns
Type Description
$this

getOutputParameterDefinitions

Optional. Defined structured output parameters for this playbook.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setOutputParameterDefinitions

Optional. Defined structured output parameters for this playbook.

Parameter
Name Description
var array<ParameterDefinition>
Returns
Type Description
$this

getInstruction

Instruction to accomplish target goal.

Returns
Type Description
Playbook\Instruction|null

hasInstruction

clearInstruction

setInstruction

Instruction to accomplish target goal.

Parameter
Name Description
var Playbook\Instruction
Returns
Type Description
$this

getTokenCount

Output only. Estimated number of tokes current playbook takes when sent to the LLM.

Returns
Type Description
int|string

setTokenCount

Output only. Estimated number of tokes current playbook takes when sent to the LLM.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getCreateTime

Output only. The timestamp of initial playbook creation.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The timestamp of initial playbook creation.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getUpdateTime

Output only. Last time the playbook version was updated.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. Last time the playbook version was updated.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getReferencedPlaybooks

Output only. The resource name of other playbooks referenced by the current playbook in the instructions.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setReferencedPlaybooks

Output only. The resource name of other playbooks referenced by the current playbook in the instructions.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getReferencedFlows

Output only. The resource name of flows referenced by the current playbook in the instructions.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setReferencedFlows

Output only. The resource name of flows referenced by the current playbook in the instructions.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getReferencedTools

Optional. The resource name of tools referenced by the current playbook in the instructions. If not provided explicitly, they are will be implied using the tool being referenced in goal and steps.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setReferencedTools

Optional. The resource name of tools referenced by the current playbook in the instructions. If not provided explicitly, they are will be implied using the tool being referenced in goal and steps.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getInlineActions

Optional. Output only. Names of inline actions scoped to this playbook.

These actions are in addition to those belonging to referenced tools, child playbooks, and flows, e.g. actions that are defined in the playbook's code block.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setInlineActions

Optional. Output only. Names of inline actions scoped to this playbook.

These actions are in addition to those belonging to referenced tools, child playbooks, and flows, e.g. actions that are defined in the playbook's code block.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getCodeBlock

Optional. The playbook's scoped code block, which may implement handlers and actions.

Returns
Type Description
CodeBlock|null

hasCodeBlock

clearCodeBlock

setCodeBlock

Optional. The playbook's scoped code block, which may implement handlers and actions.

Parameter
Name Description
var CodeBlock
Returns
Type Description
$this

getLlmModelSettings

Optional. Llm model settings for the playbook.

Returns
Type Description
LlmModelSettings|null

hasLlmModelSettings

clearLlmModelSettings

setLlmModelSettings

Optional. Llm model settings for the playbook.

Parameter
Name Description
var LlmModelSettings
Returns
Type Description
$this

getHandlers

Optional. A list of registered handlers to execuate based on the specified triggers.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setHandlers

Optional. A list of registered handlers to execuate based on the specified triggers.

Parameter
Name Description
var array<Handler>
Returns
Type Description
$this

getPlaybookType

Optional. Type of the playbook.

Returns
Type Description
int Enum of type PlaybookType.

setPlaybookType

Optional. Type of the playbook.

Parameter
Name Description
var int

Enum of type PlaybookType.

Returns
Type Description
$this