|
61 | 61 | "id": "1714ea83-6cd4-44bb-b53f-4499126c3809",
|
62 | 62 | "metadata": {},
|
63 | 63 | "source": [
|
64 |
| - "### Setup LLM using Groq" |
| 64 | + "### Setup LLM using Groq\n", |
| 65 | + "\n", |
| 66 | + "To use Groq, you need to make sure that `GROQ_API_KEY` is specified as an environment variable." |
| 67 | + ] |
| 68 | + }, |
| 69 | + { |
| 70 | + "cell_type": "code", |
| 71 | + "execution_count": null, |
| 72 | + "id": "5d46440c", |
| 73 | + "metadata": {}, |
| 74 | + "outputs": [], |
| 75 | + "source": [ |
| 76 | + "import os\n", |
| 77 | + "\n", |
| 78 | + "os.environ[\"GROQ_API_KEY\"] = \"<GROQ_API_KEY>\"" |
65 | 79 | ]
|
66 | 80 | },
|
67 | 81 | {
|
|
152 | 166 | "source": [
|
153 | 167 | "### Load Data\n",
|
154 | 168 | "\n",
|
155 |
| - "We load data using LlamaParse by default, but you can also choose to opt for our free pypdf reader (in SimpleDirectoryReader by default) if you don't have an account." |
| 169 | + "We load data using LlamaParse by default, but you can also choose to opt for our free pypdf reader (in SimpleDirectoryReader by default) if you don't have an account! \n", |
| 170 | + "\n", |
| 171 | + "1. LlamaParse: Signup for an account here: cloud.llamaindex.ai. You get 1k free pages a day, and paid plan is 7k free pages + 0.3c per additional page. LlamaParse is a good option if you want to parse complex documents, like PDFs with charts, tables, and more. \n", |
| 172 | + "\n", |
| 173 | + "2. Default PDF Parser (In `SimpleDirectoryReader`). If you don't want to signup for an account / use a PDF service, just use the default PyPDF reader bundled in our file loader. It's a good choice for getting started!" |
156 | 174 | ]
|
157 | 175 | },
|
158 | 176 | {
|
|
172 | 190 | }
|
173 | 191 | ],
|
174 | 192 | "source": [
|
| 193 | + "# Uncomment this code if you want to use LlamaParse\n", |
175 | 194 | "from llama_parse import LlamaParse\n",
|
176 | 195 | "\n",
|
177 | 196 | "docs_kendrick = LlamaParse(result_type=\"text\").load_data(\"./data/kendrick.pdf\")\n",
|
|
180 | 199 | " \"./data/drake_kendrick_beef.pdf\"\n",
|
181 | 200 | ")\n",
|
182 | 201 | "\n",
|
183 |
| - "\n", |
| 202 | + "# Uncomment this code if you want to use SimpleDirectoryReader / default PDF Parser\n", |
184 | 203 | "# from llama_index.core import SimpleDirectoryReader\n",
|
185 | 204 | "\n",
|
186 | 205 | "# docs_kendrick = SimpleDirectoryReader(input_files=[\"data/kendrick.pdf\"]).load_data()\n",
|
|
0 commit comments