Content
These tools manage the material held inside a knowledge base. Anything you add — plain text or a live web page — is chunked, embedded and indexed for retrieval, and the knowledge graph of the KBase is extended to describe it. All of these tools require you to own the knowledge base you name.
AddContent
Adds a piece of text content to a knowledge base and indexes it incrementally, so existing content stays searchable throughout.
Parameters
| Name | Type | Description |
|---|---|---|
indexId | string | The Id of the KBase to add the content to. |
contentName | string | A name for the content. Use it later to delete the item. |
content | string | The text to add. |
Returns
The content Id of the added content.
AddWebsite
destructiveFetches a web page and adds its text to a knowledge base, indexing it in the same way as AddContent.
Parameters
| Name | Type | Description |
|---|---|---|
indexId | string | The Id of the KBase to add the page to. |
url | string | The address of the web page to read. |
Returns
The content Id of the added website.
ListContent
Lists everything currently held in a knowledge base.
Parameters
| Name | Type | Description |
|---|---|---|
indexId | string | The Id of the KBase. |
Returns
A list of records, each containing:
| Field | Type | Description |
|---|---|---|
ContentId | string | The Id of the content item. |
ContentName | string | The name of the content item. |
ContentType | string | The kind of item, expressed as a word from the shared lineage taxonomy. |
GetContent
Retrieves a single stored content item from a knowledge base.
Parameters
| Name | Type | Description |
|---|---|---|
contentId | string | The Id of the content item, as reported by ListContent. |
indexId | string | The Id of the KBase holding the item. |
Returns
The content itself together with its content type. If the knowledge base cannot be found for the calling account, an empty result is returned.
DeleteContent
destructiveRemoves a content item from a knowledge base and de-indexes it, so it no longer appears in search or chat answers.
Parameters
| Name | Type | Description |
|---|---|---|
indexId | string | The Id of the KBase holding the item. |
contentName | string | The name given to the content when it was added. |
Returns
true when the content was deleted.