0

Describe Index

by
Published Apr 18, 2023
Script pinecone Verified

The script

Submitted by hugo989 Bun
Verified 6 days ago
1
import { PineconeClient } from "@pinecone-database/[email protected]";
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

Other submissions
  • Submitted by adam186 Deno
    Created 398 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