Class: Google::Apis::CesV1::SessionOutput

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

Overview

Output for the session.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SessionOutput

Returns a new instance of SessionOutput.



7557
7558
7559
# File 'lib/google/apis/ces_v1/classes.rb', line 7557

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

Instance Attribute Details

#audioString

Output audio from the CES agent. Corresponds to the JSON property audio NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


7498
7499
7500
# File 'lib/google/apis/ces_v1/classes.rb', line 7498

def audio
  @audio
end

#citationsGoogle::Apis::CesV1::Citations

Citations associated with the agent response. Corresponds to the JSON property citations



7503
7504
7505
# File 'lib/google/apis/ces_v1/classes.rb', line 7503

def citations
  @citations
end

#contextArray<Hash<String,Object>>

Context messages for external supervision guardrails. Corresponds to the JSON property context

Returns:

  • (Array<Hash<String,Object>>)


7508
7509
7510
# File 'lib/google/apis/ces_v1/classes.rb', line 7508

def context
  @context
end

#diagnostic_infoGoogle::Apis::CesV1::SessionOutputDiagnosticInfo

Contains execution details during the processing. Corresponds to the JSON property diagnosticInfo



7513
7514
7515
# File 'lib/google/apis/ces_v1/classes.rb', line 7513

def diagnostic_info
  @diagnostic_info
end

#end_sessionGoogle::Apis::CesV1::EndSession

Indicates the session has terminated, due to either successful completion (e.g. user says "Good bye!" ) or an agent escalation. The agent will not process any further inputs after session is terminated and the client should half- close and disconnect after receiving all remaining responses from the agent. Corresponds to the JSON property endSession



7521
7522
7523
# File 'lib/google/apis/ces_v1/classes.rb', line 7521

def end_session
  @end_session
end

#google_search_suggestionsGoogle::Apis::CesV1::GoogleSearchSuggestions

Search suggestions from Google Search Tool. Corresponds to the JSON property googleSearchSuggestions



7526
7527
7528
# File 'lib/google/apis/ces_v1/classes.rb', line 7526

def google_search_suggestions
  @google_search_suggestions
end

#payloadHash<String,Object>

Custom payload with structured output from the CES agent. Corresponds to the JSON property payload

Returns:

  • (Hash<String,Object>)


7531
7532
7533
# File 'lib/google/apis/ces_v1/classes.rb', line 7531

def payload
  @payload
end

#textString

Output text from the CES agent. Corresponds to the JSON property text

Returns:

  • (String)


7536
7537
7538
# File 'lib/google/apis/ces_v1/classes.rb', line 7536

def text
  @text
end

#tool_callsGoogle::Apis::CesV1::ToolCalls

Request for the client to execute the tools and return the execution results before continuing the session. Corresponds to the JSON property toolCalls



7542
7543
7544
# File 'lib/google/apis/ces_v1/classes.rb', line 7542

def tool_calls
  @tool_calls
end

#turn_completedBoolean Also known as: turn_completed?

If true, the CES agent has detected the end of the current conversation turn and will provide no further output for this turn. Corresponds to the JSON property turnCompleted

Returns:

  • (Boolean)


7548
7549
7550
# File 'lib/google/apis/ces_v1/classes.rb', line 7548

def turn_completed
  @turn_completed
end

#turn_indexFixnum

Indicates the sequential order of conversation turn to which this output belongs to, starting from 1. Corresponds to the JSON property turnIndex

Returns:

  • (Fixnum)


7555
7556
7557
# File 'lib/google/apis/ces_v1/classes.rb', line 7555

def turn_index
  @turn_index
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
# File 'lib/google/apis/ces_v1/classes.rb', line 7562

def update!(**args)
  @audio = args[:audio] if args.key?(:audio)
  @citations = args[:citations] if args.key?(:citations)
  @context = args[:context] if args.key?(:context)
  @diagnostic_info = args[:diagnostic_info] if args.key?(:diagnostic_info)
  @end_session = args[:end_session] if args.key?(:end_session)
  @google_search_suggestions = args[:google_search_suggestions] if args.key?(:google_search_suggestions)
  @payload = args[:payload] if args.key?(:payload)
  @text = args[:text] if args.key?(:text)
  @tool_calls = args[:tool_calls] if args.key?(:tool_calls)
  @turn_completed = args[:turn_completed] if args.key?(:turn_completed)
  @turn_index = args[:turn_index] if args.key?(:turn_index)
end