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. Create a vector store file by attaching a File to a vector store.
Sourcepub async fn create_byot<T0: Serialize, R: DeserializeOwned>(
&self,
request: T0,
) -> Result<R, OpenAIError>
pub async fn create_byot<T0: Serialize, R: DeserializeOwned>( &self, request: T0, ) -> Result<R, 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. Retrieves a vector store file.
Sourcepub async fn retrieve_byot<T0: Display, R: DeserializeOwned>(
&self,
file_id: T0,
) -> Result<R, OpenAIError>
pub async fn retrieve_byot<T0: Display, R: DeserializeOwned>( &self, file_id: T0, ) -> Result<R, 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. 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 delete_byot<T0: Display, R: DeserializeOwned>(
&self,
file_id: T0,
) -> Result<R, OpenAIError>
pub async fn delete_byot<T0: Display, R: DeserializeOwned>( &self, file_id: T0, ) -> Result<R, 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. Returns a list of vector store files.
Sourcepub async fn list_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn list_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, OpenAIError>
Returns a list of vector store files.