Class Playbook (0.56.0)

public final class Playbook extends GeneratedMessageV3 implements PlaybookOrBuilder

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.

Protobuf type google.cloud.dialogflow.cx.v3beta1.Playbook

Implements

PlaybookOrBuilder

Static Fields

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

GOAL_FIELD_NUMBER

public static final int GOAL_FIELD_NUMBER
Field Value
Type Description
int

INPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER

public static final int INPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER
Field Value
Type Description
int

LLM_MODEL_SETTINGS_FIELD_NUMBER

public static final int LLM_MODEL_SETTINGS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

OUTPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER

public static final int OUTPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER
Field Value
Type Description
int

REFERENCED_FLOWS_FIELD_NUMBER

public static final int REFERENCED_FLOWS_FIELD_NUMBER
Field Value
Type Description
int

REFERENCED_PLAYBOOKS_FIELD_NUMBER

public static final int REFERENCED_PLAYBOOKS_FIELD_NUMBER
Field Value
Type Description
int

REFERENCED_TOOLS_FIELD_NUMBER

public static final int REFERENCED_TOOLS_FIELD_NUMBER
Field Value
Type Description
int

STEPS_FIELD_NUMBER

public static final int STEPS_FIELD_NUMBER
Field Value
Type Description
int

TOKEN_COUNT_FIELD_NUMBER

public static final int TOKEN_COUNT_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Playbook getDefaultInstance()
Returns
Type Description
Playbook

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Playbook.Builder newBuilder()
Returns
Type Description
Playbook.Builder

newBuilder(Playbook prototype)

public static Playbook.Builder newBuilder(Playbook prototype)
Parameter
Name Description
prototype Playbook
Returns
Type Description
Playbook.Builder

parseDelimitedFrom(InputStream input)

public static Playbook parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Playbook
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Playbook parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Playbook
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Playbook parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Playbook
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Playbook parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Playbook
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Playbook parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Playbook
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Playbook parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Playbook
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Playbook parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Playbook
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Playbook parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Playbook
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Playbook parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Playbook
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Playbook parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Playbook
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Playbook parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Playbook
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Playbook parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Playbook
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Playbook> parser()
Returns
Type Description
Parser<Playbook>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCreateTime()

public Timestamp getCreateTime()

Output only. The timestamp of initial playbook creation.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The timestamp of initial playbook creation.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Playbook getDefaultInstanceForType()
Returns
Type Description
Playbook

getDisplayName()

public String getDisplayName()

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

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

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

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getGoal()

public String getGoal()

Required. High level description of the goal the playbook intend to accomplish.

string goal = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The goal.

getGoalBytes()

public ByteString getGoalBytes()

Required. High level description of the goal the playbook intend to accomplish.

string goal = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for goal.

getInputParameterDefinitions(int index)

public ParameterDefinition getInputParameterDefinitions(int index)

Optional. Defined structured input parameters for this playbook.

repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ParameterDefinition

getInputParameterDefinitionsCount()

public int getInputParameterDefinitionsCount()

Optional. Defined structured input parameters for this playbook.

repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getInputParameterDefinitionsList()

public List<ParameterDefinition> getInputParameterDefinitionsList()

Optional. Defined structured input parameters for this playbook.

repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<ParameterDefinition>

getInputParameterDefinitionsOrBuilder(int index)

public ParameterDefinitionOrBuilder getInputParameterDefinitionsOrBuilder(int index)

Optional. Defined structured input parameters for this playbook.

repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ParameterDefinitionOrBuilder

getInputParameterDefinitionsOrBuilderList()

public List<? extends ParameterDefinitionOrBuilder> getInputParameterDefinitionsOrBuilderList()

Optional. Defined structured input parameters for this playbook.

repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder>

getLlmModelSettings()

public LlmModelSettings getLlmModelSettings()

Optional. Llm model settings for the playbook.

.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LlmModelSettings

The llmModelSettings.

getLlmModelSettingsOrBuilder()

public LlmModelSettingsOrBuilder getLlmModelSettingsOrBuilder()

Optional. Llm model settings for the playbook.

.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LlmModelSettingsOrBuilder

getName()

public String getName()

The unique identifier of the playbook. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook ID>.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The unique identifier of the playbook. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook ID>.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getOutputParameterDefinitions(int index)

