Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer

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

Overview

Represents an answer from Knowledge. Currently supports FAQ and Generative answers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer

Returns a new instance of GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer.



18863
18864
18865
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 18863

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

Instance Attribute Details

#answer_textString

The piece of text from the source that answers this suggested query. Corresponds to the JSON property answerText

Returns:

  • (String)


18851
18852
18853
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 18851

def answer_text
  @answer_text
end

#faq_sourceGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource

Details about source of FAQ answer. Corresponds to the JSON property faqSource



18856
18857
18858
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 18856

def faq_source
  @faq_source
end

#generative_sourceGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource

Details about source of Generative answer. Corresponds to the JSON property generativeSource



18861
18862
18863
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 18861

def generative_source
  @generative_source
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



18868
18869
18870
18871
18872
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 18868

def update!(**args)
  @answer_text = args[:answer_text] if args.key?(:answer_text)
  @faq_source = args[:faq_source] if args.key?(:faq_source)
  @generative_source = args[:generative_source] if args.key?(:generative_source)
end