Class Playbook (0.52.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
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

GOAL_FIELD_NUMBER

public static final int GOAL_FIELD_NUMBER
Field Value
TypeDescription
int

INPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER

public static final int INPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER
Field Value
TypeDescription
int

LLM_MODEL_SETTINGS_FIELD_NUMBER

public static final int LLM_MODEL_SETTINGS_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

OUTPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER

public static final int OUTPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER
Field Value
TypeDescription
int

REFERENCED_FLOWS_FIELD_NUMBER

public static final int REFERENCED_FLOWS_FIELD_NUMBER
Field Value
TypeDescription
int

REFERENCED_PLAYBOOKS_FIELD_NUMBER

public static final int REFERENCED_PLAYBOOKS_FIELD_NUMBER
Field Value
TypeDescription
int

REFERENCED_TOOLS_FIELD_NUMBER

public static final int REFERENCED_TOOLS_FIELD_NUMBER
Field Value
TypeDescription
int

STEPS_FIELD_NUMBER

public static final int STEPS_FIELD_NUMBER
Field Value
TypeDescription
int

TOKEN_COUNT_FIELD_NUMBER

public static final int TOKEN_COUNT_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Playbook getDefaultInstance()
Returns
TypeDescription
Playbook

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Playbook.Builder newBuilder()
Returns
TypeDescription
Playbook.Builder

newBuilder(Playbook prototype)

public static Playbook.Builder newBuilder(Playbook prototype)
Parameter
NameDescription
prototypePlaybook
Returns
TypeDescription
Playbook.Builder

parseDelimitedFrom(InputStream input)

public static Playbook parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Playbook
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Playbook parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Playbook
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Playbook parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Playbook
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Playbook parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Playbook
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Playbook parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Playbook
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Playbook parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Playbook
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Playbook parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Playbook
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Playbook parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Playbook
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Playbook parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Playbook
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Playbook parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Playbook
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Playbook parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Playbook
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Playbook parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Playbook
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Playbook> parser()
Returns
TypeDescription
Parser<Playbook>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Playbook getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder>

getParserForType()

public Parser<Playbook> getParserForType()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the referencedTools.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Playbook.Builder newBuilderForType()
Returns
TypeDescription
Playbook.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Playbook.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Playbook.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Playbook.Builder toBuilder()
Returns
TypeDescription
Playbook.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException