Learn R Programming

openaiRtools (version 0.2.2)

delete_vector_store: Delete a Vector Store (Convenience Function)

Description

Shortcut that creates an OpenAI client from the OPENAI_API_KEY environment variable and deletes a vector store. This removes the search index but does NOT delete the underlying files.

Usage

delete_vector_store(vector_store_id)

Value

A list with $deleted (TRUE) and $id.

Arguments

vector_store_id

Character. Required. The vector store ID.

Examples

Run this code
if (FALSE) {
Sys.setenv(OPENAI_API_KEY = "sk-xxxxxx")

result <- delete_vector_store("vs_abc123")
if (result$deleted) cat("Vector store deleted.")
}

Run the code above in your browser using DataLab