List vector store files in a batch
client.vectorStores.fileBatches.listFiles(stringbatchID, FileBatchListFilesParams { vector_store_id, after, before, 3 more } params, RequestOptionsoptions?): CursorPage<VectorStoreFile { id, created_at, last_error, 6 more } >
GET/vector_stores/{vector_store_id}/file_batches/{batch_id}/files
List vector store files in a batch
import OpenAI from "openai";
const openai = new OpenAI();
async function main() {
const vectorStoreFiles = await openai.vectorStores.fileBatches.listFiles(
"vsfb_abc123",
{ vector_store_id: "vs_abc123" }
);
console.log(vectorStoreFiles);
}
main();
{
"object": "list",
"data": [
{
"id": "file-abc123",
"object": "vector_store.file",
"created_at": 1699061776,
"vector_store_id": "vs_abc123"
},
{
"id": "file-abc456",
"object": "vector_store.file",
"created_at": 1699061776,
"vector_store_id": "vs_abc123"
}
],
"first_id": "file-abc123",
"last_id": "file-abc456",
"has_more": false
}
Returns Examples
{
"object": "list",
"data": [
{
"id": "file-abc123",
"object": "vector_store.file",
"created_at": 1699061776,
"vector_store_id": "vs_abc123"
},
{
"id": "file-abc456",
"object": "vector_store.file",
"created_at": 1699061776,
"vector_store_id": "vs_abc123"
}
],
"first_id": "file-abc123",
"last_id": "file-abc456",
"has_more": false
}