Class: Google::Cloud::Dialogflow::V2::Document

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

Overview

A knowledge document to be used by a KnowledgeBase.

For more information, see the knowledge base guide.

Note: The projects.agent.knowledgeBases.documents resource is deprecated; only use projects.knowledgeBases.documents.

Defined Under Namespace

Modules: KnowledgeType, State Classes: MetadataEntry, ReloadStatus

Instance Attribute Summary collapse

Instance Attribute Details

#content_uri::String

Returns The URI where the file content is located.

For documents stored in Google Cloud Storage, these URIs must have the form gs://<bucket-name>/<object-name>.

NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the gs:// format URI described above.

Returns:

  • (::String)

    The URI where the file content is located.

    For documents stored in Google Cloud Storage, these URIs must have the form gs://<bucket-name>/<object-name>.

    NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the gs:// format URI described above.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'proto_docs/google/cloud/dialogflow/v2/document.rb', line 95

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

  # The status of a reload attempt.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time of a reload attempt.
  #     This reload may have been triggered automatically or manually and may
  #     not have succeeded.
  # @!attribute [rw] status
  #   @return [::Google::Rpc::Status]
  #     The status of a reload attempt or the initial load.
  class ReloadStatus
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class MetadataEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The knowledge type of document content.
  module KnowledgeType
    # The type is unspecified or arbitrary.
    KNOWLEDGE_TYPE_UNSPECIFIED = 0

    # The document content contains question and answer pairs as either HTML or
    # CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
    # may fail to be parsed.
    #
    # CSV must have questions in the first column and answers in the second,
    # with no header. Because of this explicit format, they are always parsed
    # accurately.
    FAQ = 1

    # Documents for which unstructured text is extracted and used for
    # question answering.
    EXTRACTIVE_QA = 2

    # The entire document content as a whole can be used for query results.
    # Only for Contact Center Solutions on Dialogflow.
    ARTICLE_SUGGESTION = 3

    # The document contains agent-facing Smart Reply entries.
    AGENT_FACING_SMART_REPLY = 4
  end

  # Possible states of the document
  module State
    # The document state is unspecified.
    STATE_UNSPECIFIED = 0

    # The document creation is in progress.
    CREATING = 1

    # The document is active and ready to use.
    ACTIVE = 2

    # The document updation is in progress.
    UPDATING = 3

    # The document is reloading.
    RELOADING = 4

    # The document deletion is in progress.
    DELETING = 5
  end
end

#display_name::String

Returns Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.

Returns:

  • (::String)

    Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'proto_docs/google/cloud/dialogflow/v2/document.rb', line 95

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

  # The status of a reload attempt.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time of a reload attempt.
  #     This reload may have been triggered automatically or manually and may
  #     not have succeeded.
  # @!attribute [rw] status
  #   @return [::Google::Rpc::Status]
  #     The status of a reload attempt or the initial load.
  class ReloadStatus
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class MetadataEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The knowledge type of document content.
  module KnowledgeType
    # The type is unspecified or arbitrary.
    KNOWLEDGE_TYPE_UNSPECIFIED = 0

    # The document content contains question and answer pairs as either HTML or
    # CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
    # may fail to be parsed.
    #
    # CSV must have questions in the first column and answers in the second,
    # with no header. Because of this explicit format, they are always parsed
    # accurately.
    FAQ = 1

    # Documents for which unstructured text is extracted and used for
    # question answering.
    EXTRACTIVE_QA = 2

    # The entire document content as a whole can be used for query results.
    # Only for Contact Center Solutions on Dialogflow.
    ARTICLE_SUGGESTION = 3

    # The document contains agent-facing Smart Reply entries.
    AGENT_FACING_SMART_REPLY = 4
  end

  # Possible states of the document
  module State
    # The document state is unspecified.
    STATE_UNSPECIFIED = 0

    # The document creation is in progress.
    CREATING = 1

    # The document is active and ready to use.
    ACTIVE = 2

    # The document updation is in progress.
    UPDATING = 3

    # The document is reloading.
    RELOADING = 4

    # The document deletion is in progress.
    DELETING = 5
  end
end

#enable_auto_reload::Boolean

Returns Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don't try to automatically reload the document.

Currently you can only enable automatic reload for documents sourced from a public url, see source field for the source types.

Reload status can be tracked in latest_reload_status. If a reload fails, we will keep the document unchanged.

If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISSION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling ReloadDocument and clear the errors.

