Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2FaqAnswer

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

Overview

Represents answer from "frequently asked questions".

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2FaqAnswer

Returns a new instance of GoogleCloudDialogflowV2FaqAnswer



836
837
838
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 836

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

Instance Attribute Details

#answerString

The piece of text from the source knowledge base document. Corresponds to the JSON property answer

Returns:

  • (String)


802
803
804
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 802

def answer
  @answer
end

#answer_recordString

The name of answer record, in the format of "projects//answerRecords/" Corresponds to the JSON property answerRecord

Returns:

  • (String)


808
809
810
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 808

def answer_record
  @answer_record
end

#confidenceFloat

The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain). Corresponds to the JSON property confidence

Returns:

  • (Float)


815
816
817
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 815

def confidence
  @confidence
end

#metadataHash<String,String>

A map that contains metadata about the answer and the document from which it originates. Corresponds to the JSON property metadata

Returns:

  • (Hash<String,String>)


821
822
823
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 821

def 
  @metadata
end

#questionString

The corresponding FAQ question. Corresponds to the JSON property question

Returns:

  • (String)


826
827
828
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 826

def question
  @question
end

#sourceString

Indicates which Knowledge Document this answer was extracted from. Format: projects/<Project ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>. Corresponds to the JSON property source

Returns:

  • (String)


834
835
836
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 834

def source
  @source
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



841
842
843
844
845
846
847
848
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 841

def update!(**args)
  @answer = args[:answer] if args.key?(:answer)
  @answer_record = args[:answer_record] if args.key?(:answer_record)
  @confidence = args[:confidence] if args.key?(:confidence)
  @metadata = args[:metadata] if args.key?(:metadata)
  @question = args[:question] if args.key?(:question)
  @source = args[:source] if args.key?(:source)
end