Skip to content

Commit 8aab26b

Browse files
authored
Merge pull request #360 from junefish/ecommerce-connect
add connect widget
2 parents 7265960 + e97a209 commit 8aab26b

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

learn/search/hybrid-search/ecommerce-search/ecommerce-search.ipynb

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
},
4646
{
4747
"cell_type": "code",
48-
"execution_count": 52,
48+
"execution_count": 1,
4949
"metadata": {
5050
"colab": {
5151
"base_uri": "https://localhost:8080/"
@@ -65,7 +65,8 @@
6565
],
6666
"source": [
6767
"!pip install -qU datasets transformers sentence-transformers \\\n",
68-
" pinecone-client==3.1.0 pinecone-text"
68+
" pinecone-client==3.1.0 pinecone-text \\\n",
69+
" pinecone-notebooks"
6970
]
7071
},
7172
{
@@ -83,7 +84,25 @@
8384
"id": "AwPHT3yIdn5y"
8485
},
8586
"source": [
86-
"Let's initiate a connection and create an index. For this, we need a [free API key](https://app.pinecone.io/), and then we initialize the connection like so:"
87+
"Let's initiate a connection and create an index. For this, we need to create or login to a Pinecone account and create an API key:"
88+
]
89+
},
90+
{
91+
"cell_type": "code",
92+
"execution_count": null,
93+
"metadata": {},
94+
"outputs": [],
95+
"source": [
96+
"from pinecone_notebooks.colab import Authenticate\n",
97+
"\n",
98+
"Authenticate()"
99+
]
100+
},
101+
{
102+
"cell_type": "markdown",
103+
"metadata": {},
104+
"source": [
105+
"The API key has been saved to the `PINECONE_API_KEY` environment variable and is ready for us to use to initialize a collection like so:"
87106
]
88107
},
89108
{
@@ -97,8 +116,8 @@
97116
"import os\n",
98117
"from pinecone import Pinecone\n",
99118
"\n",
100-
"# initialize connection to pinecone (get API key at app.pinecone.io)\n",
101-
"api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n",
119+
"# initialize connection to pinecone\n",
120+
"api_key = os.environ.get('PINECONE_API_KEY') \n",
102121
"\n",
103122
"# configure client\n",
104123
"pc = Pinecone(api_key=api_key)"
@@ -2541,7 +2560,7 @@
25412560
"name": "python",
25422561
"nbconvert_exporter": "python",
25432562
"pygments_lexer": "ipython3",
2544-
"version": "3.9.12"
2563+
"version": "3.11.6"
25452564
},
25462565
"vscode": {
25472566
"interpreter": {

0 commit comments

Comments
 (0)