Returns:

  • (::Boolean)

    Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don't try to automatically reload the document.

    Currently you can only enable automatic reload for documents sourced from a public url, see source field for the source types.

    Reload status can be tracked in latest_reload_status. If a reload fails, we will keep the document unchanged.

    If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISSION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling ReloadDocument and clear the errors.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'proto_docs/google/cloud/dialogflow/v2/document.rb', line 95

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

  # The status of a reload attempt.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time of a reload attempt.
  #     This reload may have been triggered automatically or manually and may
  #     not have succeeded.
  # @!attribute [rw] status
  #   @return [::Google::Rpc::Status]
  #     The status of a reload attempt or the initial load.
  class ReloadStatus
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class MetadataEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The knowledge type of document content.
  module KnowledgeType
    # The type is unspecified or arbitrary.
    KNOWLEDGE_TYPE_UNSPECIFIED = 0

    # The document content contains question and answer pairs as either HTML or
    # CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
    # may fail to be parsed.
    #
    # CSV must have questions in the first column and answers in the second,
    # with no header. Because of this explicit format, they are always parsed
    # accurately.
    FAQ = 1

    # Documents for which unstructured text is extracted and used for
    # question answering.
    EXTRACTIVE_QA = 2

    # The entire document content as a whole can be used for query results.
    # Only for Contact Center Solutions on Dialogflow.
    ARTICLE_SUGGESTION = 3

    # The document contains agent-facing Smart Reply entries.
    AGENT_FACING_SMART_REPLY = 4
  end

  # Possible states of the document
  module State
    # The document state is unspecified.
    STATE_UNSPECIFIED = 0

    # The document creation is in progress.
    CREATING = 1

    # The document is active and ready to use.
    ACTIVE = 2

    # The document updation is in progress.
    UPDATING = 3

    # The document is reloading.
    RELOADING = 4

    # The document deletion is in progress.
    DELETING = 5
  end
end

#knowledge_types::Array<::Google::Cloud::Dialogflow::V2::Document::KnowledgeType>

Returns Required. The knowledge type of document content.

Returns:



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'proto_docs/google/cloud/dialogflow/v2/document.rb', line 95

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

  # The status of a reload attempt.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time of a reload attempt.
  #     This reload may have been triggered automatically or manually and may
  #     not have succeeded.
  # @!attribute [rw] status
  #   @return [::Google::Rpc::Status]
  #     The status of a reload attempt or the initial load.
  class ReloadStatus
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class MetadataEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The knowledge type of document content.
  module KnowledgeType
    # The type is unspecified or arbitrary.
    KNOWLEDGE_TYPE_UNSPECIFIED = 0

    # The document content contains question and answer pairs as either HTML or
    # CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
    # may fail to be parsed.
    #
    # CSV must have questions in the first column and answers in the second,
    # with no header. Because of this explicit format, they are always parsed
    # accurately.
    FAQ = 1

    # Documents for which unstructured text is extracted and used for
    # question answering.
    EXTRACTIVE_QA = 2

    # The entire document content as a whole can be used for query results.
    # Only for Contact Center Solutions on Dialogflow.
    ARTICLE_SUGGESTION = 3

    # The document contains agent-facing Smart Reply entries.
    AGENT_FACING_SMART_REPLY = 4
  end

  # Possible states of the document
  module State
    # The document state is unspecified.
    STATE_UNSPECIFIED = 0

    # The document creation is in progress.
    CREATING = 1

    # The document is active and ready to use.
    ACTIVE = 2

    # The document updation is in progress.
    UPDATING = 3

    # The document is reloading.
    RELOADING = 4

    # The document deletion is in progress.
    DELETING = 5
  end
end

#latest_reload_status::Google::Cloud::Dialogflow::V2::Document::ReloadStatus (readonly)

Returns Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.

Returns:



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'proto_docs/google/cloud/dialogflow/v2/document.rb', line 95

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

  # The status of a reload attempt.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time of a reload attempt.
  #     This reload may have been triggered automatically or manually and may
  #     not have succeeded.
  # @!attribute [rw] status
  #   @return [::Google::Rpc::Status]
  #     The status of a reload attempt or the initial load.
  class ReloadStatus
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class MetadataEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The knowledge type of document content.
  module KnowledgeType
    # The type is unspecified or arbitrary.
    KNOWLEDGE_TYPE_UNSPECIFIED = 0

    # The document content contains question and answer pairs as either HTML or
    # CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
    # may fail to be parsed.
    #
    # CSV must have questions in the first column and answers in the second,
    # with no header. Because of this explicit format, they are always parsed
    # accurately.
    FAQ = 1

    # Documents for which unstructured text is extracted and used for
    # question answering.
    EXTRACTIVE_QA = 2

    # The entire document content as a whole can be used for query results.
    # Only for Contact Center Solutions on Dialogflow.
    ARTICLE_SUGGESTION = 3

    # The document contains agent-facing Smart Reply entries.
    AGENT_FACING_SMART_REPLY = 4
  end

  # Possible states of the document
  module State
    # The document state is unspecified.
    STATE_UNSPECIFIED = 0

    # The document creation is in progress.
    CREATING = 1

    # The document is active and ready to use.
    ACTIVE = 2

    # The document updation is in progress.
    UPDATING = 3

    # The document is reloading.
    RELOADING = 4

    # The document deletion is in progress.
    DELETING = 5
  end
