Resource: Document
A document resource.
Note: resource projects.agent.knowledgeBases.documents
is deprecated, please use projects.knowledgeBases.documents
instead.
JSON representation | |
---|---|
{ "name": string, "displayName": string, "mimeType": string, "knowledgeTypes": [ enum( |
Fields | ||
---|---|---|
name |
The document resource name. The name must be empty when creating a document. Format: |
|
displayName |
Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails. |
|
mimeType |
Required. The MIME type of this document. |
|
knowledgeTypes[] |
Required. The knowledge type of document content. |
|
Union field source . Required. The source of this document. source can be only one of the following: |
||
contentUri |
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. |
|
rawContent |
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. A base64-encoded string. |
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. |