Skip to content

Commit 1f95d2e

Browse files
committed
feat: add pinecone-connect to docs
1 parent 7c0b4a7 commit 1f95d2e

9 files changed

+298
-251
lines changed

docs/gen-qa-openai.ipynb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
" openai==0.27.7 \\\n",
6666
" pinecone-client==3.1.0 \\\n",
6767
" pinecone-datasets==0.7.0 \\\n",
68-
" tqdm"
68+
" tqdm \\\n",
69+
" pinecone-notebooks==0.1.1"
6970
]
7071
},
7172
{
@@ -449,8 +450,12 @@
449450
"import os\n",
450451
"from pinecone import Pinecone\n",
451452
"\n",
452-
"# initialize connection to pinecone (get API key at app.pinecone.io)\n",
453-
"api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n",
453+
"# initialize connection to pinecone (or get API key at app.pinecone.io)\n",
454+
"if not os.environ.get(\"PINECONE_API_KEY\"):\n",
455+
" from pinecone_notebooks.colab import Authenticate\n",
456+
" Authenticate()\n",
457+
"\n",
458+
"api_key = os.environ.get(\"PINECONE_API_KEY\")\n",
454459
"\n",
455460
"# configure client\n",
456461
"pc = Pinecone(api_key=api_key)"

docs/gpt-4-langchain-docs.ipynb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@
6262
"!pip install -qU \\\n",
6363
" openai==0.27.7 \\\n",
6464
" pinecone-client==3.1.0 \\\n",
65-
" pinecone-datasets==0.7.0"
65+
" pinecone-datasets==0.7.0 \\\n",
66+
" pinecone-notebooks==0.1.1"
6667
]
6768
},
6869
{
@@ -335,8 +336,12 @@
335336
"import os\n",
336337
"from pinecone import Pinecone\n",
337338
"\n",
338-
"# initialize connection to pinecone (get API key at app.pinecone.io)\n",
339-
"api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n",
339+
"# initialize connection to pinecone (or get API key at app.pinecone.io)\n",
340+
"if not os.environ.get(\"PINECONE_API_KEY\"):\n",
341+
" from pinecone_notebooks.colab import Authenticate\n",
342+
" Authenticate()\n",
343+
"\n",
344+
"api_key = os.environ.get(\"PINECONE_API_KEY\")\n",
340345
"\n",
341346
"# configure client\n",
342347
"pc = Pinecone(api_key=api_key)"

docs/it-threat-detection.ipynb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@
8484
"source": [
8585
"!pip install -qU \\\n",
8686
" pinecone-client==3.1.0 \\\n",
87-
" pinecone-datasets==0.7.0"
87+
" pinecone-datasets==0.7.0 \\\n",
88+
" pinecone-notebooks==0.1.1"
8889
]
8990
},
9091
{
@@ -105,8 +106,12 @@
105106
"import os\n",
106107
"from pinecone import Pinecone\n",
107108
"\n",
108-
"# initialize connection to pinecone (get API key at app.pinecone.io)\n",
109-
"api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n",
109+
"# initialize connection to pinecone (orget API key at app.pinecone.io)\n",
110+
"if not os.environ.get(\"PINECONE_API_KEY\"):\n",
111+
" from pinecone_notebooks.colab import Authenticate\n",
112+
" Authenticate()\n",
113+
"\n",
114+
"api_key = os.environ.get(\"PINECONE_API_KEY\")\n",
110115
"\n",
111116
"# configure client\n",
112117
"pc = Pinecone(api_key=api_key)"

docs/langchain-retrieval-agent.ipynb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
" pinecone-datasets==0.7.0 \\\n",
5353
" langchain==0.1.1 \\\n",
5454
" langchain-community==0.0.13 \\\n",
55-
" tiktoken==0.4.0"
55+
" tiktoken==0.4.0 \\\n",
56+
" pinecone-notebooks==0.1.1"
5657
]
5758
},
5859
{
@@ -517,8 +518,12 @@
517518
"import os\n",
518519
"from pinecone import Pinecone\n",
519520
"\n",
520-
"# initialize connection to pinecone (get API key at app.pinecone.io)\n",
521-
"api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n",
521+
"# initialize connection to pinecone (orget API key at app.pinecone.io)\n",
522+
"if not os.environ.get(\"PINECONE_API_KEY\"):\n",
523+
" from pinecone_notebooks.colab import Authenticate\n",
524+
" Authenticate()\n",
525+
"\n",
526+
"api_key = os.environ.get(\"PINECONE_API_KEY\")\n",
522527
"\n",
523528
"# configure client\n",
524529
"pc = Pinecone(api_key=api_key)"

docs/langchain-retrieval-augmentation.ipynb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
" openai==0.27.7 \\\n",
4747
" tiktoken==0.4.0 \\\n",
4848
" pinecone-client==3.1.0 \\\n",
49-
" pinecone-datasets==0.7.0"
49+
" pinecone-datasets==0.7.0 \\\n",
50+
" pinecone-notebooks==0.1.1"
5051
]
5152
},
5253
{
@@ -167,8 +168,12 @@
167168
"import os\n",
168169
"from pinecone import Pinecone\n",
169170
"\n",
170-
"# initialize connection to pinecone (get API key at app.pinecone.io)\n",
171-
"api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n",
171+
"# initialize connection to pinecone (orget API key at app.pinecone.io)\n",
172+
"if not os.environ.get(\"PINECONE_API_KEY\"):\n",
173+
" from pinecone_notebooks.colab import Authenticate\n",
174+
" Authenticate()\n",
175+
"\n",
176+
"api_key = os.environ.get(\"PINECONE_API_KEY\")\n",
172177
"\n",
173178
"# configure client\n",
174179
"pc = Pinecone(api_key=api_key)"

docs/onboarding-recommender.ipynb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@
117117
" pinecone-client==3.1.0 \\\n",
118118
" pinecone-datasets==0.7.0 \\\n",
119119
" transformers==4.30.2 \\\n",
120-
" tensorflow==2.11.1"
120+
" tensorflow==2.11.1 \\\n",
121+
" pinecone-notebooks==0.1.1"
121122
]
122123
},
123124
{
@@ -805,8 +806,12 @@
805806
"import os\n",
806807
"from pinecone import Pinecone\n",
807808
"\n",
808-
"# initialize connection to pinecone (get API key at app.pinecone.io)\n",
809-
"api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n",
809+
"# initialize connection to pinecone (orget API key at app.pinecone.io)\n",
810+
"if not os.environ.get(\"PINECONE_API_KEY\"):\n",
811+
" from pinecone_notebooks.colab import Authenticate\n",
812+
" Authenticate()\n",
813+
"\n",
814+
"api_key = os.environ.get(\"PINECONE_API_KEY\")\n",
810815
"\n",
811816
"# configure client\n",
812817
"pc = Pinecone(api_key=api_key)"

docs/rag-getting-started.ipynb

Lines changed: 233 additions & 227 deletions
Large diffs are not rendered by default.

docs/read-units-demonstrated.ipynb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@
5050
}
5151
],
5252
"source": [
53-
"!pip install \"pinecone-client[grpc]==3.1.0\""
53+
"!pip install -qU \\\n",
54+
" \"pinecone-client[grpc]==3.1.0\" \\\n",
55+
" pinecone-notebooks==0.1.1"
5456
]
5557
},
5658
{
@@ -102,8 +104,12 @@
102104
"import os\n",
103105
"from pinecone.grpc import PineconeGRPC\n",
104106
"\n",
105-
"# initialize connection to pinecone (get API key at app.pinecone.io)\n",
106-
"api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n",
107+
"# initialize connection to pinecone (orget API key at app.pinecone.io)\n",
108+
"if not os.environ.get(\"PINECONE_API_KEY\"):\n",
109+
" from pinecone_notebooks.colab import Authenticate\n",
110+
" Authenticate()\n",
111+
"\n",
112+
"api_key = os.environ.get(\"PINECONE_API_KEY\")\n",
107113
"\n",
108114
"# configure GRPC client\n",
109115
"pc = PineconeGRPC(api_key=api_key)"

docs/semantic-search.ipynb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
"!pip install -qU \\\n",
6161
" pinecone-client==3.1.0 \\\n",
6262
" pinecone-datasets==0.7.0 \\\n",
63-
" sentence-transformers==2.2.2"
63+
" sentence-transformers==2.2.2 \\\n",
64+
" pinecone-notebooks==0.1.1"
6465
]
6566
},
6667
{
@@ -473,8 +474,12 @@
473474
"import os\n",
474475
"from pinecone import Pinecone\n",
475476
"\n",
476-
"# initialize connection to pinecone (get API key at app.pinecone.io)\n",
477-
"api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n",
477+
"# initialize connection to pinecone (orget API key at app.pinecone.io)\n",
478+
"if not os.environ.get(\"PINECONE_API_KEY\"):\n",
479+
" from pinecone_notebooks.colab import Authenticate\n",
480+
" Authenticate()\n",
481+
"\n",
482+
"api_key = os.environ.get(\"PINECONE_API_KEY\")\n",
478483
"\n",
479484
"# configure client\n",
480485
"pc = Pinecone(api_key=api_key)"

0 commit comments

Comments
 (0)