AlaFalaki commited on
Commit
65b9328
Β·
1 Parent(s): 0bfedbd

Created using Colab

Browse files
Files changed (1) hide show
  1. notebooks/LlamaIndex_101.ipynb +69 -66
notebooks/LlamaIndex_101.ipynb CHANGED
@@ -4,7 +4,10 @@
4
  "metadata": {
5
  "colab": {
6
  "provenance": [],
7
- "authorship_tag": "ABX9TyNzaxKiokXX5SPot1IBiMhR",
 
 
 
8
  "include_colab_link": true
9
  },
10
  "kernelspec": {
@@ -36,16 +39,54 @@
36
  "base_uri": "https://localhost:8080/"
37
  },
38
  "id": "y_GAV7-zos0Y",
39
- "outputId": "74d4a3c4-3576-455b-fbe2-1b8b67bf20d5"
40
  },
41
- "execution_count": 10,
42
  "outputs": [
43
  {
44
  "output_type": "stream",
45
  "name": "stdout",
46
  "text": [
47
  " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
48
- " Building wheel for wikipedia (setup.py) ... \u001b[?25l\u001b[?25hdone\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  ]
50
  }
51
  ]
@@ -62,7 +103,7 @@
62
  "metadata": {
63
  "id": "Ua0KNwgvyCaj"
64
  },
65
- "execution_count": 49,
66
  "outputs": []
67
  },
68
  {
@@ -70,12 +111,12 @@
70
  "source": [
71
  "import os\n",
72
  "\n",
73
- "os.environ['OPENAI_API_KEY'] = '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'"
74
  ],
75
  "metadata": {
76
  "id": "--Q2zk06wElp"
77
  },
78
- "execution_count": 2,
79
  "outputs": []
80
  },
81
  {
@@ -92,7 +133,7 @@
92
  "metadata": {
93
  "id": "tjwZjA8-wITr"
94
  },
95
- "execution_count": 3,
96
  "outputs": []
97
  },
98
  {
@@ -359,24 +400,24 @@
359
  "base_uri": "https://localhost:8080/"
360
  },
361
  "id": "DrzbBAglwUo0",
362
- "outputId": "73f30202-a708-4112-8491-9152e228c6cb"
363
  },
364
- "execution_count": 35,
365
  "outputs": [
366
  {
367
  "output_type": "stream",
368
  "name": "stdout",
369
  "text": [
370
- "--2024-07-24 17:20:40-- https://raw.githubusercontent.com/run-llama/llama_index/main/docs/docs/examples/data/paul_graham/paul_graham_essay.txt\n",
371
- "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.111.133, ...\n",
372
- "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.\n",
373
  "HTTP request sent, awaiting response... 200 OK\n",
374
  "Length: 75042 (73K) [text/plain]\n",
375
  "Saving to: β€˜./paul_graham/paul_graham_essay.txt’\n",
376
  "\n",
377
  "\r ./paul_gr 0%[ ] 0 --.-KB/s \r./paul_graham/paul_ 100%[===================>] 73.28K --.-KB/s in 0.02s \n",
378
  "\n",
379
- "2024-07-24 17:20:40 (3.33 MB/s) - β€˜./paul_graham/paul_graham_essay.txt’ saved [75042/75042]\n",
380
  "\n"
381
  ]
382
  }
@@ -393,7 +434,7 @@
393
  "metadata": {
394
  "id": "S8-QmnkCwIiU"
395
  },
396
- "execution_count": 37,
397
  "outputs": []
398
  },
399
  {
@@ -410,7 +451,7 @@
410
  "metadata": {
411
  "id": "DfWglp75xc5f"
412
  },
413
- "execution_count": 38,
414
  "outputs": []
415
  },
416
  {
@@ -418,13 +459,12 @@
418
  "source": [
419
  "from llama_index.core import StorageContext\n",
420
  "\n",
421
- "storage_context = StorageContext.from_defaults(vector_store=vector_store)\n",
422
- "storage_context.docstore.add_documents(nodes)"
423
  ],
424
  "metadata": {
425
  "id": "-EVBlUC-xcj1"
426
  },
427
- "execution_count": 39,
428
  "outputs": []
429
  },
430
  {
@@ -439,7 +479,7 @@
439
  "metadata": {
440
  "id": "8lMa4h9Cwn8b"
441
  },
442
- "execution_count": 40,
443
  "outputs": []
444
  },
445
  {
@@ -450,7 +490,7 @@
450
  "metadata": {
451
  "id": "tJsfskjHxj0e"
452
  },
453
- "execution_count": 44,
454
  "outputs": []
455
  },
456
  {
@@ -477,7 +517,7 @@
477
  "metadata": {
478
  "id": "yL9TsFwxxuoA"
479
  },
480
- "execution_count": 50,
481
  "outputs": []
482
  },
