|
@@ -61,7 +61,21 @@
|
|
|
"id": "1714ea83-6cd4-44bb-b53f-4499126c3809",
|
|
|
"metadata": {},
|
|
|
"source": [
|
|
|
- "### Setup LLM using Groq"
|
|
|
+ "### Setup LLM using Groq\n",
|
|
|
+ "\n",
|
|
|
+ "To use Groq, you need to make sure that `GROQ_API_KEY` is specified as an environment variable."
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": null,
|
|
|
+ "id": "5d46440c",
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "import os\n",
|
|
|
+ "\n",
|
|
|
+ "os.environ[\"GROQ_API_KEY\"] = \"<GROQ_API_KEY>\""
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -152,7 +166,11 @@
|
|
|
"source": [
|
|
|
"### Load Data\n",
|
|
|
"\n",
|
|
|
- "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."
|
|
|
+ "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",
|
|
|
+ "\n",
|
|
|
+ "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",
|
|
|
+ "\n",
|
|
|
+ "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!"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -172,6 +190,7 @@
|
|
|
}
|
|
|
],
|
|
|
"source": [
|
|
|
+ "# Uncomment this code if you want to use LlamaParse\n",
|
|
|
"from llama_parse import LlamaParse\n",
|
|
|
"\n",
|
|
|
"docs_kendrick = LlamaParse(result_type=\"text\").load_data(\"./data/kendrick.pdf\")\n",
|
|
@@ -180,7 +199,7 @@
|
|
|
" \"./data/drake_kendrick_beef.pdf\"\n",
|
|
|
")\n",
|
|
|
"\n",
|
|
|
- "\n",
|
|
|
+ "# Uncomment this code if you want to use SimpleDirectoryReader / default PDF Parser\n",
|
|
|
"# from llama_index.core import SimpleDirectoryReader\n",
|
|
|
"\n",
|
|
|
"# docs_kendrick = SimpleDirectoryReader(input_files=[\"data/kendrick.pdf\"]).load_data()\n",
|