Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Delete vector store

client.VectorStores.Delete(ctx, vectorStoreID) (*VectorStoreDeleted, error)
DELETE/vector_stores/{vector_store_id}

Delete a vector store.

ParametersExpand Collapse
vectorStoreID string
ReturnsExpand Collapse
type VectorStoreDeleted struct{…}
ID string
Deleted bool
Object VectorStoreDeleted

Delete vector store

package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  vectorStoreDeleted, err := client.VectorStores.Delete(context.TODO(), "vector_store_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", vectorStoreDeleted.ID)
}
{
  id: "vs_abc123",
  object: "vector_store.deleted",
  deleted: true
}
Returns Examples
{
  id: "vs_abc123",
  object: "vector_store.deleted",
  deleted: true
}