Reference documentation and code samples for the Dialogflow V2 API class Google::Cloud::Dialogflow::V2::Document.
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
.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#content_uri
def content_uri() -> ::String
-
(::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.
#content_uri=
def content_uri=(value) -> ::String
-
value (::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.
-
(::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.
#display_name
def display_name() -> ::String
- (::String) — Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
#display_name=
def display_name=(value) -> ::String
- value (::String) — Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
- (::String) — Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
#enable_auto_reload
def enable_auto_reload() -> ::Boolean
-
(::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.
#enable_auto_reload=
def enable_auto_reload=(value) -> ::Boolean
-
value (::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.
-
(::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.
#knowledge_types
def knowledge_types() -> ::Array<::Google::Cloud::Dialogflow::V2::Document::KnowledgeType>
- (::Array<::Google::Cloud::Dialogflow::V2::Document::KnowledgeType>) — Required. The knowledge type of document content.
#knowledge_types=
def knowledge_types=(value) -> ::Array<::Google::Cloud::Dialogflow::V2::Document::KnowledgeType>
- value (::Array<::Google::Cloud::Dialogflow::V2::Document::KnowledgeType>) — Required. The knowledge type of document content.
- (::Array<::Google::Cloud::Dialogflow::V2::Document::KnowledgeType>) — Required. The knowledge type of document content.
#latest_reload_status
def latest_reload_status() -> ::Google::Cloud::Dialogflow::V2::Document::ReloadStatus
- (::Google::Cloud::Dialogflow::V2::Document::ReloadStatus) — Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
#metadata
def metadata() -> ::Google::Protobuf::Map{::String => ::String}
-
(::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 avalue
of the metadata is 1024 bytes.
#metadata=
def metadata=(value) -> ::Google::Protobuf::Map{::String => ::String}
-
value (::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 avalue
of the metadata is 1024 bytes.
-
(::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 avalue
of the metadata is 1024 bytes.
#mime_type
def mime_type() -> ::String
- (::String) — Required. The MIME type of this document.
#mime_type=
def mime_type=(value) -> ::String
- value (::String) — Required. The MIME type of this document.
- (::String) — Required. The MIME type of this document.
#name
def name() -> ::String
-
(::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>
.
#name=
def name=(value) -> ::String
-
value (::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>
.
-
(::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>
.
#raw_content
def raw_content() -> ::String
- (::String) — The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
#raw_content=
def raw_content=(value) -> ::String
- value (::String) — The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
- (::String) — The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
#state
def state() -> ::Google::Cloud::Dialogflow::V2::Document::State
- (::Google::Cloud::Dialogflow::V2::Document::State) — Output only. The current state of the document.