POST /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources
To add a data source to a knowledge base, send a POST request to /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources.
Servers
- https://api.digitalocean.com
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
knowledge_base_uuid |
String | Yes |
Knowledge base id |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
chunking_algorithm |
String | No |
The chunking algorithm to use for processing data sources. Note: This feature requires enabling the knowledgebase enhancements feature preview flag. Valid values:
Default value: "CHUNKING_ALGORITHM_SECTION_BASED" |
aws_data_source |
Object | No |
AWS S3 Data Source |
aws_data_source.region |
String | No |
Region of bucket |
aws_data_source.bucket_name |
String | No |
Spaces bucket name |
aws_data_source.secret_key |
String | No |
The AWS Secret Key |
aws_data_source.item_path |
String | No | |
aws_data_source.key_id |
String | No |
The AWS Key ID |
knowledge_base_uuid |
String | No |
Knowledge base id |
spaces_data_source |
Object | No |
Spaces Bucket Data Source |
spaces_data_source.region |
String | No |
Region of bucket |
spaces_data_source.bucket_name |
String | No |
Spaces bucket name |
spaces_data_source.item_path |
String | No | |
web_crawler_data_source |
Object | No |
WebCrawlerDataSource |
web_crawler_data_source.embed_media |
Boolean | No |
Whether to ingest and index media (images, etc.) on web pages. |
web_crawler_data_source.exclude_tags[] |
Array | No |
Declaring which tags to exclude in web pages while webcrawling |
web_crawler_data_source.crawling_option |
String | No |
Options for specifying how URLs found on pages should be handled.
Valid values:
Default value: "UNKNOWN" |
web_crawler_data_source.base_url |
String | No |
The base url to crawl. |
chunking_options |
Object | No |
Configuration options for the chunking algorithm. Note: This feature requires enabling the knowledgebase enhancements feature preview flag. |
chunking_options.child_chunk_size |
Integer | No |
Hierarchical options |
chunking_options.parent_chunk_size |
Integer | No |
Hierarchical options |
chunking_options.max_chunk_size |
Integer | No |
Section_Based and Fixed_Length options |
chunking_options.semantic_threshold |
Number | No |
Semantic options |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.