40
40
},
41
41
"outputs" : [
42
42
{
43
- "output_type" : " stream" ,
44
43
"name" : " stdout" ,
44
+ "output_type" : " stream" ,
45
45
"text" : [
46
46
" \u001b [?25l \u001b [90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b [0m \u001b [32m0.0/215.5 kB\u001b [0m \u001b [31m?\u001b [0m eta \u001b [36m-:--:--\u001b [0m\r \u001b [2K \u001b [91m━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b [0m\u001b [91m╸\u001b [0m\u001b [90m━━━━━━━━━━━━━\u001b [0m \u001b [32m143.4/215.5 kB\u001b [0m \u001b [31m4.3 MB/s\u001b [0m eta \u001b [36m0:00:01\u001b [0m\r \u001b [2K \u001b [90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b [0m \u001b [32m215.5/215.5 kB\u001b [0m \u001b [31m3.7 MB/s\u001b [0m eta \u001b [36m0:00:00\u001b [0m\n " ,
47
47
" \u001b [?25h"
67
67
},
68
68
{
69
69
"cell_type" : " code" ,
70
- "source" : [
71
- " import os\n " ,
72
- " from pinecone_notebooks.colab import Authenticate\n " ,
73
- " \n " ,
74
- " api_key = os.environ.get(\" PINECONE_API_KEY\" ) or Authenticate()"
75
- ],
70
+ "execution_count" : 3 ,
76
71
"metadata" : {
77
- "id" : " 89S8G8oP61-t" ,
78
- "outputId" : " 998abdfd-c528-4500-ff45-8344b6818e0a" ,
79
72
"colab" : {
80
73
"base_uri" : " https://localhost:8080/" ,
81
74
"height" : 247
82
- }
75
+ },
76
+ "id" : " 89S8G8oP61-t" ,
77
+ "outputId" : " 998abdfd-c528-4500-ff45-8344b6818e0a"
83
78
},
84
- "execution_count" : 3 ,
85
79
"outputs" : [
86
80
{
87
- "output_type" : " display_data" ,
88
81
"data" : {
89
- "text/plain" : [
90
- " <IPython.core.display.HTML object>"
91
- ],
92
82
"text/html" : [
93
83
" <script type=\" text/javascript\" src=\" https://connect.pinecone.io/embed.js\" ></script>"
84
+ ],
85
+ "text/plain" : [
86
+ " <IPython.core.display.HTML object>"
94
87
]
95
88
},
96
- "metadata" : {}
89
+ "metadata" : {},
90
+ "output_type" : " display_data"
97
91
}
92
+ ],
93
+ "source" : [
94
+ " import os\n " ,
95
+ " \n " ,
96
+ " if not os.environ.get(\" PINECONE_API_KEY\" ):\n " ,
97
+ " from pinecone_notebooks import Authenticate\n " ,
98
+ " Authenticate()\n " ,
99
+ " \n " ,
100
+ " api_key = os.environ.get(\" PINECONE_API_KEY\" )"
98
101
]
99
102
},
100
103
{
112
115
},
113
116
{
114
117
"cell_type" : " markdown" ,
115
- "source" : [
116
- " Now we setup our index specification, this allows us to define the cloud provider and region where we want to deploy our index."
117
- ],
118
118
"metadata" : {
119
119
"id" : " qXBdv9IG06IU"
120
- }
120
+ },
121
+ "source" : [
122
+ " Now we setup our index specification, this allows us to define the cloud provider and region where we want to deploy our index."
123
+ ]
121
124
},
122
125
{
123
126
"cell_type" : " code" ,
127
+ "execution_count" : 5 ,
128
+ "metadata" : {
129
+ "id" : " XYWFv-gw08WG"
130
+ },
131
+ "outputs" : [],
124
132
"source" : [
125
133
" from pinecone import ServerlessSpec\n " ,
126
134
" \n " ,
127
135
" cloud = os.environ.get('PINECONE_CLOUD') or 'aws'\n " ,
128
136
" region = os.environ.get('PINECONE_REGION') or 'us-east-1'\n " ,
129
137
" \n " ,
130
138
" spec = ServerlessSpec(cloud=cloud, region=region)"
131
- ],
132
- "metadata" : {
133
- "id" : " XYWFv-gw08WG"
134
- },
135
- "execution_count" : 5 ,
136
- "outputs" : []
139
+ ]
137
140
},
138
141
{
139
142
"cell_type" : " markdown" ,
150
153
},
151
154
{
152
155
"cell_type" : " code" ,
153
- "source" : [
154
- " index_name = \" docs-quickstart-notebook\" "
155
- ],
156
+ "execution_count" : 6 ,
156
157
"metadata" : {
157
158
"id" : " Buo2K1h8O_fN"
158
159
},
159
- "execution_count" : 6 ,
160
- "outputs" : []
160
+ "outputs" : [],
161
+ "source" : [
162
+ " index_name = \" docs-quickstart-notebook\" "
163
+ ]
161
164
},
162
165
{
163
166
"cell_type" : " code" ,
208
211
},
209
212
"outputs" : [
210
213
{
211
- "output_type" : " stream" ,
212
214
"name" : " stdout" ,
215
+ "output_type" : " stream" ,
213
216
"text" : [
214
217
" {'upserted_count': 3}\n " ,
215
218
" {'upserted_count': 3}\n "
275
278
},
276
279
"outputs" : [
277
280
{
278
- "output_type" : " stream" ,
279
281
"name" : " stdout" ,
282
+ "output_type" : " stream" ,
280
283
"text" : [
281
284
" {'dimension': 2,\n " ,
282
285
" 'index_fullness': 0.0,\n " ,
312
315
},
313
316
"outputs" : [
314
317
{
315
- "output_type" : " stream" ,
316
318
"name" : " stdout" ,
319
+ "output_type" : " stream" ,
317
320
"text" : [
318
321
" {'matches': [], 'namespace': 'ns1', 'usage': {'read_units': 1}}\n " ,
319
322
" {'matches': [], 'namespace': 'ns2', 'usage': {'read_units': 1}}\n "
405
408
},
406
409
"nbformat" : 4 ,
407
410
"nbformat_minor" : 0
408
- }
411
+ }
0 commit comments