diff --git a/docs/quick-tour/hello-pinecone.ipynb b/docs/quick-tour/hello-pinecone.ipynb index 93011380..571211d1 100644 --- a/docs/quick-tour/hello-pinecone.ipynb +++ b/docs/quick-tour/hello-pinecone.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "023d771c", + "id": "0", "metadata": { "id": "023d771c" }, @@ -12,7 +12,7 @@ }, { "cell_type": "markdown", - "id": "conceptual-belfast", + "id": "1", "metadata": { "editable": true, "id": "conceptual-belfast", @@ -36,7 +36,7 @@ }, { "cell_type": "markdown", - "id": "first-affairs", + "id": "2", "metadata": { "id": "first-affairs", "papermill": { @@ -54,7 +54,7 @@ }, { "cell_type": "markdown", - "id": "banned-huntington", + "id": "3", "metadata": { "editable": true, "id": "banned-huntington", @@ -76,8 +76,8 @@ }, { "cell_type": "code", - "execution_count": 1, - "id": "parallel-detective", + "execution_count": null, + "id": "4", "metadata": { "id": "parallel-detective", "papermill": { @@ -91,12 +91,19 @@ }, "outputs": [], "source": [ - "!pip install -qU pandas==2.2.3 pinecone==8.0.0" + "!pip install -qU pandas==2.2.3 pinecone==9.0.0\n", + "\n", + "import os\n", + "import random\n", + "import time\n", + "\n", + "import pandas as pd\n", + "from pinecone import AwsRegion, CloudProvider, Metric, Pinecone, ServerlessSpec" ] }, { "cell_type": "markdown", - "id": "272f3b6d", + "id": "5", "metadata": {}, "source": [ "## Getting started\n", @@ -106,14 +113,11 @@ }, { "cell_type": "code", - "execution_count": 2, - "id": "3f53fd40", + "execution_count": null, + "id": "6", "metadata": {}, "outputs": [], "source": [ - "import os\n", - "from pinecone import Pinecone\n", - "\n", "# Get your API key at app.pinecone.io\n", "api_key = os.environ.get(\"PINECONE_API_KEY\") or \"PINECONE_API_KEY\"\n", "\n", @@ -123,7 +127,7 @@ }, { "cell_type": "markdown", - "id": "forbidden-indication", + "id": "7", "metadata": { "id": "forbidden-indication", "papermill": { @@ -143,8 +147,8 @@ }, { "cell_type": "code", - "execution_count": 3, - "id": "EA2EcZsCoWS3", + "execution_count": null, + "id": "8", "metadata": { "id": "EA2EcZsCoWS3", "tags": [ @@ -159,8 +163,8 @@ }, { "cell_type": "code", - "execution_count": 4, - "id": "synthetic-essex", + "execution_count": null, + "id": "9", "metadata": { "id": "synthetic-essex", "papermill": { @@ -181,7 +185,7 @@ }, { "cell_type": "markdown", - "id": "94LRI2H8Ch2B", + "id": "10", "metadata": { "editable": true, "id": "94LRI2H8Ch2B", @@ -212,8 +216,8 @@ }, { "cell_type": "code", - "execution_count": 5, - "id": "4YwC8livCrn2", + "execution_count": null, + "id": "11", "metadata": { "id": "4YwC8livCrn2", "papermill": { @@ -225,39 +229,8 @@ }, "tags": [] }, - "outputs": [ - { - "data": { - "text/plain": [ - "{\n", - " \"name\": \"hello-pinecone\",\n", - " \"metric\": \"cosine\",\n", - " \"host\": \"hello-pinecone-dojoi3u.svc.aped-4627-b74a.pinecone.io\",\n", - " \"spec\": {\n", - " \"serverless\": {\n", - " \"cloud\": \"aws\",\n", - " \"region\": \"us-east-1\"\n", - " }\n", - " },\n", - " \"status\": {\n", - " \"ready\": true,\n", - " \"state\": \"Ready\"\n", - " },\n", - " \"vector_type\": \"dense\",\n", - " \"dimension\": 3,\n", - " \"deletion_protection\": \"disabled\",\n", - " \"tags\": null\n", - "}" - ] - }, - "execution_count": null, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ - "from pinecone import ServerlessSpec, CloudProvider, AwsRegion, Metric\n", - "\n", "pc.create_index(\n", " name=index_name,\n", " metric=Metric.COSINE,\n", @@ -268,7 +241,7 @@ }, { "cell_type": "markdown", - "id": "060bb093-fc60-4065-bb6f-529145e6f186", + "id": "12", "metadata": {}, "source": [ "We can look up the configuration for the index anytime we like by using `describe_index`" @@ -276,39 +249,10 @@ }, { "cell_type": "code", - "execution_count": 6, - "id": "eeb2f680-7250-4117-bdbb-b19fc36d476b", + "execution_count": null, + "id": "13", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{\n", - " \"name\": \"hello-pinecone\",\n", - " \"metric\": \"cosine\",\n", - " \"host\": \"hello-pinecone-dojoi3u.svc.aped-4627-b74a.pinecone.io\",\n", - " \"spec\": {\n", - " \"serverless\": {\n", - " \"cloud\": \"aws\",\n", - " \"region\": \"us-east-1\"\n", - " }\n", - " },\n", - " \"status\": {\n", - " \"ready\": true,\n", - " \"state\": \"Ready\"\n", - " },\n", - " \"vector_type\": \"dense\",\n", - " \"dimension\": 3,\n", - " \"deletion_protection\": \"disabled\",\n", - " \"tags\": null\n", - "}" - ] - }, - "execution_count": null, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "description = pc.describe_index(name=index_name)\n", "description" @@ -316,7 +260,7 @@ }, { "cell_type": "markdown", - "id": "j1F8SLx6C2HH", + "id": "14", "metadata": { "id": "j1F8SLx6C2HH", "papermill": { @@ -336,8 +280,8 @@ }, { "cell_type": "code", - "execution_count": 7, - "id": "toy-VhU4LO_O", + "execution_count": null, + "id": "15", "metadata": { "id": "toy-VhU4LO_O", "papermill": { @@ -357,8 +301,8 @@ }, { "cell_type": "code", - "execution_count": 8, - "id": "indirect-lafayette", + "execution_count": null, + "id": "16", "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -375,80 +319,8 @@ }, "tags": [] }, - "outputs": [ - { - "data": { - "text/html": [ - "
| \n", - " | id | \n", - "vector | \n", - "
|---|---|---|
| 0 | \n", - "id-0 | \n", - "[0.19415077620011345, 0.12315138914527213, 0.9... | \n", - "
| 1 | \n", - "id-1 | \n", - "[0.8274728097660323, 0.8350750339818135, 0.961... | \n", - "
| 2 | \n", - "id-2 | \n", - "[0.9630530808168708, 0.46559222532176947, 0.04... | \n", - "
| 3 | \n", - "id-3 | \n", - "[0.5879443851815274, 0.5590457108385455, 0.924... | \n", - "
| 4 | \n", - "id-4 | \n", - "[0.6104298712136548, 0.2665978264705289, 0.858... | \n", - "