end

#metadata::Google::Protobuf::Map{::String => ::String}

Returns Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

Returns:

  • (::Google::Protobuf::Map{::String => ::String})

    Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'proto_docs/google/cloud/dialogflow/v2/document.rb', line 95

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

  # The status of a reload attempt.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time of a reload attempt.
  #     This reload may have been triggered automatically or manually and may
  #     not have succeeded.
  # @!attribute [rw] status
  #   @return [::Google::Rpc::Status]
  #     The status of a reload attempt or the initial load.
  class ReloadStatus
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class MetadataEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The knowledge type of document content.
  module KnowledgeType
    # The type is unspecified or arbitrary.
    KNOWLEDGE_TYPE_UNSPECIFIED = 0

    # The document content contains question and answer pairs as either HTML or
    # CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
    # may fail to be parsed.
    #
    # CSV must have questions in the first column and answers in the second,
    # with no header. Because of this explicit format, they are always parsed
    # accurately.
    FAQ = 1

    # Documents for which unstructured text is extracted and used for
    # question answering.
    EXTRACTIVE_QA = 2

    # The entire document content as a whole can be used for query results.
    # Only for Contact Center Solutions on Dialogflow.
    ARTICLE_SUGGESTION = 3

    # The document contains agent-facing Smart Reply entries.
    AGENT_FACING_SMART_REPLY = 4
  end

  # Possible states of the document
  module State
    # The document state is unspecified.
    STATE_UNSPECIFIED = 0

    # The document creation is in progress.
    CREATING = 1

    # The document is active and ready to use.
    ACTIVE = 2

    # The document updation is in progress.
    UPDATING = 3

    # The document is reloading.
    RELOADING = 4

    # The document deletion is in progress.
    DELETING = 5
  end
end

#mime_type::String

Returns Required. The MIME type of this document.

Returns:

  • (::String)

    Required. The MIME type of this document.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'proto_docs/google/cloud/dialogflow/v2/document.rb', line 95

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

  # The status of a reload attempt.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time of a reload attempt.
  #     This reload may have been triggered automatically or manually and may
  #     not have succeeded.
  # @!attribute [rw] status
  #   @return [::Google::Rpc::Status]
  #     The status of a reload attempt or the initial load.
  class ReloadStatus
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class MetadataEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The knowledge type of document content.
  module KnowledgeType
    # The type is unspecified or arbitrary.
    KNOWLEDGE_TYPE_UNSPECIFIED = 0

    # The document content contains question and answer pairs as either HTML or
    # CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
    # may fail to be parsed.
    #
    # CSV must have questions in the first column and answers in the second,
    # with no header. Because of this explicit format, they are always parsed
    # accurately.
    FAQ = 1

    # Documents for which unstructured text is extracted and used for
    # question answering.
    EXTRACTIVE_QA = 2

    # The entire document content as a whole can be used for query results.
    # Only for Contact Center Solutions on Dialogflow.
    ARTICLE_SUGGESTION = 3

    # The document contains agent-facing Smart Reply entries.
    AGENT_FACING_SMART_REPLY = 4
  end

  # Possible states of the document
  module State
    # The document state is unspecified.
    STATE_UNSPECIFIED = 0

    # The document creation is in progress.
    CREATING = 1

    # The document is active and ready to use.
    ACTIVE = 2

    # The document updation is in progress.
    UPDATING = 3

    # The document is reloading.
    RELOADING = 4

    # The document deletion is in progress.
    DELETING = 5
  end
end

#name::String

Returns Optional. The document resource name. The name must be empty when creating a document. Format: projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>.

