Class Document

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.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes
NameDescription
strname
Optional. The document resource name. The name must be empty when creating a document. Format: ``projects/
strdisplay_name
Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
strmime_type
Required. The MIME type of this document.
Sequence[google.cloud.dialogflow_v2.types.Document.KnowledgeType]knowledge_types
Required. The knowledge type of document content.
strcontent_uri
The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form ``gs://
bytesraw_content
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. This field is a member of `oneof`_ ``source``.
boolenable_auto_reload
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.
google.cloud.dialogflow_v2.types.Document.ReloadStatuslatest_reload_status
Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
Sequence[google.cloud.dialogflow_v2.types.Document.MetadataEntry]metadata
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.

Inheritance

builtins.object > proto.message.Message > Document

Classes

KnowledgeType

KnowledgeType(value)

The knowledge type of document content.

MetadataEntry

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

API documentation for dialogflow_v2.types.Document.MetadataEntry class.

ReloadStatus

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

The status of a reload attempt.