@@ -32,17 +32,17 @@ def run_with_assistant(assistant, client, file_path, embedding_model):
32
32
pass
33
33
34
34
35
- vector_store = client .beta . vector_stores .create (
35
+ vector_store = client .vector_stores .create (
36
36
name = "papers" ,
37
37
file_ids = [file .id ]
38
38
)
39
39
40
- vs_list = client .beta . vector_stores .list ()
40
+ vs_list = client .vector_stores .list ()
41
41
42
42
assert len (vs_list .data ) > 0 , "vector store list is empty"
43
43
44
44
# TODO support vector store file creation
45
- #file = client.beta. vector_stores.files.create_and_poll(
45
+ #file = client.vector_stores.files.create_and_poll(
46
46
# vector_store_id=vector_store.id,
47
47
# file_id=file2.id
48
48
#)
@@ -54,7 +54,7 @@ def run_with_assistant(assistant, client, file_path, embedding_model):
54
54
55
55
# Use the upload and poll SDK helper to upload the files, add them to the vector store,
56
56
# and poll the status of the file batch for completion.
57
- #file_batch = client.beta. vector_stores.file_batches.upload_and_poll(
57
+ #file_batch = client.vector_stores.file_batches.upload_and_poll(
58
58
# vector_store_id=vector_store.id, files=file_streams
59
59
#)
60
60
@@ -116,10 +116,10 @@ def run_with_assistant(assistant, client, file_path, embedding_model):
116
116
response = client .beta .threads .messages .list (thread_id = thread .id )
117
117
logger .info (response .data [0 ].content [0 ].text .value )
118
118
119
- vs_files = client .beta . vector_stores .files .list (vector_store_id = vector_store .id )
119
+ vs_files = client .vector_stores .files .list (vector_store_id = vector_store .id )
120
120
for vsf in vs_files .data :
121
- client .beta . vector_stores .files .delete (file_id = vsf .id , vector_store_id = vector_store .id )
122
- client .beta . vector_stores .delete (vector_store .id )
121
+ client .vector_stores .files .delete (file_id = vsf .id , vector_store_id = vector_store .id )
122
+ client .vector_stores .delete (vector_store .id )
123
123
124
124
125
125
0 commit comments