Edits history of script submission #22491 for ' Delete All Vectors (pinecone)'

  • bun
    One script reply has been approved by the moderators
    Ap­pro­ved
    import { PineconeClient } from "@pinecone-database/[email protected]";
    
    type Pinecone = {
      apiKey: string;
      environment: string;
    };
    export async function main(
      auth: Pinecone,
      index_name: string,
      namespace?: string,
    ) {
      const client = new PineconeClient();
      await client.init(auth);
      const index = client.Index(index_name);
    
      return await index.delete1({
        deleteAll: true,
        namespace,
      });
    }
    

    Submitted by hugo989 6 days ago