diff --git a/.env.example b/.env.example index 85bc4319d..9b2289d6b 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,5 @@ OPENAI_API_KEY= # Update these with your pinecone details from your dashboard. # PINECONE_INDEX_NAME is in the indexes tab under "index name" in blue -# PINECONE_ENVIRONMENT is in indexes tab under "Environment". Example: "us-east1-gcp" PINECONE_API_KEY= -PINECONE_ENVIRONMENT= PINECONE_INDEX_NAME= diff --git a/README.md b/README.md index 7aa720bc7..f4ed1ab91 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,6 @@ After installation, you should now see a `node_modules` folder. OPENAI_API_KEY= PINECONE_API_KEY= -PINECONE_ENVIRONMENT= PINECONE_INDEX_NAME= diff --git a/package.json b/package.json index 0c3498b71..b2bda1fa4 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@microsoft/fetch-event-source": "^2.0.1", - "@pinecone-database/pinecone": "1.1.0", + "@pinecone-database/pinecone": "3.0.2", "@radix-ui/react-accordion": "^1.1.1", "clsx": "^1.2.1", "dotenv": "^16.0.3", diff --git a/utils/pinecone-client.ts b/utils/pinecone-client.ts index 7f5b6c3fd..8c5c6e9ea 100644 --- a/utils/pinecone-client.ts +++ b/utils/pinecone-client.ts @@ -1,13 +1,12 @@ import { Pinecone } from '@pinecone-database/pinecone'; -if (!process.env.PINECONE_ENVIRONMENT || !process.env.PINECONE_API_KEY) { - throw new Error('Pinecone environment or api key vars missing'); +if (!process.env.PINECONE_API_KEY) { + throw new Error('Pinecone api key var missing'); } async function initPinecone() { try { const pinecone = new Pinecone({ - environment: process.env.PINECONE_ENVIRONMENT ?? '', //this is in the dashboard apiKey: process.env.PINECONE_API_KEY ?? '', });