Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Vector Stores

Create vector store
client.VectorStores.New(ctx, body) (*VectorStore, error)
POST/vector_stores
Delete vector store
client.VectorStores.Delete(ctx, vectorStoreID) (*VectorStoreDeleted, error)
DELETE/vector_stores/{vector_store_id}
List vector stores
client.VectorStores.List(ctx, query) (*CursorPage[VectorStore], error)
GET/vector_stores
Retrieve vector store
client.VectorStores.Get(ctx, vectorStoreID) (*VectorStore, error)
GET/vector_stores/{vector_store_id}
Search vector store
client.VectorStores.Search(ctx, vectorStoreID, body) (*Page[VectorStoreSearchResponse], error)
POST/vector_stores/{vector_store_id}/search
Modify vector store
client.VectorStores.Update(ctx, vectorStoreID, body) (*VectorStore, error)
POST/vector_stores/{vector_store_id}
ModelsExpand Collapse
type AutoFileChunkingStrategyParamResp struct{…}

The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400.

type FileChunkingStrategyUnion interface{…}

The strategy used to chunk the file.

type FileChunkingStrategyParamUnionResp interface{…}

The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty.

type OtherFileChunkingStrategyObject struct{…}

This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the chunking_strategy concept was introduced in the API.

type StaticFileChunkingStrategy struct{…}
type StaticFileChunkingStrategyObject struct{…}
type StaticFileChunkingStrategyObjectParamResp struct{…}

Customize your own chunking strategy by setting chunk size and chunk overlap.

type VectorStore struct{…}

A vector store is a collection of processed files can be used by the file_search tool.

type VectorStoreDeleted struct{…}

Vector StoresFile Batches

Cancel vector store file batch
client.VectorStores.FileBatches.Cancel(ctx, vectorStoreID, batchID) (*VectorStoreFileBatch, error)
POST/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel
Create vector store file batch
client.VectorStores.FileBatches.New(ctx, vectorStoreID, body) (*VectorStoreFileBatch, error)
POST/vector_stores/{vector_store_id}/file_batches
List vector store files in a batch
client.VectorStores.FileBatches.ListFiles(ctx, vectorStoreID, batchID, query) (*CursorPage[VectorStoreFile], error)
GET/vector_stores/{vector_store_id}/file_batches/{batch_id}/files
Retrieve vector store file batch
client.VectorStores.FileBatches.Get(ctx, vectorStoreID, batchID) (*VectorStoreFileBatch, error)
GET/vector_stores/{vector_store_id}/file_batches/{batch_id}
ModelsExpand Collapse
type VectorStoreFileBatch struct{…}

A batch of files attached to a vector store.

Vector StoresFiles

Retrieve vector store file content
client.VectorStores.Files.Content(ctx, vectorStoreID, fileID) (*Page[VectorStoreFileContentResponse], error)
GET/vector_stores/{vector_store_id}/files/{file_id}/content
Create vector store file
client.VectorStores.Files.New(ctx, vectorStoreID, body) (*VectorStoreFile, error)
POST/vector_stores/{vector_store_id}/files
Delete vector store file
client.VectorStores.Files.Delete(ctx, vectorStoreID, fileID) (*VectorStoreFileDeleted, error)
DELETE/vector_stores/{vector_store_id}/files/{file_id}
List vector store files
client.VectorStores.Files.List(ctx, vectorStoreID, query) (*CursorPage[VectorStoreFile], error)
GET/vector_stores/{vector_store_id}/files
Retrieve vector store file
client.VectorStores.Files.Get(ctx, vectorStoreID, fileID) (*VectorStoreFile, error)
GET/vector_stores/{vector_store_id}/files/{file_id}
Update vector store file attributes
client.VectorStores.Files.Update(ctx, vectorStoreID, fileID, body) (*VectorStoreFile, error)
POST/vector_stores/{vector_store_id}/files/{file_id}
ModelsExpand Collapse
type VectorStoreFile struct{…}

A list of files attached to a vector store.

type VectorStoreFileDeleted struct{…}