Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SessionTurn

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

Overview

Represents a turn, including a query from the user and a answer from service.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1SessionTurn

Returns a new instance of GoogleCloudDiscoveryengineV1SessionTurn.



7920
7921
7922
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 7920

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

Instance Attribute Details

#answerString

The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn. Corresponds to the JSON property answer

Returns:

  • (String)


7913
7914
7915
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 7913

def answer
  @answer
end

#queryGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Query

Defines a user inputed query. Corresponds to the JSON property query



7918
7919
7920
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 7918

def query
  @query
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7925
7926
7927
7928
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 7925

def update!(**args)
  @answer = args[:answer] if args.key?(:answer)
  @query = args[:query] if args.key?(:query)
end