File tree Expand file tree Collapse file tree 9 files changed +298
-251
lines changed Expand file tree Collapse file tree 9 files changed +298
-251
lines changed Original file line number Diff line number Diff line change 65
65
" openai==0.27.7 \\\n " ,
66
66
" pinecone-client==3.1.0 \\\n " ,
67
67
" pinecone-datasets==0.7.0 \\\n " ,
68
- " tqdm"
68
+ " tqdm \\\n " ,
69
+ " pinecone-notebooks==0.1.1"
69
70
]
70
71
},
71
72
{
449
450
" import os\n " ,
450
451
" from pinecone import Pinecone\n " ,
451
452
" \n " ,
452
- " # initialize connection to pinecone (get API key at app.pinecone.io)\n " ,
453
- " api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n " ,
453
+ " # initialize connection to pinecone (or get API key at app.pinecone.io)\n " ,
454
+ " if not os.environ.get(\" PINECONE_API_KEY\" ):\n " ,
455
+ " from pinecone_notebooks.colab import Authenticate\n " ,
456
+ " Authenticate()\n " ,
457
+ " \n " ,
458
+ " api_key = os.environ.get(\" PINECONE_API_KEY\" )\n " ,
454
459
" \n " ,
455
460
" # configure client\n " ,
456
461
" pc = Pinecone(api_key=api_key)"
Original file line number Diff line number Diff line change 62
62
" !pip install -qU \\\n " ,
63
63
" openai==0.27.7 \\\n " ,
64
64
" pinecone-client==3.1.0 \\\n " ,
65
- " pinecone-datasets==0.7.0"
65
+ " pinecone-datasets==0.7.0 \\\n " ,
66
+ " pinecone-notebooks==0.1.1"
66
67
]
67
68
},
68
69
{
335
336
" import os\n " ,
336
337
" from pinecone import Pinecone\n " ,
337
338
" \n " ,
338
- " # initialize connection to pinecone (get API key at app.pinecone.io)\n " ,
339
- " api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n " ,
339
+ " # initialize connection to pinecone (or get API key at app.pinecone.io)\n " ,
340
+ " if not os.environ.get(\" PINECONE_API_KEY\" ):\n " ,
341
+ " from pinecone_notebooks.colab import Authenticate\n " ,
342
+ " Authenticate()\n " ,
343
+ " \n " ,
344
+ " api_key = os.environ.get(\" PINECONE_API_KEY\" )\n " ,
340
345
" \n " ,
341
346
" # configure client\n " ,
342
347
" pc = Pinecone(api_key=api_key)"
Original file line number Diff line number Diff line change 84
84
"source" : [
85
85
" !pip install -qU \\\n " ,
86
86
" pinecone-client==3.1.0 \\\n " ,
87
- " pinecone-datasets==0.7.0"
87
+ " pinecone-datasets==0.7.0 \\\n " ,
88
+ " pinecone-notebooks==0.1.1"
88
89
]
89
90
},
90
91
{
105
106
" import os\n " ,
106
107
" from pinecone import Pinecone\n " ,
107
108
" \n " ,
108
- " # initialize connection to pinecone (get API key at app.pinecone.io)\n " ,
109
- " api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n " ,
109
+ " # initialize connection to pinecone (orget API key at app.pinecone.io)\n " ,
110
+ " if not os.environ.get(\" PINECONE_API_KEY\" ):\n " ,
111
+ " from pinecone_notebooks.colab import Authenticate\n " ,
112
+ " Authenticate()\n " ,
113
+ " \n " ,
114
+ " api_key = os.environ.get(\" PINECONE_API_KEY\" )\n " ,
110
115
" \n " ,
111
116
" # configure client\n " ,
112
117
" pc = Pinecone(api_key=api_key)"
Original file line number Diff line number Diff line change 52
52
" pinecone-datasets==0.7.0 \\\n " ,
53
53
" langchain==0.1.1 \\\n " ,
54
54
" langchain-community==0.0.13 \\\n " ,
55
- " tiktoken==0.4.0"
55
+ " tiktoken==0.4.0 \\\n " ,
56
+ " pinecone-notebooks==0.1.1"
56
57
]
57
58
},
58
59
{
517
518
" import os\n " ,
518
519
" from pinecone import Pinecone\n " ,
519
520
" \n " ,
520
- " # initialize connection to pinecone (get API key at app.pinecone.io)\n " ,
521
- " api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n " ,
521
+ " # initialize connection to pinecone (orget API key at app.pinecone.io)\n " ,
522
+ " if not os.environ.get(\" PINECONE_API_KEY\" ):\n " ,
523
+ " from pinecone_notebooks.colab import Authenticate\n " ,
524
+ " Authenticate()\n " ,
525
+ " \n " ,
526
+ " api_key = os.environ.get(\" PINECONE_API_KEY\" )\n " ,
522
527
" \n " ,
523
528
" # configure client\n " ,
524
529
" pc = Pinecone(api_key=api_key)"
Original file line number Diff line number Diff line change 46
46
" openai==0.27.7 \\\n " ,
47
47
" tiktoken==0.4.0 \\\n " ,
48
48
" pinecone-client==3.1.0 \\\n " ,
49
- " pinecone-datasets==0.7.0"
49
+ " pinecone-datasets==0.7.0 \\\n " ,
50
+ " pinecone-notebooks==0.1.1"
50
51
]
51
52
},
52
53
{
167
168
" import os\n " ,
168
169
" from pinecone import Pinecone\n " ,
169
170
" \n " ,
170
- " # initialize connection to pinecone (get API key at app.pinecone.io)\n " ,
171
- " api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n " ,
171
+ " # initialize connection to pinecone (orget API key at app.pinecone.io)\n " ,
172
+ " if not os.environ.get(\" PINECONE_API_KEY\" ):\n " ,
173
+ " from pinecone_notebooks.colab import Authenticate\n " ,
174
+ " Authenticate()\n " ,
175
+ " \n " ,
176
+ " api_key = os.environ.get(\" PINECONE_API_KEY\" )\n " ,
172
177
" \n " ,
173
178
" # configure client\n " ,
174
179
" pc = Pinecone(api_key=api_key)"
Original file line number Diff line number Diff line change 117
117
" pinecone-client==3.1.0 \\\n " ,
118
118
" pinecone-datasets==0.7.0 \\\n " ,
119
119
" transformers==4.30.2 \\\n " ,
120
- " tensorflow==2.11.1"
120
+ " tensorflow==2.11.1 \\\n " ,
121
+ " pinecone-notebooks==0.1.1"
121
122
]
122
123
},
123
124
{
805
806
" import os\n " ,
806
807
" from pinecone import Pinecone\n " ,
807
808
" \n " ,
808
- " # initialize connection to pinecone (get API key at app.pinecone.io)\n " ,
809
- " api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n " ,
809
+ " # initialize connection to pinecone (orget API key at app.pinecone.io)\n " ,
810
+ " if not os.environ.get(\" PINECONE_API_KEY\" ):\n " ,
811
+ " from pinecone_notebooks.colab import Authenticate\n " ,
812
+ " Authenticate()\n " ,
813
+ " \n " ,
814
+ " api_key = os.environ.get(\" PINECONE_API_KEY\" )\n " ,
810
815
" \n " ,
811
816
" # configure client\n " ,
812
817
" pc = Pinecone(api_key=api_key)"
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 50
50
}
51
51
],
52
52
"source" : [
53
- " !pip install \" pinecone-client[grpc]==3.1.0\" "
53
+ " !pip install -qU \\\n " ,
54
+ " \" pinecone-client[grpc]==3.1.0\" \\\n " ,
55
+ " pinecone-notebooks==0.1.1"
54
56
]
55
57
},
56
58
{
102
104
" import os\n " ,
103
105
" from pinecone.grpc import PineconeGRPC\n " ,
104
106
" \n " ,
105
- " # initialize connection to pinecone (get API key at app.pinecone.io)\n " ,
106
- " api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n " ,
107
+ " # initialize connection to pinecone (orget API key at app.pinecone.io)\n " ,
108
+ " if not os.environ.get(\" PINECONE_API_KEY\" ):\n " ,
109
+ " from pinecone_notebooks.colab import Authenticate\n " ,
110
+ " Authenticate()\n " ,
111
+ " \n " ,
112
+ " api_key = os.environ.get(\" PINECONE_API_KEY\" )\n " ,
107
113
" \n " ,
108
114
" # configure GRPC client\n " ,
109
115
" pc = PineconeGRPC(api_key=api_key)"
Original file line number Diff line number Diff line change 60
60
" !pip install -qU \\\n " ,
61
61
" pinecone-client==3.1.0 \\\n " ,
62
62
" pinecone-datasets==0.7.0 \\\n " ,
63
- " sentence-transformers==2.2.2"
63
+ " sentence-transformers==2.2.2 \\\n " ,
64
+ " pinecone-notebooks==0.1.1"
64
65
]
65
66
},
66
67
{
473
474
" import os\n " ,
474
475
" from pinecone import Pinecone\n " ,
475
476
" \n " ,
476
- " # initialize connection to pinecone (get API key at app.pinecone.io)\n " ,
477
- " api_key = os.environ.get('PINECONE_API_KEY') or 'PINECONE_API_KEY'\n " ,
477
+ " # initialize connection to pinecone (orget API key at app.pinecone.io)\n " ,
478
+ " if not os.environ.get(\" PINECONE_API_KEY\" ):\n " ,
479
+ " from pinecone_notebooks.colab import Authenticate\n " ,
480
+ " Authenticate()\n " ,
481
+ " \n " ,
482
+ " api_key = os.environ.get(\" PINECONE_API_KEY\" )\n " ,
478
483
" \n " ,
479
484
" # configure client\n " ,
480
485
" pc = Pinecone(api_key=api_key)"
You can’t perform that action at this time.
0 commit comments