Skip to content

Commit

Permalink
Jupyterai
Browse files Browse the repository at this point in the history
  • Loading branch information
baniasbaabe committed Jan 15, 2024
1 parent fc22e0d commit 1d37a28
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions book/jupyternotebook/Chapter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,61 @@
"source": [
"!nbstripout FILE.ipynb"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Bring LLMs Into Your Notebook with `jupyter-ai`"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Bring GenAI into your Jupyter Notebooks with `jupyter-ai`\n",
"\n",
"`jupyter-ai` lets you use LLMs from vendors like OpenAI, Huggingface and Anthropic within your Notebook cells.\n",
"\n",
"You can just ask for a code snippet and the result will be rendered into your Notebook."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%env PROVIDER_API_KEY=YOUR_API_KEY_HERE"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install jupyter_ai"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%load_ext jupyter_ai"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%ai chatgpt\n",
"Provide a hello world function in Python"
]
}
],
"metadata": {
Expand Down

0 comments on commit 1d37a28

Please sign in to comment.