View Source OpenAi.VectorStores (OpenAI REST API Client v1.0.0)
Provides API endpoints related to vector stores
Summary
Functions
Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.
Create a vector store.
Create a vector store file by attaching a File to a vector store.
Create a vector store file batch.
Delete a vector store.
Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the delete file endpoint.
Retrieves a vector store.
Retrieves a vector store file.
Retrieves a vector store file batch.
Returns a list of vector store files in a batch.
Returns a list of vector store files.
Returns a list of vector stores.
Modifies a vector store.
Retrieve the parsed contents of a vector store file.
Search a vector store for relevant chunks based on a query and file attributes filter.
Update attributes on a vector store file.
Functions
cancel_vector_store_file_batch(vector_store_id, batch_id, opts \\ [])
View Source@spec cancel_vector_store_file_batch( vector_store_id :: String.t(), batch_id :: String.t(), opts :: keyword() ) :: {:ok, OpenAi.VectorStore.File.Batch.t()} | {:error, OpenAi.Error.error()}
Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.
@spec create_vector_store( body :: OpenAi.VectorStore.CreateRequest.t(), opts :: keyword() ) :: {:ok, OpenAi.VectorStore.t()} | {:error, OpenAi.Error.error()}
Create a vector store.
@spec create_vector_store_file( vector_store_id :: String.t(), body :: OpenAi.VectorStore.File.CreateRequest.t(), opts :: keyword() ) :: {:ok, OpenAi.VectorStore.File.t()} | {:error, OpenAi.Error.error()}
Create a vector store file by attaching a File to a vector store.
@spec create_vector_store_file_batch( vector_store_id :: String.t(), body :: OpenAi.VectorStore.File.Batch.CreateRequest.t(), opts :: keyword() ) :: {:ok, OpenAi.VectorStore.File.Batch.t()} | {:error, OpenAi.Error.error()}
Create a vector store file batch.
@spec delete_vector_store(vector_store_id :: String.t(), opts :: keyword()) :: {:ok, OpenAi.VectorStore.DeleteResponse.t()} | {:error, OpenAi.Error.error()}
Delete a vector store.
@spec delete_vector_store_file( vector_store_id :: String.t(), file_id :: String.t(), opts :: keyword() ) :: {:ok, OpenAi.VectorStore.File.DeleteResponse.t()} | {:error, OpenAi.Error.error()}
Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the delete file endpoint.
@spec get_vector_store(vector_store_id :: String.t(), opts :: keyword()) :: {:ok, OpenAi.VectorStore.t()} | {:error, OpenAi.Error.error()}
Retrieves a vector store.
@spec get_vector_store_file( vector_store_id :: String.t(), file_id :: String.t(), opts :: keyword() ) :: {:ok, OpenAi.VectorStore.File.t()} | {:error, OpenAi.Error.error()}
Retrieves a vector store file.
get_vector_store_file_batch(vector_store_id, batch_id, opts \\ [])
View Source@spec get_vector_store_file_batch( vector_store_id :: String.t(), batch_id :: String.t(), opts :: keyword() ) :: {:ok, OpenAi.VectorStore.File.Batch.t()} | {:error, OpenAi.Error.error()}
Retrieves a vector store file batch.
list_files_in_vector_store_batch(vector_store_id, batch_id, opts \\ [])
View Source@spec list_files_in_vector_store_batch( vector_store_id :: String.t(), batch_id :: String.t(), opts :: keyword() ) :: {:ok, OpenAi.VectorStore.File.ListResponse.t()} | {:error, OpenAi.Error.error()}
Returns a list of vector store files in a batch.
Options
limit: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.order: Sort order by thecreated_attimestamp of the objects.ascfor ascending order anddescfor descending order.after: A cursor for use in pagination.afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.before: A cursor for use in pagination.beforeis an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.filter: Filter by file status. One ofin_progress,completed,failed,cancelled.
@spec list_vector_store_files(vector_store_id :: String.t(), opts :: keyword()) :: {:ok, OpenAi.VectorStore.File.ListResponse.t()} | {:error, OpenAi.Error.error()}
Returns a list of vector store files.
Options
limit: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.order: Sort order by thecreated_attimestamp of the objects.ascfor ascending order anddescfor descending order.after: A cursor for use in pagination.afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.before: A cursor for use in pagination.beforeis an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.filter: Filter by file status. One ofin_progress,completed,failed,cancelled.
@spec list_vector_stores(opts :: keyword()) :: {:ok, OpenAi.VectorStore.ListResponse.t()} | {:error, OpenAi.Error.error()}
Returns a list of vector stores.
Options
limit: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.order: Sort order by thecreated_attimestamp of the objects.ascfor ascending order anddescfor descending order.after: A cursor for use in pagination.afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.before: A cursor for use in pagination.beforeis an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
@spec modify_vector_store( vector_store_id :: String.t(), body :: OpenAi.VectorStore.UpdateRequest.t(), opts :: keyword() ) :: {:ok, OpenAi.VectorStore.t()} | {:error, OpenAi.Error.error()}
Modifies a vector store.
retrieve_vector_store_file_content(vector_store_id, file_id, opts \\ [])
View Source@spec retrieve_vector_store_file_content( vector_store_id :: String.t(), file_id :: String.t(), opts :: keyword() ) :: {:ok, OpenAi.VectorStore.File.ContentResponse.t()} | {:error, OpenAi.Error.error()}
Retrieve the parsed contents of a vector store file.
@spec search_vector_store( vector_store_id :: String.t(), body :: OpenAi.VectorStore.SearchRequest.t(), opts :: keyword() ) :: {:ok, OpenAi.VectorStore.SearchResult.Page.t()} | {:error, OpenAi.Error.error()}
Search a vector store for relevant chunks based on a query and file attributes filter.
update_vector_store_file_attributes(vector_store_id, file_id, body, opts \\ [])
View Source@spec update_vector_store_file_attributes( vector_store_id :: String.t(), file_id :: String.t(), body :: OpenAi.VectorStore.File.AttributesUpdateRequest.t(), opts :: keyword() ) :: {:ok, OpenAi.VectorStore.File.t()} | {:error, OpenAi.Error.error()}
Update attributes on a vector store file.