Skip to content
  • Auto
  • Light
  • Dark

Data Sources

Data Sources

Add Data Source to a Knowledge Base
knowledge_bases.data_sources.create(strpath_knowledge_base_uuid, DataSourceCreateParams**kwargs) -> DataSourceCreateResponse
post/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources
Delete a Data Source from a Knowledge Base
knowledge_bases.data_sources.delete(strdata_source_uuid, DataSourceDeleteParams**kwargs) -> DataSourceDeleteResponse
delete/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}
List Data Sources for a Knowledge Base
knowledge_bases.data_sources.list(strknowledge_base_uuid, DataSourceListParams**kwargs) -> DataSourceListResponse
get/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources
ModelsExpand Collapse
class APIFileUploadDataSource:

File to upload as data source for knowledge base.

original_file_name: Optional[str]

The original file name

size_in_bytes: Optional[str]

The size of the file in bytes

formatuint64
stored_object_key: Optional[str]

The object key the file was stored as

class APIKnowledgeBaseDataSource:

Data Source configuration for Knowledge Bases

aws_data_source: Optional[AwsDataSource]

AWS S3 Data Source for Display

bucket_name: Optional[str]

Spaces bucket name

item_path: Optional[str]
region: Optional[str]

Region of bucket

bucket_name: Optional[str]

Name of storage bucket - Deprecated, moved to data_source_details

created_at: Optional[datetime]

Creation date / time

formatdate-time
dropbox_data_source: Optional[DropboxDataSource]

Dropbox Data Source for Display

folder: Optional[str]
file_upload_data_source: Optional[APIFileUploadDataSource]

File to upload as data source for knowledge base.

item_path: Optional[str]

Path of folder or object in bucket - Deprecated, moved to data_source_details

last_datasource_indexing_job: Optional[APIIndexedDataSource]
last_indexing_job: Optional[APIIndexingJob]

IndexingJob description

region: Optional[str]

Region code - Deprecated, moved to data_source_details

spaces_data_source: Optional[APISpacesDataSource]

Spaces Bucket Data Source

updated_at: Optional[datetime]

Last modified

formatdate-time
uuid: Optional[str]

Unique id of knowledge base

web_crawler_data_source: Optional[APIWebCrawlerDataSource]

WebCrawlerDataSource

class APISpacesDataSource:

Spaces Bucket Data Source

bucket_name: Optional[str]

Spaces bucket name

item_path: Optional[str]
region: Optional[str]

Region of bucket

class APIWebCrawlerDataSource:

WebCrawlerDataSource

base_url: Optional[str]

The base url to crawl.

crawling_option: Optional[Literal["UNKNOWN", "SCOPED", "PATH", 2 more]]

Options for specifying how URLs found on pages should be handled.

  • UNKNOWN: Default unknown value
  • SCOPED: Only include the base URL.
  • PATH: Crawl the base URL and linked pages within the URL path.
  • DOMAIN: Crawl the base URL and linked pages within the same domain.
  • SUBDOMAINS: Crawl the base URL and linked pages for any subdomain.
Accepts one of the following:
"UNKNOWN"
"SCOPED"
"PATH"
"DOMAIN"
"SUBDOMAINS"
embed_media: Optional[bool]

Whether to ingest and index media (images, etc.) on web pages.

class AwsDataSource:

AWS S3 Data Source

bucket_name: Optional[str]

Spaces bucket name

item_path: Optional[str]
key_id: Optional[str]

The AWS Key ID

region: Optional[str]

Region of bucket

secret_key: Optional[str]

The AWS Secret Key