483
  {
@@ -492,9 +532,9 @@
492
  "base_uri": "https://localhost:8080/"
493
  },
494
  "id": "JWc_n5Lhx2bq",
495
- "outputId": "cd992d20-c701-4eb7-aaf2-30f790d1ca24"
496
  },
497
- "execution_count": 51,
498
  "outputs": [
499
  {
500
  "output_type": "stream",
@@ -504,46 +544,9 @@
504
  "\u001b[1;3;38;2;237;90;200m[pg_essay] Q: What did Paul Graham work on before Y Combinator?\n",
505
  "\u001b[0m\u001b[1;3;38;2;90;149;237m[pg_essay] Q: What did Paul Graham work on during Y Combinator?\n",
506
  "\u001b[0m\u001b[1;3;38;2;11;159;203m[pg_essay] Q: What did Paul Graham work on after Y Combinator?\n",
507
- "\u001b[0mGenerated 1 sub questions.\n",
508
- "\u001b[1;3;38;2;237;90;200m[pg_essay] Q: What did Paul Graham work on after Y Combinator?\n",
509
- "\u001b[0mGenerated 1 sub questions.\n",
510
- "\u001b[1;3;38;2;237;90;200m[pg_essay] Q: What is the title of Paul Graham's essay on What I Worked On?\n",
511
- "\u001b[0mGenerated 1 sub questions.\n",
512
- "\u001b[1;3;38;2;237;90;200m[pg_essay] Q: What is the title of Paul Graham's essay on What I Worked On?\n",
513
- "\u001b[0mGenerated 1 sub questions.\n",
514
- "\u001b[1;3;38;2;237;90;200m[pg_essay] Q: What did Paul Graham work on after Y Combinator?\n",
515
- "\u001b[0mGenerated 1 sub questions.\n",
516
- "\u001b[1;3;38;2;237;90;200m[pg_essay] Q: What is the title of Paul Graham's essay on What I Worked On?\n",
517
- "\u001b[0m"
518
- ]
519
- },
520
- {
521
- "output_type": "stream",
522
- "name": "stderr",
523
- "text": [
524
- "/usr/lib/python3.10/abc.py:123: RuntimeWarning: coroutine 'run_async_tasks.<locals>._gather' was never awaited\n",
525
- " return _abc_subclasscheck(cls, subclass)\n",
526
- "RuntimeWarning: Enable tracemalloc to get the object allocation traceback\n",
527
- "/usr/lib/python3.10/abc.py:123: RuntimeWarning: coroutine 'SubQuestionQueryEngine._aquery_subq' was never awaited\n",
528
- " return _abc_subclasscheck(cls, subclass)\n",
529
- "RuntimeWarning: Enable tracemalloc to get the object allocation traceback\n"
530
- ]
531
- },
532
- {
533
- "output_type": "stream",
534
- "name": "stdout",
535
- "text": [
536
- "Generated 1 sub questions.\n",
537
- "\u001b[1;3;38;2;237;90;200m[pg_essay] Q: What is the title of Paul Graham's essay on What I Worked On?\n",
538
- "\u001b[0m\u001b[1;3;38;2;237;90;200m[pg_essay] A: After Y Combinator, Paul Graham started painting.\n",
539
- "\u001b[0m\u001b[1;3;38;2;237;90;200m[pg_essay] A: The title of Paul Graham's essay on What I Worked On is \"What I Worked On\".\n",
540
- "\u001b[0m\u001b[1;3;38;2;237;90;200m[pg_essay] A: After Y Combinator, Paul Graham started painting.\n",
541
- "\u001b[0m\u001b[1;3;38;2;237;90;200m[pg_essay] A: What I Worked On\n",
542
- "\u001b[0m\u001b[1;3;38;2;237;90;200m[pg_essay] A: What I Worked On\n",
543
- "\u001b[0m\u001b[1;3;38;2;237;90;200m[pg_essay] A: The title of Paul Graham's essay on What I Worked On is \"What I Worked On\".\n",
544
  "\u001b[0m\u001b[1;3;38;2;11;159;203m[pg_essay] A: After Y Combinator, Paul Graham started painting.\n",
545
- "\u001b[0m\u001b[1;3;38;2;90;149;237m[pg_essay] A: Paul Graham worked on various projects during his time at Y Combinator.\n",
546
- "\u001b[0m\u001b[1;3;38;2;237;90;200m[pg_essay] A: Paul Graham worked on developing Viaweb before Y Combinator.\n",
547
  "\u001b[0m"
548
  ]
549
  }
@@ -559,16 +562,16 @@
559
  "base_uri": "https://localhost:8080/"
560
  },
561
  "id": "T-ZC66Ltx5Za",
