📄 Data Sources

Note: Check out our Dashboard (opens in a new tab) for a streamlined data source management interface.

Add a Source

To add a new data source:

client.add_source(source_name='City')

Delete a Source

To remove a data source:

client.delete_source(source_name='City')

List Sources

To get a list of available data sources:

sources = client.list_sources()

Add a File

To add a file to a specific source:

client.add_file(source_name='City', local_path='/Users/John/Boston.txt')

local_path specifies the local path to the file you wish to upload. source_name specifies the data source to store the uploaded file. Supported file types are text, PDF and Word files.

Delete a File

To remove a file from a particular source:

client.delete_file(source_name='City', file_name='Boston.txt')

file_name is the name of the file to be deleted. source_name specifies the source of the file to delete.

Download a File

To download a file from a designated source:

client.download_file(source_name='City', file_name='Boston.txt', local_path='/Users/John/Boston.txt')

file_name is the name of the file to download. source_name specifies the source of the file. local_path specifies the local path to save the downloaded file.

List Files

To get a list of available files in a specific source:

files = client.list_files(source_name='City')

Get File Retrieval Status

To check if a specific file from a source is ready for retrieval:

status = client.get_file_retrieval_status(source_name='City', file_name='Boston.txt')

Get Chunks of a File

To get the chunks of a certain file from a data srouce:

chunks = client.get_file_chunks(source_name='City', file_name='Boston.txt')