proto_docs/google/cloud/dialogflow/v2/conversation.rb in google-cloud-dialogflow-v2-0.27.0 vs proto_docs/google/cloud/dialogflow/v2/conversation.rb in google-cloud-dialogflow-v2-0.28.0

- old
+ new

@@ -430,9 +430,108 @@ include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end + + # The request message for + # {::Google::Cloud::Dialogflow::V2::Conversations::Client#search_knowledge Conversations.SearchKnowledge}. + # @!attribute [rw] parent + # @return [::String] + # The parent resource contains the conversation profile + # Format: 'projects/<Project ID>' or `projects/<Project + # ID>/locations/<Location ID>`. + # @!attribute [rw] query + # @return [::Google::Cloud::Dialogflow::V2::TextInput] + # Required. The natural language text query for knowledge search. + # @!attribute [rw] conversation_profile + # @return [::String] + # Required. The conversation profile used to configure the search. + # Format: `projects/<Project ID>/locations/<Location + # ID>/conversationProfiles/<Conversation Profile ID>`. + # @!attribute [rw] session_id + # @return [::String] + # The ID of the search session. + # The session_id can be combined with Dialogflow V3 Agent ID retrieved from + # conversation profile or on its own to identify a search session. The search + # history of the same session will impact the search result. It's up to the + # API caller to choose an appropriate `Session ID`. It can be a random number + # or some type of session identifiers (preferably hashed). The length must + # not exceed 36 characters. + # @!attribute [rw] conversation + # @return [::String] + # The conversation (between human agent and end user) where the search + # request is triggered. Format: `projects/<Project ID>/locations/<Location + # ID>/conversations/<Conversation ID>`. + # @!attribute [rw] latest_message + # @return [::String] + # The name of the latest conversation message when the request is + # triggered. + # Format: `projects/<Project ID>/locations/<Location + # ID>/conversations/<Conversation ID>/messages/<Message ID>`. + class SearchKnowledgeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # {::Google::Cloud::Dialogflow::V2::Conversations::Client#search_knowledge Conversations.SearchKnowledge}. + # @!attribute [rw] answers + # @return [::Array<::Google::Cloud::Dialogflow::V2::SearchKnowledgeAnswer>] + # Most relevant snippets extracted from articles in the given knowledge base, + # ordered by confidence. + class SearchKnowledgeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a SearchKnowledge answer. + # @!attribute [rw] answer + # @return [::String] + # The piece of text from the knowledge base documents that answers + # the search query + # @!attribute [rw] answer_type + # @return [::Google::Cloud::Dialogflow::V2::SearchKnowledgeAnswer::AnswerType] + # The type of the answer. + # @!attribute [rw] answer_sources + # @return [::Array<::Google::Cloud::Dialogflow::V2::SearchKnowledgeAnswer::AnswerSource>] + # All sources used to generate the answer. + # @!attribute [rw] answer_record + # @return [::String] + # The name of the answer record. + # Format: `projects/<Project ID>/locations/<location ID>/answer + # Records/<Answer Record ID>` + class SearchKnowledgeAnswer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The sources of the answers. + # @!attribute [rw] title + # @return [::String] + # The title of the article. + # @!attribute [rw] uri + # @return [::String] + # The URI of the article. + # @!attribute [rw] snippet + # @return [::String] + # The relevant snippet of the article. + class AnswerSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of the answer. + module AnswerType + # The answer has a unspecified type. + ANSWER_TYPE_UNSPECIFIED = 0 + + # The answer is from FAQ doucments. + FAQ = 1 + + # The answer is from generative model. + GENERATIVE = 2 + end + end end end end end