Skip to content

Commit 6a7a3a2

Browse files
committed
connect to index
1 parent aaebc1e commit 6a7a3a2

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

learn/experimental/merge-namespaces/merge-namespaces.ipynb

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@
2626
{
2727
"cell_type": "code",
2828
"execution_count": null,
29-
"metadata": {
30-
"vscode": {
31-
"languageId": "plaintext"
32-
}
33-
},
29+
"metadata": {},
3430
"outputs": [],
3531
"source": [
3632
"%pip install -qU pinecone-notebooks pinecone-client[grpc]"
@@ -39,11 +35,7 @@
3935
{
4036
"cell_type": "code",
4137
"execution_count": null,
42-
"metadata": {
43-
"vscode": {
44-
"languageId": "plaintext"
45-
}
46-
},
38+
"metadata": {},
4739
"outputs": [],
4840
"source": [
4941
"from pinecone.grpc import PineconeGRPC as Pinecone\n",
@@ -54,7 +46,11 @@
5446
"api_key = os.environ.get('PINECONE_API_KEY')\n",
5547
"\n",
5648
"# Use the API key to initialize the Pinecone client\n",
57-
"pc = Pinecone(api_key=api_key)"
49+
"pc = Pinecone(api_key=api_key)\n",
50+
"\n",
51+
"# Connect to your index\n",
52+
"index_name = \"namespace-test\" # replace with the correct index name\n",
53+
"index = pc.Index(index_name)"
5854
]
5955
}
6056
],

0 commit comments

Comments
 (0)