Class: Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/dialogflow/v2/participant.rb

Overview

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

Defined Under Namespace

Classes: EventSource, FaqSource, GenerativeSource

Instance Attribute Summary collapse

Instance Attribute Details

#answer_text::String

Returns The piece of text from the source that answers this suggested query.

Returns:

  • (::String)

    The piece of text from the source that answers this suggested query.



1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
# File 'proto_docs/google/cloud/dialogflow/v2/participant.rb', line 1598

class KnowledgeAnswer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Details about source of FAQ answer.
  # @!attribute [rw] question
  #   @return [::String]
  #     The corresponding FAQ question.
  class FaqSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Details about source of Generative answer.
  # @!attribute [rw] snippets
  #   @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource::Snippet>]
  #     All snippets used for this Generative Prediction, with their source URI
  #     and data.
  class GenerativeSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Snippet Source for a Generative Prediction.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI the data is sourced from.
    # @!attribute [rw] text
    #   @return [::String]
    #     Text taken from that URI.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] metadata
    #   @return [::Google::Protobuf::Struct]
    #     Metadata of the document.
    class Snippet
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Details about source of Event answer.
  # @!attribute [rw] event
  #   @return [::String]
  #     Name of the triggered event.
  # @!attribute [rw] snippets
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
  #     Sources used in event fulfillment.
  class EventSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#event_source::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::EventSource

Returns Populated if the prediction was from an event.

Note: The following fields are mutually exclusive: event_source, faq_source, generative_source, playbook_source. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:



1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
# File 'proto_docs/google/cloud/dialogflow/v2/participant.rb', line 1598

class KnowledgeAnswer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Details about source of FAQ answer.
  # @!attribute [rw] question
  #   @return [::String]
  #     The corresponding FAQ question.
  class FaqSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Details about source of Generative answer.
  # @!attribute [rw] snippets
  #   @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource::Snippet>]
  #     All snippets used for this Generative Prediction, with their source URI
  #     and data.
  class GenerativeSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Snippet Source for a Generative Prediction.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI the data is sourced from.
    # @!attribute [rw] text
    #   @return [::String]
    #     Text taken from that URI.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] metadata
    #   @return [::Google::Protobuf::Struct]
    #     Metadata of the document.
    class Snippet
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Details about source of Event answer.
  # @!attribute [rw] event
  #   @return [::String]
  #     Name of the triggered event.
  # @!attribute [rw] snippets
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
  #     Sources used in event fulfillment.
  class EventSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#faq_source::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::FaqSource

Returns Populated if the prediction came from FAQ.

Note: The following fields are mutually exclusive: faq_source, generative_source, playbook_source, event_source. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:



1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
# File 'proto_docs/google/cloud/dialogflow/v2/participant.rb', line 1598

class KnowledgeAnswer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Details about source of FAQ answer.
  # @!attribute [rw] question
  #   @return [::String]
  #     The corresponding FAQ question.
  class FaqSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Details about source of Generative answer.
  # @!attribute [rw] snippets
  #   @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource::Snippet>]
  #     All snippets used for this Generative Prediction, with their source URI
  #     and data.
  class GenerativeSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Snippet Source for a Generative Prediction.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI the data is sourced from.
    # @!attribute [rw] text
    #   @return [::String]
    #     Text taken from that URI.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] metadata
    #   @return [::Google::Protobuf::Struct]
    #     Metadata of the document.
    class Snippet
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Details about source of Event answer.
  # @!attribute [rw] event
  #   @return [::String]
  #     Name of the triggered event.
  # @!attribute [rw] snippets
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
  #     Sources used in event fulfillment.
  class EventSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#generative_source::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource

Returns Populated if the prediction was Generative.

Note: The following fields are mutually exclusive: generative_source, faq_source, playbook_source, event_source. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:



1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
# File 'proto_docs/google/cloud/dialogflow/v2/participant.rb', line 1598

class KnowledgeAnswer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Details about source of FAQ answer.
  # @!attribute [rw] question
  #   @return [::String]
  #     The corresponding FAQ question.
  class FaqSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Details about source of Generative answer.
  # @!attribute [rw] snippets
  #   @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource::Snippet>]
  #     All snippets used for this Generative Prediction, with their source URI
  #     and data.
  class GenerativeSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Snippet Source for a Generative Prediction.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI the data is sourced from.
    # @!attribute [rw] text
    #   @return [::String]
    #     Text taken from that URI.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] metadata
    #   @return [::Google::Protobuf::Struct]
    #     Metadata of the document.
    class Snippet
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Details about source of Event answer.
  # @!attribute [rw] event
  #   @return [::String]
  #     Name of the triggered event.
  # @!attribute [rw] snippets
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
  #     Sources used in event fulfillment.
  class EventSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#playbook_source::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource

Returns Populated if the prediction was from Playbook.

Note: The following fields are mutually exclusive: playbook_source, faq_source, generative_source, event_source. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:



1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
# File 'proto_docs/google/cloud/dialogflow/v2/participant.rb', line 1598

class KnowledgeAnswer
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Details about source of FAQ answer.
  # @!attribute [rw] question
  #   @return [::String]
  #     The corresponding FAQ question.
  class FaqSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Details about source of Generative answer.
  # @!attribute [rw] snippets
  #   @return [::Array<::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource::Snippet>]
  #     All snippets used for this Generative Prediction, with their source URI
  #     and data.
  class GenerativeSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Snippet Source for a Generative Prediction.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI the data is sourced from.
    # @!attribute [rw] text
    #   @return [::String]
    #     Text taken from that URI.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title of the document.
    # @!attribute [rw] metadata
    #   @return [::Google::Protobuf::Struct]
    #     Metadata of the document.
    class Snippet
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Details about source of Event answer.
  # @!attribute [rw] event
  #   @return [::String]
  #     Name of the triggered event.
  # @!attribute [rw] snippets
  #   @return [::Google::Cloud::Dialogflow::V2::KnowledgeAssistAnswer::KnowledgeAnswer::GenerativeSource]
  #     Sources used in event fulfillment.
  class EventSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end