pub struct VectorsApi<'a>(/* private fields */);
Expand description
VectorsApi
struct to interact with vector stores API endpoints.
Implementations§
Source§impl<'a> VectorsApi<'a>
impl<'a> VectorsApi<'a>
Sourcepub async fn create_vector_store(
&self,
request: VectorStoreCreationRequest,
) -> OpenAIResult<Value>
pub async fn create_vector_store( &self, request: VectorStoreCreationRequest, ) -> OpenAIResult<Value>
Create a new vector store using the provided request parameters.
§Arguments
request
- AVectorStoreCreationRequest
containing the parameters for the vector store.
§Returns
A Result containing the JSON response as serde_json::Value
on success, or an OpenAIError
on failure.
Sourcepub async fn list_vector_stores(
&self,
limit: Option<u64>,
order: Option<String>,
after: Option<String>,
before: Option<String>,
) -> OpenAIResult<Value>
pub async fn list_vector_stores( &self, limit: Option<u64>, order: Option<String>, after: Option<String>, before: Option<String>, ) -> OpenAIResult<Value>
List vector stores with optional query parameters.
§Arguments
limit
- Maximum number of vector stores to retrieve.order
- Order of the retrieved vector stores.after
- Retrieve vector stores created after this ID.before
- Retrieve vector stores created before this ID.
§Returns
A Result containing the JSON response as serde_json::Value
on success, or an OpenAIError
on failure.
Sourcepub async fn retrieve_vector_store(
&self,
vector_store_id: &str,
) -> OpenAIResult<Value>
pub async fn retrieve_vector_store( &self, vector_store_id: &str, ) -> OpenAIResult<Value>
Retrieve details of a specific vector store.
§Arguments
vector_store_id
- The ID of the vector store to retrieve.
§Returns
A Result containing the JSON response as serde_json::Value
on success, or an OpenAIError
on failure.
Sourcepub async fn modify_vector_store(
&self,
vector_store_id: &str,
request: VectorStoreModificationRequest,
) -> OpenAIResult<Value>
pub async fn modify_vector_store( &self, vector_store_id: &str, request: VectorStoreModificationRequest, ) -> OpenAIResult<Value>
Modify an existing vector store using the provided request parameters.
§Arguments
vector_store_id
- The ID of the vector store to modify.request
- AVectorStoreModificationRequest
containing the parameters for the vector store modification.
§Returns
A Result containing the JSON response as serde_json::Value
on success, or an OpenAIError
on failure.
Sourcepub async fn delete_vector_store(
&self,
vector_store_id: &str,
) -> OpenAIResult<Value>
pub async fn delete_vector_store( &self, vector_store_id: &str, ) -> OpenAIResult<Value>
Delete a specific vector store.
§Arguments
vector_store_id
- The ID of the vector store to delete.
§Returns
A Result containing the JSON response as serde_json::Value
on success, or an OpenAIError
on failure.