|
1 | 1 | { |
2 | 2 | "cells": [ |
| 3 | + { |
| 4 | + "attachments": {}, |
| 5 | + "cell_type": "markdown", |
| 6 | + "id": "fa593487", |
| 7 | + "metadata": {}, |
| 8 | + "source": [ |
| 9 | + "<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/agent/openai_agent_query_plan.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" |
| 10 | + ] |
| 11 | + }, |
3 | 12 | { |
4 | 13 | "attachments": {}, |
5 | 14 | "cell_type": "markdown", |
|
17 | 26 | "In this setting we use a familiar example: Uber 10Q filings in March, June, and September of 2022." |
18 | 27 | ] |
19 | 28 | }, |
| 29 | + { |
| 30 | + "attachments": {}, |
| 31 | + "cell_type": "markdown", |
| 32 | + "id": "dc72e6f9", |
| 33 | + "metadata": {}, |
| 34 | + "source": [ |
| 35 | + "If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙." |
| 36 | + ] |
| 37 | + }, |
| 38 | + { |
| 39 | + "cell_type": "code", |
| 40 | + "execution_count": null, |
| 41 | + "id": "4df080d3", |
| 42 | + "metadata": {}, |
| 43 | + "outputs": [], |
| 44 | + "source": [ |
| 45 | + "!pip install llama-index" |
| 46 | + ] |
| 47 | + }, |
20 | 48 | { |
21 | 49 | "cell_type": "code", |
22 | 50 | "execution_count": null, |
|
71 | 99 | "service_context = ServiceContext.from_defaults(llm=llm)" |
72 | 100 | ] |
73 | 101 | }, |
| 102 | + { |
| 103 | + "attachments": {}, |
| 104 | + "cell_type": "markdown", |
| 105 | + "id": "26f545cd", |
| 106 | + "metadata": {}, |
| 107 | + "source": [ |
| 108 | + "## Download Data" |
| 109 | + ] |
| 110 | + }, |
| 111 | + { |
| 112 | + "cell_type": "code", |
| 113 | + "execution_count": null, |
| 114 | + "id": "e6385d12", |
| 115 | + "metadata": {}, |
| 116 | + "outputs": [], |
| 117 | + "source": [ |
| 118 | + "!mkdir -p 'data/10q/'\n", |
| 119 | + "!wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/examples/data/10q/uber_10q_march_2022.pdf' -O 'data/10q/uber_10q_march_2022.pdf'\n", |
| 120 | + "!wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/examples/data/10q/uber_10q_june_2022.pdf' -O 'data/10q/uber_10q_june_2022.pdf'\n", |
| 121 | + "!wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/examples/data/10q/uber_10q_sept_2022.pdf' -O 'data/10q/uber_10q_sept_2022.pdf'" |
| 122 | + ] |
| 123 | + }, |
74 | 124 | { |
75 | 125 | "attachments": {}, |
76 | 126 | "cell_type": "markdown", |
|
88 | 138 | "outputs": [], |
89 | 139 | "source": [ |
90 | 140 | "march_2022 = SimpleDirectoryReader(\n", |
91 | | - " input_files=[\"../data/10q/uber_10q_march_2022.pdf\"]\n", |
| 141 | + " input_files=[\"./data/10q/uber_10q_march_2022.pdf\"]\n", |
92 | 142 | ").load_data()\n", |
93 | 143 | "june_2022 = SimpleDirectoryReader(\n", |
94 | | - " input_files=[\"../data/10q/uber_10q_june_2022.pdf\"]\n", |
| 144 | + " input_files=[\"./data/10q/uber_10q_june_2022.pdf\"]\n", |
95 | 145 | ").load_data()\n", |
96 | 146 | "sept_2022 = SimpleDirectoryReader(\n", |
97 | | - " input_files=[\"../data/10q/uber_10q_sept_2022.pdf\"]\n", |
| 147 | + " input_files=[\"./data/10q/uber_10q_sept_2022.pdf\"]\n", |
98 | 148 | ").load_data()" |
99 | 149 | ] |
100 | 150 | }, |
|
0 commit comments