Learn R Programming

openaiRtools (version 0.2.2)

delete_model: Delete a Fine-Tuned Model (Convenience Function)

Description

Shortcut that creates an OpenAI client from the OPENAI_API_KEY environment variable and deletes a fine-tuned model you own. Only models you created via fine-tuning can be deleted.

Usage

delete_model(model)

Value

A list with $id (the deleted model ID) and $deleted (TRUE if successful).

Arguments

model

Character. Required. The fine-tuned model ID to delete. Fine-tuned model IDs have the format "ft:gpt-3.5-turbo:org:suffix:id".

Examples

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

result <- delete_model("ft:gpt-3.5-turbo:myorg:experiment:abc123")
if (result$deleted) cat("Model deleted successfully.\n")
}

Run the code above in your browser using DataLab