Skip to content

Commit dbba33f

Browse files
docs(api): add multi-file ingestion guidance to vectorstorefile/filebatch params
1 parent 905b473 commit dbba33f

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 139
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-00994178cc8e20d71754b00c54b0e4f5b4128e1c1cce765e9b7d696bd8c80d33.yml
3-
openapi_spec_hash: 81f404053b663f987209b4fb2d08a230
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-24647ccd7356fee965aaca347476460727c6aec762e16a9eb41950d6fbccf0be.yml
3+
openapi_spec_hash: ef99e305f20ae8ae7b2758a205280cca
44
config_hash: 5635033cdc8c930255f8b529a78de722

vectorstorefile.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,9 @@ func (r *VectorStoreFileContentResponse) UnmarshalJSON(data []byte) error {
384384
type VectorStoreFileNewParams struct {
385385
// A [File](https://platform.openai.com/docs/api-reference/files) ID that the
386386
// vector store should use. Useful for tools like `file_search` that can access
387-
// files.
387+
// files. For multi-file ingestion, we recommend
388+
// [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch)
389+
// to minimize per-vector-store write requests.
388390
FileID string `json:"file_id" api:"required"`
389391
// Set of 16 key-value pairs that can be attached to an object. This can be useful
390392
// for storing additional information about the object in a structured format, and

vectorstorefilebatch.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,14 +270,16 @@ type VectorStoreFileBatchNewParams struct {
270270
// A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that
271271
// the vector store should use. Useful for tools like `file_search` that can access
272272
// files. If `attributes` or `chunking_strategy` are provided, they will be applied
273-
// to all files in the batch. The maximum batch size is 2000 files. Mutually
274-
// exclusive with `files`.
273+
// to all files in the batch. The maximum batch size is 2000 files. This endpoint
274+
// is recommended for multi-file ingestion and helps reduce per-vector-store write
275+
// request pressure. Mutually exclusive with `files`.
275276
FileIDs []string `json:"file_ids,omitzero"`
276277
// A list of objects that each include a `file_id` plus optional `attributes` or
277278
// `chunking_strategy`. Use this when you need to override metadata for specific
278279
// files. The global `attributes` or `chunking_strategy` will be ignored and must
279-
// be specified for each file. The maximum batch size is 2000 files. Mutually
280-
// exclusive with `file_ids`.
280+
// be specified for each file. The maximum batch size is 2000 files. This endpoint
281+
// is recommended for multi-file ingestion and helps reduce per-vector-store write
282+
// request pressure. Mutually exclusive with `file_ids`.
281283
Files []VectorStoreFileBatchNewParamsFile `json:"files,omitzero"`
282284
paramObj
283285
}
@@ -322,7 +324,9 @@ func (u *VectorStoreFileBatchNewParamsAttributeUnion) asAny() any {
322324
type VectorStoreFileBatchNewParamsFile struct {
323325
// A [File](https://platform.openai.com/docs/api-reference/files) ID that the
324326
// vector store should use. Useful for tools like `file_search` that can access
325-
// files.
327+
// files. For multi-file ingestion, we recommend
328+
// [`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch)
329+
// to minimize per-vector-store write requests.
326330
FileID string `json:"file_id" api:"required"`
327331
// Set of 16 key-value pairs that can be attached to an object. This can be useful
328332
// for storing additional information about the object in a structured format, and

0 commit comments

Comments
 (0)