Delete a model response
client.Responses.Delete(ctx, responseID) error
DELETE/responses/{response_id}
Deletes a model response with the given ID.
Parameters
responseID string
Delete a model response
package main
import (
"context"
"github.com/openai/openai-go"
"github.com/openai/openai-go/option"
)
func main() {
client := openai.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.Responses.Delete(context.TODO(), "resp_677efb5139a88190b512bc3fef8e535d")
if err != nil {
panic(err.Error())
}
}