0
Describe Index
One script reply has been approved by the moderators Verified
Created by adam186 384 days ago Viewed 5702 times
0
Submitted by adam186 Deno
Verified 384 days ago
1
import { PineconeClient } from "npm:@pinecone-database/pinecone";
2

3
type Pinecone = {
4
  apiKey: string;
5
  environment: string;
6
};
7
export async function main(auth: Pinecone, index_name: string) {
8
  const client = new PineconeClient();
9
  await client.init(auth);
10
  return await client.describeIndex({ indexName: index_name });
11
}
12