Documentation Index Fetch the complete documentation index at: https://docs.topk.io/llms.txt
Use this file to discover all available pages before exploring further.
A dataset is a named container for your documents. You must create a dataset before uploading files into it.
Create a dataset
When creating a dataset, you must specify a region — this determines where your data is physically stored.
Once set, a dataset’s region cannot be changed. See available regions .
CLI
Python SDK
JavaScript SDK
topk dataset create my-dataset --region aws-us-east-1-elastica
client.datasets().create( "my-docs" )
await client . datasets (). create ( "my-docs" );
List datasets
CLI
Python SDK
JavaScript SDK
datasets = client.datasets().list()
for dataset in datasets:
print (dataset.name)
const datasets = await client . datasets (). list ();
for ( const dataset of datasets ) {
console . log ( dataset . name );
}
Get a dataset
CLI
Python SDK
JavaScript SDK
dataset = client.datasets().get( "my-docs" )
print (dataset.name)
const dataset = await client . datasets (). get ( "my-docs" );
console . log ( dataset . name );
Update a dataset
Update dataset description :
CLI
Python SDK
JavaScript SDK
topk dataset update my-docs --description "Annual financial filings"
dataset = client.datasets().update(
"my-docs" ,
description = "Annual financial filings" ,
)
print (dataset.description)
const dataset = await client . datasets (). update ( "my-docs" , {
description: "Annual financial filings" ,
});
console . log ( dataset . description );
Delete a dataset
Deleting a dataset is irreversible. All documents stored in the dataset will be permanently removed.
CLI
Python SDK
JavaScript SDK
topk dataset delete --dataset my-docs
The CLI will prompt for confirmation. Use -y to skip: topk dataset delete --dataset my-docs -y
client.datasets().delete( "my-docs" )
await client . datasets (). delete ( "my-docs" );