pub struct VectorStoresResource { /* private fields */ }Expand description
EN: Vector Stores API resource. 中文:Vector Stores API 资源。
Implementations§
Source§impl VectorStoresResource
impl VectorStoresResource
Sourcepub async fn create(
&self,
request: CreateVectorStoreRequest,
) -> Result<VectorStore, LingerError>
pub async fn create( &self, request: CreateVectorStoreRequest, ) -> Result<VectorStore, LingerError>
EN: Creates a vector store with POST /v1/vector_stores.
中文:使用 POST /v1/vector_stores 创建向量存储。
Sourcepub async fn list(&self) -> Result<VectorStorePage, LingerError>
pub async fn list(&self) -> Result<VectorStorePage, LingerError>
EN: Lists vector stores with GET /v1/vector_stores.
中文:使用 GET /v1/vector_stores 列出向量存储。
Sourcepub async fn retrieve(
&self,
vector_store_id: &str,
) -> Result<VectorStore, LingerError>
pub async fn retrieve( &self, vector_store_id: &str, ) -> Result<VectorStore, LingerError>
EN: Retrieves a vector store with GET /v1/vector_stores/{vector_store_id}.
中文:使用 GET /v1/vector_stores/{vector_store_id} 获取向量存储。
Sourcepub async fn modify(
&self,
vector_store_id: &str,
request: ModifyVectorStoreRequest,
) -> Result<VectorStore, LingerError>
pub async fn modify( &self, vector_store_id: &str, request: ModifyVectorStoreRequest, ) -> Result<VectorStore, LingerError>
EN: Modifies a vector store with POST /v1/vector_stores/{vector_store_id}.
中文:使用 POST /v1/vector_stores/{vector_store_id} 修改向量存储。
Sourcepub async fn search(
&self,
vector_store_id: &str,
request: CreateVectorStoreSearchRequest,
) -> Result<VectorStoreSearchPage, LingerError>
pub async fn search( &self, vector_store_id: &str, request: CreateVectorStoreSearchRequest, ) -> Result<VectorStoreSearchPage, LingerError>
EN: Searches a vector store with POST /v1/vector_stores/{vector_store_id}/search.
中文:使用 POST /v1/vector_stores/{vector_store_id}/search 搜索向量存储。
Sourcepub async fn delete(
&self,
vector_store_id: &str,
) -> Result<VectorStoreDeletion, LingerError>
pub async fn delete( &self, vector_store_id: &str, ) -> Result<VectorStoreDeletion, LingerError>
EN: Deletes a vector store with DELETE /v1/vector_stores/{vector_store_id}.
中文:使用 DELETE /v1/vector_stores/{vector_store_id} 删除向量存储。
Sourcepub fn files(&self, vector_store_id: &str) -> VectorStoreFilesResource
pub fn files(&self, vector_store_id: &str) -> VectorStoreFilesResource
EN: Returns the Vector Store Files subresource for a vector store id. 中文:返回指定向量存储 ID 的 Vector Store Files 子资源。
Sourcepub fn file_batches(
&self,
vector_store_id: &str,
) -> VectorStoreFileBatchesResource
pub fn file_batches( &self, vector_store_id: &str, ) -> VectorStoreFileBatchesResource
EN: Returns the Vector Store File Batches subresource for a vector store id. 中文:返回指定向量存储 ID 的 Vector Store File Batches 子资源。
Trait Implementations§
Source§impl Clone for VectorStoresResource
impl Clone for VectorStoresResource
Source§fn clone(&self) -> VectorStoresResource
fn clone(&self) -> VectorStoresResource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more