public ParameterDefinition getOutputParameterDefinitions(int index)

Optional. Defined structured output parameters for this playbook.

repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ParameterDefinition

getOutputParameterDefinitionsCount()

public int getOutputParameterDefinitionsCount()

Optional. Defined structured output parameters for this playbook.

repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getOutputParameterDefinitionsList()

public List<ParameterDefinition> getOutputParameterDefinitionsList()

Optional. Defined structured output parameters for this playbook.

repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<ParameterDefinition>

getOutputParameterDefinitionsOrBuilder(int index)

public ParameterDefinitionOrBuilder getOutputParameterDefinitionsOrBuilder(int index)

Optional. Defined structured output parameters for this playbook.

repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ParameterDefinitionOrBuilder

getOutputParameterDefinitionsOrBuilderList()

public List<? extends ParameterDefinitionOrBuilder> getOutputParameterDefinitionsOrBuilderList()

Optional. Defined structured output parameters for this playbook.

repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder>

getParserForType()

public Parser<Playbook> getParserForType()
Returns
Type Description
Parser<Playbook>
Overrides

getReferencedFlows(int index)

public String getReferencedFlows(int index)

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

repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The referencedFlows at the given index.

getReferencedFlowsBytes(int index)

public ByteString getReferencedFlowsBytes(int index)

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

repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the referencedFlows at the given index.

getReferencedFlowsCount()

public int getReferencedFlowsCount()

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

repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of referencedFlows.

getReferencedFlowsList()

public ProtocolStringList getReferencedFlowsList()

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

repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the referencedFlows.

getReferencedPlaybooks(int index)

public String getReferencedPlaybooks(int index)

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

repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The referencedPlaybooks at the given index.

getReferencedPlaybooksBytes(int index)

public ByteString getReferencedPlaybooksBytes(int index)

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

repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the referencedPlaybooks at the given index.

getReferencedPlaybooksCount()

public int getReferencedPlaybooksCount()

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

repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of referencedPlaybooks.

getReferencedPlaybooksList()

public ProtocolStringList getReferencedPlaybooksList()

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

repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the referencedPlaybooks.

getReferencedTools(int index)

public String getReferencedTools(int index)

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.

repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The referencedTools at the given index.

getReferencedToolsBytes(int index)

public ByteString getReferencedToolsBytes(int index)

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.

repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the referencedTools at the given index.

getReferencedToolsCount()

public int getReferencedToolsCount()

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.

repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of referencedTools.

getReferencedToolsList()

public ProtocolStringList getReferencedToolsList()

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.

repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the referencedTools.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSteps(int index)

public Playbook.Step getSteps(int index)

Ordered list of step by step execution instructions to accomplish target goal.

repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4;

Parameter
Name Description
index int
Returns
Type Description
Playbook.Step

getStepsCount()

public int getStepsCount()

Ordered list of step by step execution instructions to accomplish target goal.

repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4;

Returns
Type Description
int

getStepsList()

public List<Playbook.Step> getStepsList()

Ordered list of step by step execution instructions to accomplish target goal.

repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4;

Returns
Type Description
List<Step>

getStepsOrBuilder(int index)

public Playbook.StepOrBuilder getStepsOrBuilder(int index)

Ordered list of step by step execution instructions to accomplish target goal.

repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4;

Parameter
Name Description
index int
Returns
Type Description
Playbook.StepOrBuilder

getStepsOrBuilderList()

public List<? extends Playbook.StepOrBuilder> getStepsOrBuilderList()

Ordered list of step by step execution instructions to accomplish target goal.

repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4;

Returns
Type Description
List<? extends com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder>

getTokenCount()

public long getTokenCount()

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

int64 token_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The tokenCount.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Last time the playbook version was updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Last time the playbook version was updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. The timestamp of initial playbook creation.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasLlmModelSettings()

public boolean hasLlmModelSettings()

Optional. Llm model settings for the playbook.

.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the llmModelSettings field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Last time the playbook version was updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Playbook.Builder newBuilderForType()
Returns
Type Description
Playbook.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Playbook.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Playbook.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Playbook.Builder toBuilder()
Returns
Type Description
Playbook.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException