Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
neon-sunset committed May 18, 2024
1 parent 734c43b commit b24c968
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ Working with indexes
```csharp
using Pinecone;

// Initialize the client with your API key and environment
var apiKey = "your-api-key";
var environment = "your-environment"; // for example us-east4-gcp
using var pinecone = new PineconeClient(apiKey, environment);
// Initialize the client with your API key
using var pinecone = new PineconeClient("your-api-key");

// List all indexes
var indexes = await pinecone.ListIndexes();
Expand All @@ -34,7 +31,7 @@ var indexes = await pinecone.ListIndexes();
var indexName = "myIndex";
if (!indexes.Contains(indexName))
{
await pinecone.CreateIndex(indexName, 1536, Metric.Cosine);
await pinecone.CreateServerlessIndex(indexName, 1536, Metric.Cosine, "aws", "us-east-1");
}

// Get the Pinecone index by name (uses gRPC by default).
Expand Down

0 comments on commit b24c968

Please sign in to comment.