Skip to content

Commit

Permalink
adding OpenAI API key to environment (#17792)
Browse files Browse the repository at this point in the history
  • Loading branch information
jenperson authored Feb 11, 2025
1 parent fac2050 commit 5e29f6e
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/docs/examples/agent/agent_builder.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"source": [
"%pip install llama-index-agent-openai\n",
"%pip install llama-index-embeddings-openai\n",
"%pip install llama-index-llms-openai"
"%pip install llama-index-llms-openai\n",
"%pip install llama-index-readers-file"
]
},
{
Expand Down
12 changes: 12 additions & 0 deletions docs/docs/examples/agent/openai_agent_context_retrieval.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@
"!pip install llama-index"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "36f37aa5",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"\n",
"os.environ[\"OPENAI_API_KEY\"] = \"sk-...\""
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
14 changes: 13 additions & 1 deletion docs/docs/examples/agent/openai_agent_lengthy_tools.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"id": "dc72e6f9",
"metadata": {},
"source": [
"If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙."
"If you're opening this Notebook on Colab, you will probably need to install LlamaIndex 🦙."
]
},
{
Expand Down Expand Up @@ -74,6 +74,18 @@
"from llama_index.llms.openai import OpenAI"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e9e9373c",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"\n",
"os.environ[\"OPENAI_API_KEY\"] = \"sk-...\""
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
12 changes: 12 additions & 0 deletions docs/docs/examples/agent/openai_agent_query_plan.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,18 @@
"from llama_index.llms.openai import OpenAI"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9184acae",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"\n",
"os.environ[\"OPENAI_API_KEY\"] = \"sk-...\""
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 5e29f6e

Please sign in to comment.