-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add llamaindex + groq cookbook #503
Conversation
Thanks @jerryjliu for the PR can we pls add it here, under this folder, https://github.com/meta-llama/llama-recipes/tree/main/recipes/llama_api_providers |
lol my bad! moving it now |
@HamidShojanazeri check now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Jerry. Found a couple of errors while running the notebook. @jerryjliu
"source": [ | ||
"from llama_index.llms.groq import Groq\n", | ||
"\n", | ||
"llm = Groq(model=\"llama3-8b-8192\")\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should add
os.environ["GROQ_API_KEY"] = GROQ_API_KEY
or change to
llm = Groq(model="llama3-8b-8192", api_key=GROQ_API_TOKEN)
"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." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a note saying how to sign up to get a key. or uncomment the free one and comment the LlamaParse one. Also, is pypdf good enough? When should one use it and when LlamaParse? @jerryjliu
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# from llama_index.core.query_engine import SubQuestionQueryEngine\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove these commented lines? or explain or uncomment? @jerryjliu I uncommented and running it got "ValueError: No valid JSON found in output"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeffxtang just tested again. for some reason i can't get sub-question to work on groq 70b, so i took the sub-question section out
"outputs": [], | ||
"source": [ | ||
"drake_tool = QueryEngineTool(\n", | ||
" drake_index.as_query_engine(),\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got an error @jerryjliu
same as #502 but with groq