Prompt Agent
The Prompt Agent generates code cells based on natural language input. It leverages AI models to generate code, add new cells, and modify the notebook content. This is a great Agent to support the following use cases:
- Code Generation: Generate cells code based on natural language input.
- Notebook Modification: Add new cells based on existing one.
To use the Jupyter AI Agent, an easy way is to launch a CLI (update the Azure deployment based on your setup).
jupyter-ai-agent prompt \
--url http://localhost:8888 \
--token MY_TOKEN \
--azure-ai-deployment-name gpt-40-mini \
--path test.ipynb \
--input "Create a matplotlib example"
Parameters
The Prompt Agent can be configured with the following parameters:
--url
: JupyterLab URL.--token
: JupyterLab token.--azure-ai-deployment-name
: Azure AI model deployment name.--path
: Notebook to modify path.--input
: Natural language input.--full-context
: Optional flag to provide the full notebook context i.e. notebook content to the AI model (default: False).