Skip to content

Commit 6747f37

Browse files
committed
cr
1 parent 3445c3a commit 6747f37

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

recipes/llama_api_providers/llama3_cookbook_groq.ipynb

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,21 @@
6161
"id": "1714ea83-6cd4-44bb-b53f-4499126c3809",
6262
"metadata": {},
6363
"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>\""
6579
]
6680
},
6781
{
@@ -152,7 +166,11 @@
152166
"source": [
153167
"### Load Data\n",
154168
"\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!"
156174
]
157175
},
158176
{
@@ -172,6 +190,7 @@
172190
}
173191
],
174192
"source": [
193+
"# Uncomment this code if you want to use LlamaParse\n",
175194
"from llama_parse import LlamaParse\n",
176195
"\n",
177196
"docs_kendrick = LlamaParse(result_type=\"text\").load_data(\"./data/kendrick.pdf\")\n",
@@ -180,7 +199,7 @@
180199
" \"./data/drake_kendrick_beef.pdf\"\n",
181200
")\n",
182201
"\n",
183-
"\n",
202+
"# Uncomment this code if you want to use SimpleDirectoryReader / default PDF Parser\n",
184203
"# from llama_index.core import SimpleDirectoryReader\n",
185204
"\n",
186205
"# docs_kendrick = SimpleDirectoryReader(input_files=[\"data/kendrick.pdf\"]).load_data()\n",

0 commit comments

Comments
 (0)