1
import { PineconeClient } from "npm:@pinecone-database/pinecone";
2
3
type Pinecone = {
4
apiKey: string;
5
environment: string;
6
};
7
export async function main(
8
auth: Pinecone,
9
index_name: string,
10
namespace?: string,
11
) {
12
const client = new PineconeClient();
13
await client.init(auth);
14
const index = client.Index(index_name);
15
16
return await index.delete1({
17
deleteAll: true,
18
namespace,
19
});
20
}
21