Skip to content

Commit ad7cc79

Browse files
docs(api): update file parameter descriptions in vector_stores files and file_batches
1 parent d392aae commit ad7cc79

5 files changed

Lines changed: 32 additions & 18 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 152
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

src/openai/resources/vector_stores/file_batches.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,16 @@ def create(
7979
file_ids: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that
8080
the vector store should use. Useful for tools like `file_search` that can access
8181
files. If `attributes` or `chunking_strategy` are provided, they will be applied
82-
to all files in the batch. The maximum batch size is 2000 files. Mutually
83-
exclusive with `files`.
82+
to all files in the batch. The maximum batch size is 2000 files. This endpoint
83+
is recommended for multi-file ingestion and helps reduce per-vector-store write
84+
request pressure. Mutually exclusive with `files`.
8485
8586
files: A list of objects that each include a `file_id` plus optional `attributes` or
8687
`chunking_strategy`. Use this when you need to override metadata for specific
8788
files. The global `attributes` or `chunking_strategy` will be ignored and must
88-
be specified for each file. The maximum batch size is 2000 files. Mutually
89-
exclusive with `file_ids`.
89+
be specified for each file. The maximum batch size is 2000 files. This endpoint
90+
is recommended for multi-file ingestion and helps reduce per-vector-store write
91+
request pressure. Mutually exclusive with `file_ids`.
9092
9193
extra_headers: Send extra headers
9294
@@ -452,14 +454,16 @@ async def create(
452454
file_ids: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that
453455
the vector store should use. Useful for tools like `file_search` that can access
454456
files. If `attributes` or `chunking_strategy` are provided, they will be applied
455-
to all files in the batch. The maximum batch size is 2000 files. Mutually
456-
exclusive with `files`.
457+
to all files in the batch. The maximum batch size is 2000 files. This endpoint
458+
is recommended for multi-file ingestion and helps reduce per-vector-store write
459+
request pressure. Mutually exclusive with `files`.
457460
458461
files: A list of objects that each include a `file_id` plus optional `attributes` or
459462
`chunking_strategy`. Use this when you need to override metadata for specific
460463
files. The global `attributes` or `chunking_strategy` will be ignored and must
461-
be specified for each file. The maximum batch size is 2000 files. Mutually
462-
exclusive with `file_ids`.
464+
be specified for each file. The maximum batch size is 2000 files. This endpoint
465+
is recommended for multi-file ingestion and helps reduce per-vector-store write
466+
request pressure. Mutually exclusive with `file_ids`.
463467
464468
extra_headers: Send extra headers
465469

src/openai/resources/vector_stores/files.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ def create(
6767
Args:
6868
file_id: A [File](https://platform.openai.com/docs/api-reference/files) ID that the
6969
vector store should use. Useful for tools like `file_search` that can access
70-
files.
70+
files. For multi-file ingestion, we recommend
71+
[`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch)
72+
to minimize per-vector-store write requests.
7173
7274
attributes: Set of 16 key-value pairs that can be attached to an object. This can be useful
7375
for storing additional information about the object in a structured format, and
@@ -498,7 +500,9 @@ async def create(
498500
Args:
499501
file_id: A [File](https://platform.openai.com/docs/api-reference/files) ID that the
500502
vector store should use. Useful for tools like `file_search` that can access
501-
files.
503+
files. For multi-file ingestion, we recommend
504+
[`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch)
505+
to minimize per-vector-store write requests.
502506
503507
attributes: Set of 16 key-value pairs that can be attached to an object. This can be useful
504508
for storing additional information about the object in a structured format, and

src/openai/types/vector_stores/file_batch_create_params.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,19 @@ class FileBatchCreateParams(TypedDict, total=False):
3333
A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that
3434
the vector store should use. Useful for tools like `file_search` that can access
3535
files. If `attributes` or `chunking_strategy` are provided, they will be applied
36-
to all files in the batch. The maximum batch size is 2000 files. Mutually
37-
exclusive with `files`.
36+
to all files in the batch. The maximum batch size is 2000 files. This endpoint
37+
is recommended for multi-file ingestion and helps reduce per-vector-store write
38+
request pressure. Mutually exclusive with `files`.
3839
"""
3940

4041
files: Iterable[File]
4142
"""
4243
A list of objects that each include a `file_id` plus optional `attributes` or
4344
`chunking_strategy`. Use this when you need to override metadata for specific
4445
files. The global `attributes` or `chunking_strategy` will be ignored and must
45-
be specified for each file. The maximum batch size is 2000 files. Mutually
46-
exclusive with `file_ids`.
46+
be specified for each file. The maximum batch size is 2000 files. This endpoint
47+
is recommended for multi-file ingestion and helps reduce per-vector-store write
48+
request pressure. Mutually exclusive with `file_ids`.
4749
"""
4850

4951

@@ -52,7 +54,9 @@ class File(TypedDict, total=False):
5254
"""
5355
A [File](https://platform.openai.com/docs/api-reference/files) ID that the
5456
vector store should use. Useful for tools like `file_search` that can access
55-
files.
57+
files. For multi-file ingestion, we recommend
58+
[`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch)
59+
to minimize per-vector-store write requests.
5660
"""
5761

5862
attributes: Optional[Dict[str, Union[str, float, bool]]]

src/openai/types/vector_stores/file_create_params.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ class FileCreateParams(TypedDict, total=False):
1515
"""
1616
A [File](https://platform.openai.com/docs/api-reference/files) ID that the
1717
vector store should use. Useful for tools like `file_search` that can access
18-
files.
18+
files. For multi-file ingestion, we recommend
19+
[`file_batches`](https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch)
20+
to minimize per-vector-store write requests.
1921
"""
2022

2123
attributes: Optional[Dict[str, Union[str, float, bool]]]

0 commit comments

Comments
 (0)