@@ -1704,14 +1704,14 @@ paths:
1704
1704
from openai import OpenAI
1705
1705
client = OpenAI()
1706
1706
1707
- content = client.files.retrieve_content ("file-abc123")
1707
+ content = client.files.content ("file-abc123")
1708
1708
node.js : |
1709
1709
import OpenAI from "openai";
1710
1710
1711
1711
const openai = new OpenAI();
1712
1712
1713
1713
async function main() {
1714
- const file = await openai.files.retrieveContent ("file-abc123");
1714
+ const file = await openai.files.content ("file-abc123");
1715
1715
1716
1716
console.log(file);
1717
1717
}
@@ -5578,7 +5578,7 @@ paths:
5578
5578
from openai import OpenAI
5579
5579
client = OpenAI()
5580
5580
5581
- vector_stores = client.vector_stores.list()
5581
+ vector_stores = client.beta. vector_stores.list()
5582
5582
print(vector_stores)
5583
5583
node.js : |
5584
5584
import OpenAI from "openai";
@@ -5664,7 +5664,7 @@ paths:
5664
5664
from openai import OpenAI
5665
5665
client = OpenAI()
5666
5666
5667
- vector_store = client.vector_stores.create(
5667
+ vector_store = client.beta. vector_stores.create(
5668
5668
name="Support FAQ"
5669
5669
)
5670
5670
print(vector_store)
@@ -5732,7 +5732,7 @@ paths:
5732
5732
from openai import OpenAI
5733
5733
client = OpenAI()
5734
5734
5735
- vector_store = client.vector_stores.retrieve(
5735
+ vector_store = client.beta. vector_stores.retrieve(
5736
5736
vector_store_id="vs_abc123"
5737
5737
)
5738
5738
print(vector_store)
@@ -5798,7 +5798,7 @@ paths:
5798
5798
from openai import OpenAI
5799
5799
client = OpenAI()
5800
5800
5801
- vector_store = client.vector_stores.update(
5801
+ vector_store = client.beta. vector_stores.update(
5802
5802
vector_store_id="vs_abc123",
5803
5803
name="Support FAQ"
5804
5804
)
@@ -5870,7 +5870,7 @@ paths:
5870
5870
from openai import OpenAI
5871
5871
client = OpenAI()
5872
5872
5873
- deleted_vector_store = client.vector_stores.delete(
5873
+ deleted_vector_store = client.beta. vector_stores.delete(
5874
5874
vector_store_id="vs_abc123"
5875
5875
)
5876
5876
print(deleted_vector_store)
@@ -5959,7 +5959,7 @@ paths:
5959
5959
from openai import OpenAI
5960
5960
client = OpenAI()
5961
5961
5962
- vector_store_files = client.vector_stores.files.list(
5962
+ vector_store_files = client.beta. vector_stores.files.list(
5963
5963
vector_store_id="vs_abc123"
5964
5964
)
5965
5965
print(vector_store_files)
@@ -6052,7 +6052,7 @@ paths:
6052
6052
const openai = new OpenAI();
6053
6053
6054
6054
async function main() {
6055
- const myVectorStoreFile = await openai.beta.vector_stores .files.create(
6055
+ const myVectorStoreFile = await openai.beta.vectorStores .files.create(
6056
6056
"vs_abc123",
6057
6057
{
6058
6058
file_id: "file-abc123"
@@ -6114,7 +6114,7 @@ paths:
6114
6114
from openai import OpenAI
6115
6115
client = OpenAI()
6116
6116
6117
- vector_store_file = client.vector_stores.files.retrieve(
6117
+ vector_store_file = client.beta. vector_stores.files.retrieve(
6118
6118
vector_store_id="vs_abc123",
6119
6119
file_id="file-abc123"
6120
6120
)
@@ -6191,7 +6191,7 @@ paths:
6191
6191
const openai = new OpenAI();
6192
6192
6193
6193
async function main() {
6194
- const deletedVectorStoreFile = await openai.beta.vector_stores .files.del(
6194
+ const deletedVectorStoreFile = await openai.beta.vectorStores .files.del(
6195
6195
"vs_abc123",
6196
6196
"file-abc123"
6197
6197
);
@@ -6253,7 +6253,7 @@ paths:
6253
6253
from openai import OpenAI
6254
6254
client = OpenAI()
6255
6255
6256
- vector_store_file_batch = client.beta.vector_stores.fileBatches .create(
6256
+ vector_store_file_batch = client.beta.vector_stores.file_batches .create(
6257
6257
vector_store_id="vs_abc123",
6258
6258
file_ids=["file-abc123", "file-abc456"]
6259
6259
)
@@ -6263,7 +6263,7 @@ paths:
6263
6263
const openai = new OpenAI();
6264
6264
6265
6265
async function main() {
6266
- const myVectorStoreFileBatch = await openai.beta.vector_stores .fileBatches.create(
6266
+ const myVectorStoreFileBatch = await openai.beta.vectorStores .fileBatches.create(
6267
6267
"vs_abc123",
6268
6268
{
6269
6269
file_ids: ["file-abc123", "file-abc456"]
@@ -6333,7 +6333,7 @@ paths:
6333
6333
from openai import OpenAI
6334
6334
client = OpenAI()
6335
6335
6336
- vector_store_file_batch = client.vector_stores.fileBatches .retrieve(
6336
+ vector_store_file_batch = client.beta. vector_stores.file_batches .retrieve(
6337
6337
vector_store_id="vs_abc123",
6338
6338
batch_id="vsfb_abc123"
6339
6339
)
@@ -6402,7 +6402,7 @@ paths:
6402
6402
from openai import OpenAI
6403
6403
client = OpenAI()
6404
6404
6405
- deleted_vector_store_file_batch = client.vector_stores.fileBatches .cancel(
6405
+ deleted_vector_store_file_batch = client.beta. vector_stores.file_batches .cancel(
6406
6406
vector_store_id="vs_abc123",
6407
6407
file_batch_id="vsfb_abc123"
6408
6408
)
@@ -6508,7 +6508,7 @@ paths:
6508
6508
from openai import OpenAI
6509
6509
client = OpenAI()
6510
6510
6511
- vector_store_files = client.vector_stores.fileBatches .files.list(
6511
+ vector_store_files = client.beta. vector_stores.file_batches .files.list(
6512
6512
vector_store_id="vs_abc123",
6513
6513
batch_id="vsfb_abc123"
6514
6514
)
@@ -6609,6 +6609,15 @@ paths:
6609
6609
"endpoint": "/v1/chat/completions",
6610
6610
"completion_window": "24h"
6611
6611
}'
6612
+ python : |
6613
+ from openai import OpenAI
6614
+ client = OpenAI()
6615
+
6616
+ client.batches.create(
6617
+ input_file_id="file-abc123",
6618
+ endpoint="/v1/chat/completions",
6619
+ completion_window="24h"
6620
+ )
6612
6621
response : |
6613
6622
{
6614
6623
"id": "batch_abc123",
@@ -6745,6 +6754,11 @@ paths:
6745
6754
curl https://api.openai.com/v1/batches/batch_abc123 \
6746
6755
-H "Authorization: Bearer $OPENAI_API_KEY" \
6747
6756
-H "Content-Type: application/json" \
6757
+ python : |
6758
+ from openai import OpenAI
6759
+ client = OpenAI()
6760
+
6761
+ client.batches.retrieve("batch_abc123")
6748
6762
response : &batch_object |
6749
6763
{
6750
6764
" id " : " batch_abc123" ,
@@ -6807,6 +6821,11 @@ paths:
6807
6821
-H "Authorization: Bearer $OPENAI_API_KEY" \
6808
6822
-H "Content-Type: application/json" \
6809
6823
-X POST
6824
+ python : |
6825
+ from openai import OpenAI
6826
+ client = OpenAI()
6827
+
6828
+ client.batches.cancel("batch_abc123")
6810
6829
response : |
6811
6830
{
6812
6831
"id": "batch_abc123",
@@ -10773,7 +10792,7 @@ components:
10773
10792
file_id :
10774
10793
type : string
10775
10794
description : The ID of the file to attach to the message.
10776
- add_to :
10795
+ tools :
10777
10796
type : array
10778
10797
items :
10779
10798
type : string
@@ -10903,15 +10922,15 @@ components:
10903
10922
file_id :
10904
10923
type : string
10905
10924
description : The ID of the file to attach to the message.
10906
- add_to :
10925
+ tools :
10907
10926
type : array
10908
10927
items :
10909
10928
type : string
10910
10929
enum : ["file_search", "code_interpreter"]
10911
10930
description : A list of files attached to the message, and the tools they should be added to.
10912
10931
required :
10913
10932
- file_id
10914
- - add_to
10933
+ - tools
10915
10934
nullable : true
10916
10935
metadata :
10917
10936
description : *metadata_description
0 commit comments