Class: Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3Example

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

Example represents a sample execution of the playbook in the conversation. An example consists of a list of ordered actions performed by end user or Dialogflow agent according the playbook instructions to fulfill the task.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowCxV3Example

Returns a new instance of GoogleCloudDialogflowCxV3Example.



2492
2493
2494
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 2492

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

Instance Attribute Details

#actionsArray<Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3Action>

Required. The ordered list of actions performed by the end user and the Dialogflow agent. Corresponds to the JSON property actions



2434
2435
2436
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 2434

def actions
  @actions
end

#conversation_stateString

Required. Example's output state. Corresponds to the JSON property conversationState

Returns:

  • (String)


2439
2440
2441
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 2439

def conversation_state
  @conversation_state
end

#create_timeString

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

Returns:

  • (String)


2444
2445
2446
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 2444

def create_time
  @create_time
end

#descriptionString

Optional. The high level concise description of the example. The max number of characters is 200. Corresponds to the JSON property description

Returns:

  • (String)


2450
2451
2452
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 2450

def description
  @description
end

#display_nameString

Required. The display name of the example. Corresponds to the JSON property displayName

Returns:

  • (String)


2455
2456
2457
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 2455

def display_name
  @display_name
end

#language_codeString

Optional. The language code of the example. If not specified, the agent's default language is used. Note: languages must be enabled in the agent before they can be used. Note: example's language code is not currently used in dialogflow agents. Corresponds to the JSON property languageCode

Returns:

  • (String)


2463
2464
2465
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 2463

def language_code
  @language_code
end

#nameString

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

Returns:

  • (String)


2469
2470
2471
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 2469

def name
  @name
end

#playbook_inputGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3PlaybookInput

Input of the playbook. Corresponds to the JSON property playbookInput



2474
2475
2476
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 2474

def playbook_input
  @playbook_input
end

#playbook_outputGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3PlaybookOutput

Output of the playbook. Corresponds to the JSON property playbookOutput



2479
2480
2481
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 2479

def playbook_output
  @playbook_output
end

#token_countFixnum

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

Returns:

  • (Fixnum)


2485
2486
2487
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 2485

def token_count
  @token_count
end

#update_timeString

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

Returns:

  • (String)


2490
2491
2492
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 2490

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 2497

def update!(**args)
  @actions = args[:actions] if args.key?(:actions)
  @conversation_state = args[:conversation_state] if args.key?(:conversation_state)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @display_name = args[:display_name] if args.key?(:display_name)
  @language_code = args[:language_code] if args.key?(:language_code)
  @name = args[:name] if args.key?(:name)
  @playbook_input = args[:playbook_input] if args.key?(:playbook_input)
  @playbook_output = args[:playbook_output] if args.key?(:playbook_output)
  @token_count = args[:token_count] if args.key?(:token_count)
  @update_time = args[:update_time] if args.key?(:update_time)
end