Class: Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3Playbook

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v3/classes.rb,
lib/google/apis/dialogflow_v3/representations.rb,
lib/google/apis/dialogflow_v3/representations.rb

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowCxV3Playbook

Returns a new instance of GoogleCloudDialogflowCxV3Playbook.



6713
6714
6715
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6713

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#code_blockGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3CodeBlock

Represents a code block. Corresponds to the JSON property codeBlock



6619
6620
6621
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6619

def code_block
  @code_block
end

#create_timeString

Output only. The timestamp of initial playbook creation. Corresponds to the JSON property createTime

Returns:

  • (String)


6624
6625
6626
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6624

def create_time
  @create_time
end

#display_nameString

Required. The human-readable name of the playbook, unique within an agent. Corresponds to the JSON property displayName

Returns:

  • (String)


6629
6630
6631
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6629

def display_name
  @display_name
end

#goalString

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. Corresponds to the JSON property goal

Returns:

  • (String)


6636
6637
6638
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6636

def goal
  @goal
end

#handlersArray<Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3Handler>

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



6642
6643
6644
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6642

def handlers
  @handlers
end

#inline_actionsArray<String>

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. Corresponds to the JSON property inlineActions

Returns:

  • (Array<String>)


6650
6651
6652
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6650

def inline_actions
  @inline_actions
end

#input_parameter_definitionsArray<Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3ParameterDefinition>

Optional. Defined structured input parameters for this playbook. Corresponds to the JSON property inputParameterDefinitions



6655
6656
6657
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6655

def input_parameter_definitions
  @input_parameter_definitions
end

#instructionGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3PlaybookInstruction

Message of the Instruction of the playbook. Corresponds to the JSON property instruction



6660
6661
6662
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6660

def instruction
  @instruction
end

#llm_model_settingsGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3LlmModelSettings

Settings for LLM models. Corresponds to the JSON property llmModelSettings



6665
6666
6667
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6665

def llm_model_settings
  @llm_model_settings
end

#nameString

The unique identifier of the playbook. Format: projects//locations//agents// playbooks/. Corresponds to the JSON property name

Returns:

  • (String)


6671
6672
6673
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6671

def name
  @name
end

#output_parameter_definitionsArray<Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3ParameterDefinition>

Optional. Defined structured output parameters for this playbook. Corresponds to the JSON property outputParameterDefinitions



6676
6677
6678
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6676

def output_parameter_definitions
  @output_parameter_definitions
end

#playbook_typeString

Optional. Type of the playbook. Corresponds to the JSON property playbookType

Returns:

  • (String)


6681
6682
6683
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6681

def playbook_type
  @playbook_type
end

#referenced_flowsArray<String>

Output only. The resource name of flows referenced by the current playbook in the instructions. Corresponds to the JSON property referencedFlows

Returns:

  • (Array<String>)


6687
6688
6689
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6687

def referenced_flows
  @referenced_flows
end

#referenced_playbooksArray<String>

Output only. The resource name of other playbooks referenced by the current playbook in the instructions. Corresponds to the JSON property referencedPlaybooks

Returns:

  • (Array<String>)


6693
6694
6695
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6693

def referenced_playbooks
  @referenced_playbooks
end

#referenced_toolsArray<String>

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. Corresponds to the JSON property referencedTools

Returns:

  • (Array<String>)


6700
6701
6702
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6700

def referenced_tools
  @referenced_tools
end

#token_countFixnum

Output only. Estimated number of tokes current playbook takes when sent to the LLM. Corresponds to the JSON property tokenCount

Returns:

  • (Fixnum)


6706
6707
6708
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6706

def token_count
  @token_count
end

#update_timeString

Output only. Last time the playbook version was updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


6711
6712
6713
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6711

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 6718

def update!(**args)
  @code_block = args[:code_block] if args.key?(:code_block)
  @create_time = args[:create_time] if args.key?(:create_time)
  @display_name = args[:display_name] if args.key?(:display_name)
  @goal = args[:goal] if args.key?(:goal)
  @handlers = args[:handlers] if args.key?(:handlers)
  @inline_actions = args[:inline_actions] if args.key?(:inline_actions)
  @input_parameter_definitions = args[:input_parameter_definitions] if args.key?(:input_parameter_definitions)
  @instruction = args[:instruction] if args.key?(:instruction)
  @llm_model_settings = args[:llm_model_settings] if args.key?(:llm_model_settings)
  @name = args[:name] if args.key?(:name)
  @output_parameter_definitions = args[:output_parameter_definitions] if args.key?(:output_parameter_definitions)
  @playbook_type = args[:playbook_type] if args.key?(:playbook_type)
  @referenced_flows = args[:referenced_flows] if args.key?(:referenced_flows)
  @referenced_playbooks = args[:referenced_playbooks] if args.key?(:referenced_playbooks)
  @referenced_tools = args[:referenced_tools] if args.key?(:referenced_tools)
  @token_count = args[:token_count] if args.key?(:token_count)
  @update_time = args[:update_time] if args.key?(:update_time)
end