Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1Answer

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

Defines an answer.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1Answer

Returns a new instance of GoogleCloudDiscoveryengineV1Answer.



856
857
858
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 856

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

Instance Attribute Details

#answer_skipped_reasonsArray<String>

Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. Corresponds to the JSON property answerSkippedReasons

Returns:

  • (Array<String>)


787
788
789
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 787

def answer_skipped_reasons
  @answer_skipped_reasons
end

#answer_textString

The textual answer. Corresponds to the JSON property answerText

Returns:

  • (String)


792
793
794
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 792

def answer_text
  @answer_text
end

#citationsArray<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerCitation>

Citations. Corresponds to the JSON property citations



797
798
799
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 797

def citations
  @citations
end

#complete_timeString

Output only. Answer completed timestamp. Corresponds to the JSON property completeTime

Returns:

  • (String)


802
803
804
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 802

def complete_time
  @complete_time
end

#create_timeString

Output only. Answer creation timestamp. Corresponds to the JSON property createTime

Returns:

  • (String)


807
808
809
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 807

def create_time
  @create_time
end

#grounding_scoreFloat

A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. Corresponds to the JSON property groundingScore

Returns:

  • (Float)


813
814
815
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 813

def grounding_score
  @grounding_score
end

#grounding_supportsArray<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerGroundingSupport>

Optional. Grounding supports. Corresponds to the JSON property groundingSupports



818
819
820
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 818

def grounding_supports
  @grounding_supports
end

#nameString

Immutable. Fully qualified name projects/project/locations/global/ collections/collection/engines/engine/sessions/*/answers/* Corresponds to the JSON property name

Returns:

  • (String)


824
825
826
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 824

def name
  @name
end

#query_understanding_infoGoogle::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerQueryUnderstandingInfo

Query understanding information. Corresponds to the JSON property queryUnderstandingInfo



829
830
831
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 829

def query_understanding_info
  @query_understanding_info
end

#referencesArray<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerReference>

References. Corresponds to the JSON property references



834
835
836
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 834

def references
  @references
end

Suggested related questions. Corresponds to the JSON property relatedQuestions

Returns:

  • (Array<String>)


839
840
841
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 839

def related_questions
  @related_questions
end

#safety_ratingsArray<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SafetyRating>

Optional. Safety ratings. Corresponds to the JSON property safetyRatings



844
845
846
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 844

def safety_ratings
  @safety_ratings
end

#stateString

The state of the answer generation. Corresponds to the JSON property state

Returns:

  • (String)


849
850
851
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 849

def state
  @state
end

#stepsArray<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerStep>

Answer generation steps. Corresponds to the JSON property steps



854
855
856
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 854

def steps
  @steps
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 861

def update!(**args)
  @answer_skipped_reasons = args[:answer_skipped_reasons] if args.key?(:answer_skipped_reasons)
  @answer_text = args[:answer_text] if args.key?(:answer_text)
  @citations = args[:citations] if args.key?(:citations)
  @complete_time = args[:complete_time] if args.key?(:complete_time)
  @create_time = args[:create_time] if args.key?(:create_time)
  @grounding_score = args[:grounding_score] if args.key?(:grounding_score)
  @grounding_supports = args[:grounding_supports] if args.key?(:grounding_supports)
  @name = args[:name] if args.key?(:name)
  @query_understanding_info = args[:query_understanding_info] if args.key?(:query_understanding_info)
  @references = args[:references] if args.key?(:references)
  @related_questions = args[:related_questions] if args.key?(:related_questions)
  @safety_ratings = args[:safety_ratings] if args.key?(:safety_ratings)
  @state = args[:state] if args.key?(:state)
  @steps = args[:steps] if args.key?(:steps)
end