Resource: 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
.
JSON representation |
---|
{ "name": string, "displayName": string, "mimeType": string, "knowledgeTypes": [ enum ( |
Fields | |
---|---|
name |
Optional. The document resource name. The name must be empty when creating a document. Format: |
display |
Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails. |
mime |
Required. The MIME type of this document. |
knowledge |
Required. The knowledge type of document content. |
enable |
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 Reload status can be tracked in 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 |
latest |
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 |
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 contentUri, etc. The max size of a An object containing a list of |
state |
Output only. The current state of the document. |
Union field source . The source of this document. source can be only one of the following: |
|
content |
The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form 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 |
content |
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 rawContent instead. |
raw |
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. A base64-encoded string. |
KnowledgeType
The knowledge type of document content.
Enums | |
---|---|
KNOWLEDGE_TYPE_UNSPECIFIED |
The type is unspecified or arbitrary. |
FAQ |
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. |
EXTRACTIVE_QA |
Documents for which unstructured text is extracted and used for question answering. |
ARTICLE_SUGGESTION |
The entire document content as a whole can be used for query results. Only for Contact Center Solutions on Dialogflow. |
AGENT_FACING_SMART_REPLY |
The document contains agent-facing Smart Reply entries. |
SMART_REPLY |
The legacy enum for agent-facing smart reply feature. |
ReloadStatus
The status of a reload attempt.
JSON representation |
---|
{
"time": string,
"status": {
object ( |
Fields | |
---|---|
time |
Output only. The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
status |
Output only. The status of a reload attempt or the initial load. |
State
Possible states of the document
Enums | |
---|---|
STATE_UNSPECIFIED |
The document state is unspecified. |
CREATING |
The document creation is in progress. |
ACTIVE |
The document is active and ready to use. |
UPDATING |
The document updation is in progress. |
RELOADING |
The document is reloading. |
DELETING |
The document deletion is in progress. |
Methods |
|
---|---|
|
Creates a new document. |
|
Deletes the specified document. |
|
Retrieves the specified document. |
|
Returns the list of all documents of the knowledge base. |
|
Updates the specified document. |
|
Reloads the specified document from its specified source, content_uri or content. |