View Source OpenAi.VectorStores (OpenAI REST API Client v0.4.4)
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.
Functions
cancel_vector_store_file_batch(vector_store_id, batch_id, opts \\ [])
View Source@spec cancel_vector_store_file_batch(String.t(), String.t(), 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( OpenAi.VectorStore.CreateRequest.t(), keyword() ) :: {:ok, OpenAi.VectorStore.t()} | {:error, OpenAi.Error.error()}
Create a vector store.
@spec create_vector_store_file( String.t(), OpenAi.VectorStore.File.CreateRequest.t(), 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( String.t(), OpenAi.VectorStore.File.Batch.CreateRequest.t(), keyword() ) :: {:ok, OpenAi.VectorStore.File.Batch.t()} | {:error, OpenAi.Error.error()}
Create a vector store file batch.
@spec delete_vector_store( String.t(), keyword() ) :: {:ok, OpenAi.VectorStore.DeleteResponse.t()} | {:error, OpenAi.Error.error()}
Delete a vector store.
@spec delete_vector_store_file(String.t(), String.t(), 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( String.t(), keyword() ) :: {:ok, OpenAi.VectorStore.t()} | {:error, OpenAi.Error.error()}
Retrieves a vector store.
@spec get_vector_store_file(String.t(), String.t(), 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(String.t(), String.t(), 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(String.t(), String.t(), 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_at
timestamp of the objects.asc
for ascending order anddesc
for descending order.after
: A cursor for use in pagination.after
is 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.before
is 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 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( String.t(), 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_at
timestamp of the objects.asc
for ascending order anddesc
for descending order.after
: A cursor for use in pagination.after
is 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.before
is 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 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(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_at
timestamp of the objects.asc
for ascending order anddesc
for descending order.after
: A cursor for use in pagination.after
is 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.before
is 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 before=obj_foo in order to fetch the previous page of the list.
@spec modify_vector_store(String.t(), OpenAi.VectorStore.UpdateRequest.t(), keyword()) :: {:ok, OpenAi.VectorStore.t()} | {:error, OpenAi.Error.error()}
Modifies a vector store.