@@ -32,17 +32,17 @@ def run_with_assistant(assistant, client, file_path, embedding_model):
3232 pass
3333
3434
35- vector_store = client .beta . vector_stores .create (
35+ vector_store = client .vector_stores .create (
3636 name = "papers" ,
3737 file_ids = [file .id ]
3838 )
3939
40- vs_list = client .beta . vector_stores .list ()
40+ vs_list = client .vector_stores .list ()
4141
4242 assert len (vs_list .data ) > 0 , "vector store list is empty"
4343
4444 # 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(
4646 # vector_store_id=vector_store.id,
4747 # file_id=file2.id
4848 #)
@@ -54,7 +54,7 @@ def run_with_assistant(assistant, client, file_path, embedding_model):
5454
5555 # Use the upload and poll SDK helper to upload the files, add them to the vector store,
5656 # 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(
5858 # vector_store_id=vector_store.id, files=file_streams
5959 #)
6060
@@ -116,10 +116,10 @@ def run_with_assistant(assistant, client, file_path, embedding_model):
116116 response = client .beta .threads .messages .list (thread_id = thread .id )
117117 logger .info (response .data [0 ].content [0 ].text .value )
118118
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 )
120120 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 )
123123
124124
125125
0 commit comments