@pinecone-database/pinecone
Version:
This is the official Node.js SDK for [Pinecone](https://www.pinecone.io), written in TypeScript.
34 lines (33 loc) • 1.24 kB
TypeScript
import { AsstDataOperationsProvider } from './asstDataOperationsProvider';
import type { AssistantFilesList, ListFilesOptions } from './types';
/**
* Lists files (with optional filter) uploaded to an Assistant.
*
* @example
* ```typescript
* import { Pinecone } from '@pinecone-database/pinecone';
* const pc = new Pinecone();
* const assistantName = 'test1';
* const assistant = pc.Assistant(assistantName);
* const files = await assistant.listFiles({filter: {metadata: {key: 'value'}}});
* console.log(files);
* // {
* // files: [
* // {
* // name: 'test-file.txt',
* // id: '1a56ddd0-c6d8-4295-80c0-9bfd6f5cb87b',
* // metadata: [Object],
* // createdOn: 2025-01-06T19:14:21.969Z,
* // updatedOn: 2025-01-06T19:14:36.925Z,
* // status: 'Available',
* // percentDone: 1,
* // signedUrl: undefined,
* // errorMessage: undefined
* // }
* // ]
* // }
* ```
* @param assistantName - The name of the Assistant that the files are uploaded to.
* @param api - The API object to use to send the request.
*/
export declare const listFiles: (assistantName: string, apiProvider: AsstDataOperationsProvider) => (options: ListFilesOptions) => Promise<AssistantFilesList>;