Skip to content

Commit

Permalink
Add imports to yelp agent notebook (#311)
Browse files Browse the repository at this point in the history
* Add imports to yelp agent notebook
* Comment pip installs

---------

Co-authored-by: Shayak Sen <[email protected]>
  • Loading branch information
shayaks and Shayak Sen authored Jul 22, 2023
1 parent 639cf54 commit a3191d3
Showing 1 changed file with 22 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"metadata": {},
"outputs": [],
"source": [
"# Setup OpenAI Agent\n",
"from llama_index.agent import OpenAIAgent\n",
"import openai\n",
"openai.api_key = '...'"
"'''!pip install trulens_eval==0.6.0 \\\n",
" llama_index==0.7.11 \\\n",
" llama_hub==0.0.13 \\\n",
" yelpapi==2.5.0'''"
]
},
{
Expand All @@ -33,8 +33,20 @@
"outputs": [],
"source": [
"import os\n",
"os.environ[\"OPENAI_API_KEY\"] = \"...\"\n",
"os.environ[\"HUGGINGFACE_API_KEY\"] = \"...\""
"os.environ[\"OPENAI_API_KEY\"] = \"...\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Setup OpenAI Agent\n",
"from llama_index.agent import OpenAIAgent\n",
"import openai\n",
"import os\n",
"openai.api_key = os.environ[\"OPENAI_API_KEY\"]"
]
},
{
Expand All @@ -47,7 +59,8 @@
"from llama_hub.tools.yelp.base import YelpToolSpec\n",
"from llama_index.tools.tool_spec.load_and_search.base import LoadAndSearchToolSpec\n",
"\n",
"tool_spec = YelpToolSpec(api_key='...', client_id='...')"
"# Add Yelp API key and client ID\n",
"tool_spec = YelpToolSpec(api_key=\"...\", client_id=\"...\")"
]
},
{
Expand Down Expand Up @@ -200,7 +213,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.11.4 ('agent_example')",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -214,9 +227,8 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.8.16"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "9404565ab2271c01f32a5ebf202ce74a5a811d6909f1828a5ff1298ed34c2b97"
Expand Down

0 comments on commit a3191d3

Please sign in to comment.