Class Document (2.0.0)

Document(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A knowledge document to be used by a KnowledgeBase.

For more information, see the knowledge base guide <https://cloud.google.com/dialogflow/docs/how/knowledge-bases>__.

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

Attributes

NameDescription
name str
Optional. The document resource name. The name must be empty when creating a document. Format: projects/.
display_name str
Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
mime_type str
Required. The MIME type of this document.
knowledge_types Sequence[.gcd_document.Document.KnowledgeType]
Required. The knowledge type of document content.
content_uri str
The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form gs://. 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 str
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead.
raw_content bytes
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
enable_auto_reload bool
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. PERMISION_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.
latest_reload_status .gcd_document.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.

Classes

KnowledgeType

KnowledgeType(value)

The knowledge type of document content.

ReloadStatus

ReloadStatus(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The status of a reload attempt.