Delete vector store file
VectorStoreFileDeleted vectorStores().files().delete(FileDeleteParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
DELETE/vector_stores/{vector_store_id}/files/{file_id}
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.
Parameters
Returns
Delete vector store file
package com.openai.example;
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.vectorstores.files.FileDeleteParams;
import com.openai.models.vectorstores.files.VectorStoreFileDeleted;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
FileDeleteParams params = FileDeleteParams.builder()
.vectorStoreId("vector_store_id")
.fileId("file_id")
.build();
VectorStoreFileDeleted vectorStoreFileDeleted = client.vectorStores().files().delete(params);
}
}{
"id": "id",
"deleted": true,
"object": "vector_store.file.deleted"
}Returns Examples
{
"id": "id",
"deleted": true,
"object": "vector_store.file.deleted"
}