Learn R Programming

openaiRtools (version 0.2.2)

delete_response: Delete a Stored Response (Convenience Function)

Description

Shortcut that creates an OpenAI client from the OPENAI_API_KEY environment variable and deletes a stored response.

Usage

delete_response(response_id)

Value

A list with $deleted (TRUE if successful).

Arguments

response_id

Character. Required. The response ID to delete.

Examples

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

result <- delete_response("resp_abc123")
if (result$deleted) cat("Response deleted.")
}

Run the code above in your browser using DataLab