From 3c27b737660ef970bd66039d81efa094f762c121 Mon Sep 17 00:00:00 2001 From: jlinsdell Date: Mon, 13 May 2024 10:08:46 -0400 Subject: [PATCH 1/3] Adding Cohere source attribution --- .../Embed_Jobs_Serverless_Pinecone_Semantic_Search.ipynb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/notebooks/Embed_Jobs_Serverless_Pinecone_Semantic_Search.ipynb b/notebooks/Embed_Jobs_Serverless_Pinecone_Semantic_Search.ipynb index 4b855925..e64336cf 100644 --- a/notebooks/Embed_Jobs_Serverless_Pinecone_Semantic_Search.ipynb +++ b/notebooks/Embed_Jobs_Serverless_Pinecone_Semantic_Search.ipynb @@ -50,7 +50,10 @@ "from pinecone import Pinecone\n", "\n", "co = cohere.Client('COHERE_API_KEY')\n", - "pc = Pinecone(api_key=('PINECONE_API_KEY'))" + "pc = Pinecone(\n", + " api_key=\"PINECONE_API_KEY\", \n", + " source_tag=\"cohere\"\n", + ")" ] }, { From 88c6b0babc2ce27974a2d7227e6ed46d181f7e43 Mon Sep 17 00:00:00 2001 From: jlinsdell Date: Mon, 13 May 2024 10:17:23 -0400 Subject: [PATCH 2/3] Set pinecone sdk to 3.2.1 or higher to support source_tag --- ...s_Serverless_Pinecone_Semantic_Search.ipynb | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/notebooks/Embed_Jobs_Serverless_Pinecone_Semantic_Search.ipynb b/notebooks/Embed_Jobs_Serverless_Pinecone_Semantic_Search.ipynb index e64336cf..656d9bcd 100644 --- a/notebooks/Embed_Jobs_Serverless_Pinecone_Semantic_Search.ipynb +++ b/notebooks/Embed_Jobs_Serverless_Pinecone_Semantic_Search.ipynb @@ -15,10 +15,21 @@ "metadata": { "id": "Fdhi1O4lrqaV" }, - "outputs": [], + "outputs": [ + { + "ename": "", + "evalue": "", + "output_type": "error", + "traceback": [ + "\u001b[1;31mRunning cells with 'Python 3.11.6' requires the ipykernel package.\n", + "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n", + "\u001b[1;31mCommand: '/opt/homebrew/bin/python3 -m pip install ipykernel -U --user --force-reinstall'" + ] + } + ], "source": [ "# TODO: upgrade to \"cohere>5\"\n", - "! pip install \"cohere<5\" pinecone-client==3.0.0.dev3 -q" + "! pip install \"cohere<5\" \"pinecone-client>3.2.1\"" ] }, { @@ -555,7 +566,8 @@ "name": "python3" }, "language_info": { - "name": "python" + "name": "python", + "version": "3.11.6" } }, "nbformat": 4, From 75815e8c7451938f4d6340d53fb9d4cf0c0832aa Mon Sep 17 00:00:00 2001 From: jlinsdell Date: Mon, 13 May 2024 10:18:46 -0400 Subject: [PATCH 3/3] Remove junk output --- ...d_Jobs_Serverless_Pinecone_Semantic_Search.ipynb | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/notebooks/Embed_Jobs_Serverless_Pinecone_Semantic_Search.ipynb b/notebooks/Embed_Jobs_Serverless_Pinecone_Semantic_Search.ipynb index 656d9bcd..4a3ff53b 100644 --- a/notebooks/Embed_Jobs_Serverless_Pinecone_Semantic_Search.ipynb +++ b/notebooks/Embed_Jobs_Serverless_Pinecone_Semantic_Search.ipynb @@ -15,18 +15,7 @@ "metadata": { "id": "Fdhi1O4lrqaV" }, - "outputs": [ - { - "ename": "", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[1;31mRunning cells with 'Python 3.11.6' requires the ipykernel package.\n", - "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n", - "\u001b[1;31mCommand: '/opt/homebrew/bin/python3 -m pip install ipykernel -U --user --force-reinstall'" - ] - } - ], + "outputs": [], "source": [ "# TODO: upgrade to \"cohere>5\"\n", "! pip install \"cohere<5\" \"pinecone-client>3.2.1\""