562
- "outputId": "d7a1c85d-d73c-467d-e0df-9e06078622e2"
563
  },
564
- "execution_count": 52,
565
  "outputs": [
566
  {
567
  "output_type": "stream",
568
  "name": "stdout",
569
  "text": [
570
  ">>> The final response:\n",
571
- " Paul Graham worked on developing Viaweb before Y Combinator, on various projects during his time at Y Combinator, and started painting after Y Combinator.\n"
572
  ]
573
  }
574
  ]
 
4
  "metadata": {
5
  "colab": {
6
  "provenance": [],
7
+ "collapsed_sections": [
8
+ "HjI_gRaRutfj"
9
+ ],
10
+ "authorship_tag": "ABX9TyOzyI9AMRRR7iatfugkbz3Y",
11
  "include_colab_link": true
12
  },
13
  "kernelspec": {
 
39
  "base_uri": "https://localhost:8080/"
40
  },
41
  "id": "y_GAV7-zos0Y",
42
+ "outputId": "aafcb14a-2caf-4424-c772-1d2bf6246cb2"
43
  },
44
+ "execution_count": 1,
45
  "outputs": [
46
  {
47
  "output_type": "stream",
48
  "name": "stdout",
49
  "text": [
50
  " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
51
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.3/67.3 kB\u001b[0m \u001b[31m1.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
52
+ "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
53
+ " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
54
+ " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
55
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.4/50.4 kB\u001b[0m \u001b[31m219.0 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
56
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m320.6/320.6 kB\u001b[0m \u001b[31m1.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
57
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.1/1.1 MB\u001b[0m \u001b[31m1.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
58
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m526.8/526.8 kB\u001b[0m \u001b[31m1.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
59
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.4/2.4 MB\u001b[0m \u001b[31m1.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
60
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m273.8/273.8 kB\u001b[0m \u001b[31m1.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
61
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.2/92.2 kB\u001b[0m \u001b[31m1.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
62
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.6/75.6 kB\u001b[0m \u001b[31m1.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
63
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.9/77.9 kB\u001b[0m \u001b[31m1.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
64
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.7/1.7 MB\u001b[0m \u001b[31m2.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
65
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m15.5/15.5 MB\u001b[0m \u001b[31m2.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
66
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.0/2.0 MB\u001b[0m \u001b[31m3.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
67
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.6/67.6 kB\u001b[0m \u001b[31m2.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
68
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.8/6.8 MB\u001b[0m \u001b[31m3.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
69
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m59.9/59.9 kB\u001b[0m \u001b[31m2.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
70
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m52.5/52.5 kB\u001b[0m \u001b[31m2.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
71
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m130.5/130.5 kB\u001b[0m \u001b[31m4.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
72
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m107.0/107.0 kB\u001b[0m \u001b[31m3.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
73
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m141.1/141.1 kB\u001b[0m \u001b[31m4.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
74
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m41.3/41.3 kB\u001b[0m \u001b[31m2.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
75
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.8/62.8 kB\u001b[0m \u001b[31m2.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
76
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m2.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
77
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m341.4/341.4 kB\u001b[0m \u001b[31m4.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
78
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m141.9/141.9 kB\u001b[0m \u001b[31m1.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
79
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m295.8/295.8 kB\u001b[0m \u001b[31m1.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
80
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m71.9/71.9 kB\u001b[0m \u001b[31m3.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
81
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.4/3.4 MB\u001b[0m \u001b[31m4.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
82
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.2/1.2 MB\u001b[0m \u001b[31m5.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
83
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m130.2/130.2 kB\u001b[0m \u001b[31m4.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
84
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m46.0/46.0 kB\u001b[0m \u001b[31m2.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
85
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m307.7/307.7 kB\u001b[0m \u001b[31m3.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
86
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m86.8/86.8 kB\u001b[0m \u001b[31m283.9 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
87
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.2/49.2 kB\u001b[0m \u001b[31m3.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
88
+ "\u001b[?25h Building wheel for wikipedia (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
89
+ " Building wheel for pypika (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n"
90
  ]
91
  }
92
  ]
 
103
  "metadata": {
104
  "id": "Ua0KNwgvyCaj"
105
  },
106
+ "execution_count": 2,
107
  "outputs": []
108
  },
109
  {
 
111
  "source": [
112
  "import os\n",
113
  "\n",
114
+ "os.environ['OPENAI_API_KEY'] = '[OPENAI_API_KEY]'"
115
  ],
116
  "metadata": {
117
  "id": "--Q2zk06wElp"
118
  },
119
+ "execution_count": 3,
120
  "outputs": []
121
  },
122
  {
 
133
  "metadata": {
134
  "id": "tjwZjA8-wITr"
135
  },
136
+ "execution_count": 4,
137
  "outputs": []
138
  },
139
  {
 
400
  "base_uri": "https://localhost:8080/"
401
  },
402
  "id": "DrzbBAglwUo0",
403
+ "outputId": "5bd17a72-3733-4b8c-e421-5f363f05895f"
404
  },
405
+ "execution_count": 6,
406
  "outputs": [
407
  {
408
  "output_type": "stream",
409
  "name": "stdout",
410
  "text": [
411
+ "--2024-07-24 18:48:21-- https://raw.githubusercontent.com/run-llama/llama_index/main/docs/docs/examples/data/paul_graham/paul_graham_essay.txt\n",
412
+ "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.111.133, ...\n",
413
+ "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.\n",
414
  "HTTP request sent, awaiting response... 200 OK\n",
415
  "Length: 75042 (73K) [text/plain]\n",
416
  "Saving to: β€˜./paul_graham/paul_graham_essay.txt’\n",
417
  "\n",
418
  "\r ./paul_gr 0%[ ] 0 --.-KB/s \r./paul_graham/paul_ 100%[===================>] 73.28K --.-KB/s in 0.02s \n",
419
  "\n",
420
+ "2024-07-24 18:48:21 (2.95 MB/s) - β€˜./paul_graham/paul_graham_essay.txt’ saved [75042/75042]\n",
421
  "\n"
422
  ]
423
  }
 
434
  "metadata": {
435
  "id": "S8-QmnkCwIiU"
436
  },
437
+ "execution_count": 7,
438
  "outputs": []
439
  },
440
  {
 
451
  "metadata": {
452
  "id": "DfWglp75xc5f"
453
  },
454
+ "execution_count": 8,
455
  "outputs": []
456
  },
457
  {
 
459
  "source": [
460
  "from llama_index.core import StorageContext\n",
461
  "\n",
462
+ "storage_context = StorageContext.from_defaults(vector_store=vector_store)"
 
463
  ],
464
  "metadata": {
465
  "id": "-EVBlUC-xcj1"
466
  },
467
+ "execution_count": 11,
468
  "outputs": []
469
  },
470
  {
 
479
  "metadata": {
480
  "id": "8lMa4h9Cwn8b"
481
  },
482
+ "execution_count": 12,
483
  "outputs": []
484
  },
485
  {
 
490
  "metadata": {
491
  "id": "tJsfskjHxj0e"
492
  },
493
+ "execution_count": 13,
494
  "outputs": []
495
  },
496
  {
 
517
  "metadata": {
518
  "id": "yL9TsFwxxuoA"
519
  },
520
+ "execution_count": 14,
521
  "outputs": []
522
  },
523
  {
 
532
  "base_uri": "https://localhost:8080/"
533
  },
534
  "id": "JWc_n5Lhx2bq",
535
+ "outputId": "972fa40f-065b-420a-d5e8-af36c1a2ad2d"
536
  },
537
+ "execution_count": 15,
538
  "outputs": [
539
  {
540
  "output_type": "stream",
 
544
  "\u001b[1;3;38;2;237;90;200m[pg_essay] Q: What did Paul Graham work on before Y Combinator?\n",
545
  "\u001b[0m\u001b[1;3;38;2;90;149;237m[pg_essay] Q: What did Paul Graham work on during Y Combinator?\n",
546
  "\u001b[0m\u001b[1;3;38;2;11;159;203m[pg_essay] Q: What did Paul Graham work on after Y Combinator?\n",
547
+ "\u001b[0m\u001b[1;3;38;2;237;90;200m[pg_essay] A: Paul Graham worked on building online stores through a web app called Viaweb before starting Y Combinator.\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
548
  "\u001b[0m\u001b[1;3;38;2;11;159;203m[pg_essay] A: After Y Combinator, Paul Graham started painting.\n",
549
+ "\u001b[0m\u001b[1;3;38;2;90;149;237m[pg_essay] A: Paul Graham worked on various aspects during Y Combinator, including being an angel firm, funding startups in batches, providing seed investments, and offering support to startups similar to what he had received when starting his own company.\n",
 
550
  "\u001b[0m"
551
  ]
552
  }
 
562
  "base_uri": "https://localhost:8080/"
563
  },
564
  "id": "T-ZC66Ltx5Za",
565
+ "outputId": "f45ec6bb-ee45-4526-80bd-ca7c30cdbf8f"
566
  },
567
+ "execution_count": 16,
568
  "outputs": [
569
  {
570
  "output_type": "stream",
571
  "name": "stdout",
572
  "text": [
573
  ">>> The final response:\n",
574
+ " Paul Graham's life involved building online stores through Viaweb before Y Combinator, working on various aspects within Y Combinator such as funding startups and providing support, and then transitioning to painting after Y Combinator.\n"
575
  ]
576
  }
577
  ]