Returns:

  • (::String)

    Optional. The document resource name. The name must be empty when creating a document. Format: projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'proto_docs/google/cloud/dialogflow/v2/document.rb', line 95

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

  # The status of a reload attempt.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time of a reload attempt.
  #     This reload may have been triggered automatically or manually and may
  #     not have succeeded.
  # @!attribute [rw] status
  #   @return [::Google::Rpc::Status]
  #     The status of a reload attempt or the initial load.
  class ReloadStatus
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class MetadataEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The knowledge type of document content.
  module KnowledgeType
    # The type is unspecified or arbitrary.
    KNOWLEDGE_TYPE_UNSPECIFIED = 0

    # The document content contains question and answer pairs as either HTML or
    # CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
    # may fail to be parsed.
    #
    # CSV must have questions in the first column and answers in the second,
    # with no header. Because of this explicit format, they are always parsed
    # accurately.
    FAQ = 1

    # Documents for which unstructured text is extracted and used for
    # question answering.
    EXTRACTIVE_QA = 2

    # The entire document content as a whole can be used for query results.
    # Only for Contact Center Solutions on Dialogflow.
    ARTICLE_SUGGESTION = 3

    # The document contains agent-facing Smart Reply entries.
    AGENT_FACING_SMART_REPLY = 4
  end

  # Possible states of the document
  module State
    # The document state is unspecified.
    STATE_UNSPECIFIED = 0

    # The document creation is in progress.
    CREATING = 1

    # The document is active and ready to use.
    ACTIVE = 2

    # The document updation is in progress.
    UPDATING = 3

    # The document is reloading.
    RELOADING = 4

    # The document deletion is in progress.
    DELETING = 5
  end
end

#raw_content::String

Returns The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.

Returns:

  • (::String)

    The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'proto_docs/google/cloud/dialogflow/v2/document.rb', line 95

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

  # The status of a reload attempt.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time of a reload attempt.
  #     This reload may have been triggered automatically or manually and may
  #     not have succeeded.
  # @!attribute [rw] status
  #   @return [::Google::Rpc::Status]
  #     The status of a reload attempt or the initial load.
  class ReloadStatus
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class MetadataEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The knowledge type of document content.
  module KnowledgeType
    # The type is unspecified or arbitrary.
    KNOWLEDGE_TYPE_UNSPECIFIED = 0

    # The document content contains question and answer pairs as either HTML or
    # CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
    # may fail to be parsed.
    #
    # CSV must have questions in the first column and answers in the second,
    # with no header. Because of this explicit format, they are always parsed
    # accurately.
    FAQ = 1

    # Documents for which unstructured text is extracted and used for
    # question answering.
    EXTRACTIVE_QA = 2

    # The entire document content as a whole can be used for query results.
    # Only for Contact Center Solutions on Dialogflow.
    ARTICLE_SUGGESTION = 3

    # The document contains agent-facing Smart Reply entries.
    AGENT_FACING_SMART_REPLY = 4
  end

  # Possible states of the document
  module State
    # The document state is unspecified.
    STATE_UNSPECIFIED = 0

    # The document creation is in progress.
    CREATING = 1

    # The document is active and ready to use.
    ACTIVE = 2

    # The document updation is in progress.
    UPDATING = 3

    # The document is reloading.
    RELOADING = 4

    # The document deletion is in progress.
    DELETING = 5
  end
end

#state::Google::Cloud::Dialogflow::V2::Document::State (readonly)

Returns Output only. The current state of the document.

Returns:



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'proto_docs/google/cloud/dialogflow/v2/document.rb', line 95

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

  # The status of a reload attempt.
  # @!attribute [rw] time
  #   @return [::Google::Protobuf::Timestamp]
  #     The time of a reload attempt.
  #     This reload may have been triggered automatically or manually and may
  #     not have succeeded.
  # @!attribute [rw] status
  #   @return [::Google::Rpc::Status]
  #     The status of a reload attempt or the initial load.
  class ReloadStatus
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class MetadataEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The knowledge type of document content.
  module KnowledgeType
    # The type is unspecified or arbitrary.
    KNOWLEDGE_TYPE_UNSPECIFIED = 0

    # The document content contains question and answer pairs as either HTML or
    # CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
    # may fail to be parsed.
    #
    # CSV must have questions in the first column and answers in the second,
    # with no header. Because of this explicit format, they are always parsed
    # accurately.
    FAQ = 1

    # Documents for which unstructured text is extracted and used for
    # question answering.
    EXTRACTIVE_QA = 2

    # The entire document content as a whole can be used for query results.
    # Only for Contact Center Solutions on Dialogflow.
    ARTICLE_SUGGESTION = 3

    # The document contains agent-facing Smart Reply entries.
    AGENT_FACING_SMART_REPLY = 4
  end

  # Possible states of the document
  module State
    # The document state is unspecified.
    STATE_UNSPECIFIED = 0

    # The document creation is in progress.
    CREATING = 1

    # The document is active and ready to use.
    ACTIVE = 2

    # The document updation is in progress.
    UPDATING = 3

    # The document is reloading.
    RELOADING = 4

    # The document deletion is in progress.
    DELETING = 5
  end
end