Skip to content

Commit 403a8e7

Browse files
committed
modified data/json location
1 parent 0e862ad commit 403a8e7

File tree

4 files changed

+2875667
-13
lines changed

4 files changed

+2875667
-13
lines changed

Python/CosmosDB-NoSQL_VectorSearch/CosmosDB-NoSQL-Quickstart-RAG-Chatbot.ipynb

Lines changed: 86 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
},
5555
{
5656
"cell_type": "code",
57-
"execution_count": null,
57+
"execution_count": 2,
5858
"id": "1224b921-17e3-49fd-8abb-63459eeb2c28",
5959
"metadata": {},
6060
"outputs": [],
@@ -117,10 +117,19 @@
117117
},
118118
{
119119
"cell_type": "code",
120-
"execution_count": null,
120+
"execution_count": 3,
121121
"id": "305807f8-0205-481a-9d71-e8b88b504019",
122122
"metadata": {},
123-
"outputs": [],
123+
"outputs": [
124+
{
125+
"name": "stdout",
126+
"output_type": "stream",
127+
"text": [
128+
"Container with id 'vectorstore' created\n",
129+
"Container with id 'vectorcache' created\n"
130+
]
131+
}
132+
],
124133
"source": [
125134
"db = cosmos_client.create_database_if_not_exists(cosmos_database)\n",
126135
"\n",
@@ -197,7 +206,7 @@
197206
},
198207
{
199208
"cell_type": "code",
200-
"execution_count": null,
209+
"execution_count": 4,
201210
"id": "7ccf697d-f12c-4205-8a93-114ff3c3c86e",
202211
"metadata": {},
203212
"outputs": [],
@@ -227,18 +236,29 @@
227236
},
228237
{
229238
"cell_type": "code",
230-
"execution_count": null,
239+
"execution_count": 7,
231240
"id": "efc296c5-82e3-4fc1-bff5-ea62893341f8",
232241
"metadata": {},
233-
"outputs": [],
242+
"outputs": [
243+
{
244+
"data": {
245+
"text/plain": [
246+
"4489"
247+
]
248+
},
249+
"execution_count": 7,
250+
"metadata": {},
251+
"output_type": "execute_result"
252+
}
253+
],
234254
"source": [
235255
"# Unzip the data file\n",
236256
"with zipfile.ZipFile(\"../../DataSet/Movies/MovieLens-4489-256D.zip\", 'r') as zip_ref: \n",
237-
" zip_ref.extractall(\"/Data\")\n",
257+
" zip_ref.extractall(\"../../DataSet/Movies/\")\n",
238258
"zip_ref.close()\n",
239259
"# Load the data file\n",
240260
"data =[]\n",
241-
"with open('/Data/MovieLens-4489-256D.json', 'r') as d:\n",
261+
"with open('../../DataSet/Movies/MovieLens-4489-256D.json', 'r') as d:\n",
242262
" data = json.load(d)\n",
243263
"# View the number of documents in the data (4489)\n",
244264
"len(data) "
@@ -255,7 +275,7 @@
255275
},
256276
{
257277
"cell_type": "code",
258-
"execution_count": null,
278+
"execution_count": 8,
259279
"id": "f4555af4-cf1e-483f-a6e0-1d27fc139c8b",
260280
"metadata": {},
261281
"outputs": [],
@@ -267,10 +287,64 @@
267287
},
268288
{
269289
"cell_type": "code",
270-
"execution_count": null,
290+
"execution_count": 9,
271291
"id": "becc3ad5-851c-4d44-8f6d-52a368d87b83",
272292
"metadata": {},
273-
"outputs": [],
293+
"outputs": [
294+
{
295+
"name": "stdout",
296+
"output_type": "stream",
297+
"text": [
298+
"Starting doc load, please wait...\n",
299+
"Sent 100 documents for insertion into collection.\n",
300+
"Sent 200 documents for insertion into collection.\n",
301+
"Sent 300 documents for insertion into collection.\n",
302+
"Sent 400 documents for insertion into collection.\n",
303+
"Sent 500 documents for insertion into collection.\n",
304+
"Sent 600 documents for insertion into collection.\n",
305+
"Sent 700 documents for insertion into collection.\n",
306+
"Sent 800 documents for insertion into collection.\n",
307+
"Sent 900 documents for insertion into collection.\n",
308+
"Sent 1000 documents for insertion into collection.\n",
309+
"Sent 1100 documents for insertion into collection.\n",
310+
"Sent 1200 documents for insertion into collection.\n",
311+
"Sent 1300 documents for insertion into collection.\n",
312+
"Sent 1400 documents for insertion into collection.\n",
313+
"Sent 1500 documents for insertion into collection.\n",
314+
"Sent 1600 documents for insertion into collection.\n",
315+
"Sent 1700 documents for insertion into collection.\n",
316+
"Sent 1800 documents for insertion into collection.\n",
317+
"Sent 1900 documents for insertion into collection.\n",
318+
"Sent 2000 documents for insertion into collection.\n",
319+
"Sent 2100 documents for insertion into collection.\n",
320+
"Sent 2200 documents for insertion into collection.\n",
321+
"Sent 2300 documents for insertion into collection.\n",
322+
"Sent 2400 documents for insertion into collection.\n",
323+
"Sent 2500 documents for insertion into collection.\n",
324+
"Sent 2600 documents for insertion into collection.\n",
325+
"Sent 2700 documents for insertion into collection.\n",
326+
"Sent 2800 documents for insertion into collection.\n",
327+
"Sent 2900 documents for insertion into collection.\n",
328+
"Sent 3000 documents for insertion into collection.\n",
329+
"Sent 3100 documents for insertion into collection.\n",
330+
"Sent 3200 documents for insertion into collection.\n",
331+
"Sent 3300 documents for insertion into collection.\n",
332+
"Sent 3400 documents for insertion into collection.\n",
333+
"Sent 3500 documents for insertion into collection.\n",
334+
"Sent 3600 documents for insertion into collection.\n",
335+
"Sent 3700 documents for insertion into collection.\n",
336+
"Sent 3800 documents for insertion into collection.\n",
337+
"Sent 3900 documents for insertion into collection.\n",
338+
"Sent 4000 documents for insertion into collection.\n",
339+
"Sent 4100 documents for insertion into collection.\n",
340+
"Sent 4200 documents for insertion into collection.\n",
341+
"Sent 4300 documents for insertion into collection.\n",
342+
"Sent 4400 documents for insertion into collection.\n",
343+
"All 4489 documents inserted!\n",
344+
"Time taken: 92.83 seconds (92.834 milliseconds)\n"
345+
]
346+
}
347+
],
274348
"source": [
275349
"import asyncio\n",
276350
"import time\n",
@@ -623,7 +697,7 @@
623697
"name": "python",
624698
"nbconvert_exporter": "python",
625699
"pygments_lexer": "ipython3",
626-
"version": "3.12.2"
700+
"version": "3.11.0"
627701
}
628702
},
629703
"nbformat": 4,

0 commit comments

Comments
 (0)