Skip to content

Commit 627a11c

Browse files
fix syntax (#1380)
1 parent f9a0459 commit 627a11c

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

examples/vector_databases/qdrant/Using_Qdrant_for_embeddings_search.ipynb

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343
{
4444
"cell_type": "code",
45-
"execution_count": 1,
45+
"execution_count": null,
4646
"id": "8d8810f9",
4747
"metadata": {},
4848
"outputs": [],
@@ -53,7 +53,7 @@
5353
},
5454
{
5555
"cell_type": "code",
56-
"execution_count": 2,
56+
"execution_count": 23,
5757
"id": "5be94df6",
5858
"metadata": {
5959
"ExecuteTime": {
@@ -90,7 +90,7 @@
9090
},
9191
{
9292
"cell_type": "code",
93-
"execution_count": 3,
93+
"execution_count": 24,
9494
"id": "5dff8b55",
9595
"metadata": {
9696
"ExecuteTime": {
@@ -112,7 +112,7 @@
112112
},
113113
{
114114
"cell_type": "code",
115-
"execution_count": 4,
115+
"execution_count": 25,
116116
"id": "21097972",
117117
"metadata": {
118118
"ExecuteTime": {
@@ -129,7 +129,7 @@
129129
},
130130
{
131131
"cell_type": "code",
132-
"execution_count": 5,
132+
"execution_count": 26,
133133
"id": "70bbd8ba",
134134
"metadata": {
135135
"ExecuteTime": {
@@ -144,7 +144,7 @@
144144
},
145145
{
146146
"cell_type": "code",
147-
"execution_count": 6,
147+
"execution_count": 27,
148148
"id": "1721e45d",
149149
"metadata": {
150150
"ExecuteTime": {
@@ -268,7 +268,7 @@
268268
"4 [0.021524671465158463, 0.018522677943110466, -... 4 "
269269
]
270270
},
271-
"execution_count": 92,
271+
"execution_count": 27,
272272
"metadata": {},
273273
"output_type": "execute_result"
274274
}
@@ -279,7 +279,7 @@
279279
},
280280
{
281281
"cell_type": "code",
282-
"execution_count": 7,
282+
"execution_count": 28,
283283
"id": "960b82af",
284284
"metadata": {
285285
"ExecuteTime": {
@@ -299,7 +299,7 @@
299299
},
300300
{
301301
"cell_type": "code",
302-
"execution_count": 8,
302+
"execution_count": 29,
303303
"id": "a334ab8b",
304304
"metadata": {
305305
"ExecuteTime": {
@@ -364,7 +364,7 @@
364364
},
365365
{
366366
"cell_type": "code",
367-
"execution_count": 9,
367+
"execution_count": 30,
368368
"id": "76d697e9",
369369
"metadata": {
370370
"ExecuteTime": {
@@ -379,7 +379,7 @@
379379
},
380380
{
381381
"cell_type": "code",
382-
"execution_count": 10,
382+
"execution_count": 31,
383383
"id": "1deeb539",
384384
"metadata": {
385385
"ExecuteTime": {
@@ -391,10 +391,10 @@
391391
{
392392
"data": {
393393
"text/plain": [
394-
"CollectionsResponse(collections=[])"
394+
"CollectionsResponse(collections=[CollectionDescription(name='Articles')])"
395395
]
396396
},
397-
"execution_count": 96,
397+
"execution_count": 31,
398398
"metadata": {},
399399
"output_type": "execute_result"
400400
}
@@ -417,7 +417,7 @@
417417
},
418418
{
419419
"cell_type": "code",
420-
"execution_count": 11,
420+
"execution_count": 32,
421421
"id": "1a84ee1d",
422422
"metadata": {
423423
"ExecuteTime": {
@@ -432,7 +432,7 @@
432432
},
433433
{
434434
"cell_type": "code",
435-
"execution_count": 12,
435+
"execution_count": 33,
436436
"id": "00876f92",
437437
"metadata": {
438438
"ExecuteTime": {
@@ -447,7 +447,7 @@
447447
"True"
448448
]
449449
},
450-
"execution_count": 98,
450+
"execution_count": 33,
451451
"metadata": {},
452452
"output_type": "execute_result"
453453
}
@@ -474,7 +474,7 @@
474474
},
475475
{
476476
"cell_type": "code",
477-
"execution_count": 13,
477+
"execution_count": 34,
478478
"id": "9f39a8c395554ca3",
479479
"metadata": {
480480
"ExecuteTime": {
@@ -489,7 +489,7 @@
489489
"True"
490490
]
491491
},
492-
"execution_count": 99,
492+
"execution_count": 34,
493493
"metadata": {},
494494
"output_type": "execute_result"
495495
}
@@ -522,7 +522,7 @@
522522
},
523523
{
524524
"cell_type": "code",
525-
"execution_count": 14,
525+
"execution_count": 35,
526526
"id": "f24e76ab",
527527
"metadata": {
528528
"ExecuteTime": {
@@ -535,7 +535,7 @@
535535
"name": "stderr",
536536
"output_type": "stream",
537537
"text": [
538-
"Upserting articles: 100%|██████████| 25000/25000 [01:34<00:00, 264.52it/s]\n"
538+
"Upserting articles: 100%|██████████| 25000/25000 [01:18<00:00, 318.84it/s]\n"
539539
]
540540
}
541541
],
@@ -568,7 +568,7 @@
568568
},
569569
{
570570
"cell_type": "code",
571-
"execution_count": 15,
571+
"execution_count": 36,
572572
"id": "d1188a12",
573573
"metadata": {
574574
"ExecuteTime": {
@@ -583,7 +583,7 @@
583583
"CountResult(count=25000)"
584584
]
585585
},
586-
"execution_count": 101,
586+
"execution_count": 36,
587587
"metadata": {},
588588
"output_type": "execute_result"
589589
}
@@ -605,7 +605,7 @@
605605
},
606606
{
607607
"cell_type": "code",
608-
"execution_count": 16,
608+
"execution_count": 37,
609609
"id": "f1bac4ef",
610610
"metadata": {
611611
"ExecuteTime": {
@@ -637,7 +637,7 @@
637637
},
638638
{
639639
"cell_type": "code",
640-
"execution_count": 17,
640+
"execution_count": 39,
641641
"id": "aa92f3d3",
642642
"metadata": {
643643
"ExecuteTime": {
@@ -658,7 +658,7 @@
658658
"6. Hellenistic art, URL: https://simple.wikipedia.org/wiki/Hellenistic%20art (Score: 0.853)\n",
659659
"7. Modernist literature, URL: https://simple.wikipedia.org/wiki/Modernist%20literature (Score: 0.847)\n",
660660
"8. Art film, URL: https://simple.wikipedia.org/wiki/Art%20film (Score: 0.843)\n",
661-
"9. Central Europe, URL: https://simple.wikipedia.org/wiki/Central%20Europe (Score: 0.842)\n",
661+
"9. Central Europe, URL: https://simple.wikipedia.org/wiki/Central%20Europe (Score: 0.843)\n",
662662
"10. European, URL: https://simple.wikipedia.org/wiki/European (Score: 0.841)\n",
663663
"11. Art, URL: https://simple.wikipedia.org/wiki/Art (Score: 0.841)\n",
664664
"12. Byzantine art, URL: https://simple.wikipedia.org/wiki/Byzantine%20art (Score: 0.841)\n",
@@ -676,12 +676,12 @@
676676
"source": [
677677
"query_results = query_qdrant('modern art in Europe', 'Articles', 'title')\n",
678678
"for i, article in enumerate(query_results):\n",
679-
" print(f'{i + 1}. {article.payload[\"title\"]}, URL: {article.payload['url']} (Score: {round(article.score, 3)})')"
679+
" print(f'{i + 1}. {article.payload[\"title\"]}, URL: {article.payload[\"url\"]} (Score: {round(article.score, 3)})')"
680680
]
681681
},
682682
{
683683
"cell_type": "code",
684-
"execution_count": 18,
684+
"execution_count": 40,
685685
"id": "7ed116b8",
686686
"metadata": {
687687
"ExecuteTime": {
@@ -696,7 +696,7 @@
696696
"text": [
697697
"1. Battle of Bannockburn, URL: https://simple.wikipedia.org/wiki/Battle%20of%20Bannockburn (Score: 0.869)\n",
698698
"2. Wars of Scottish Independence, URL: https://simple.wikipedia.org/wiki/Wars%20of%20Scottish%20Independence (Score: 0.861)\n",
699-
"3. 1651, URL: https://simple.wikipedia.org/wiki/1651 (Score: 0.852)\n",
699+
"3. 1651, URL: https://simple.wikipedia.org/wiki/1651 (Score: 0.853)\n",
700700
"4. First War of Scottish Independence, URL: https://simple.wikipedia.org/wiki/First%20War%20of%20Scottish%20Independence (Score: 0.85)\n",
701701
"5. Robert I of Scotland, URL: https://simple.wikipedia.org/wiki/Robert%20I%20of%20Scotland (Score: 0.846)\n",
702702
"6. 841, URL: https://simple.wikipedia.org/wiki/841 (Score: 0.844)\n",
@@ -721,7 +721,7 @@
721721
"# This time we'll query using content vector\n",
722722
"query_results = query_qdrant('Famous battles in Scottish history', 'Articles', 'content')\n",
723723
"for i, article in enumerate(query_results):\n",
724-
" print(f'{i + 1}. {article.payload[\"title\"]}, URL: {article.payload['url']} (Score: {round(article.score, 3)})')"
724+
" print(f'{i + 1}. {article.payload[\"title\"]}, URL: {article.payload[\"url\"]} (Score: {round(article.score, 3)})')"
725725
]
726726
},
727727
{

0 commit comments

Comments
 (0)