pub struct VectorStoreFiles<'c, C: Config> {
pub vector_store_id: String,
/* private fields */
}
Expand description
Vector store files represent files inside a vector store.
Related guide: File Search
Fields§
§vector_store_id: String
Implementations§
Source§impl<'c, C: Config> VectorStoreFiles<'c, C>
impl<'c, C: Config> VectorStoreFiles<'c, C>
pub fn new(client: &'c Client<C>, vector_store_id: &str) -> Self
Sourcepub async fn create(
&self,
request: CreateVectorStoreFileRequest,
) -> Result<VectorStoreFileObject, OpenAIError>
pub async fn create( &self, request: CreateVectorStoreFileRequest, ) -> Result<VectorStoreFileObject, OpenAIError>
Create a vector store file by attaching a File to a vector store.
Sourcepub async fn retrieve(
&self,
file_id: &str,
) -> Result<VectorStoreFileObject, OpenAIError>
pub async fn retrieve( &self, file_id: &str, ) -> Result<VectorStoreFileObject, OpenAIError>
Retrieves a vector store file.
Sourcepub async fn delete(
&self,
file_id: &str,
) -> Result<DeleteVectorStoreFileResponse, OpenAIError>
pub async fn delete( &self, file_id: &str, ) -> Result<DeleteVectorStoreFileResponse, OpenAIError>
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.
Sourcepub async fn list<Q>(
&self,
query: &Q,
) -> Result<ListVectorStoreFilesResponse, OpenAIError>
pub async fn list<Q>( &self, query: &Q, ) -> Result<ListVectorStoreFilesResponse, OpenAIError>
Returns a list of vector store files.
Auto Trait Implementations§
impl<'c, C> Freeze for VectorStoreFiles<'c, C>
impl<'c, C> !RefUnwindSafe for VectorStoreFiles<'c, C>
impl<'c, C> Send for VectorStoreFiles<'c, C>where
C: Sync,
impl<'c, C> Sync for VectorStoreFiles<'c, C>where
C: Sync,
impl<'c, C> Unpin for VectorStoreFiles<'c, C>
impl<'c, C> !UnwindSafe for VectorStoreFiles<'c, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more