The AI Assistant is built on Jupyter AI and the Magic Wand extension, both included with Elyra. You only need to install and configure your preferred AI provider.
pip install langchain-openaiexport OPENAI_API_KEY="sk-your-openai-key-here"jupyter lab- Open the AI chat panel (💬)
- Select "openai-chat:gpt-4" as language model
- Test by sending a message in chat
- Look for the magic wand icon (🪄) in notebook cells
Choose and install the AI provider packages you want to use:
| Provider | Installation | Environment Variable |
|---|---|---|
| OpenAI | pip install langchain-openai |
OPENAI_API_KEY |
| Anthropic (Claude) | pip install langchain-anthropic |
ANTHROPIC_API_KEY |
| Ollama (Local) | pip install langchain-ollama |
None |
| Google Gemini | pip install langchain-google-genai |
GOOGLE_API_KEY |
| All Providers | pip install "jupyter-ai[all]" |
Various |
Set your API keys as environment variables:
export OPENAI_API_KEY="sk-your-key-here"
export ANTHROPIC_API_KEY="sk-ant-your-key-here"- "Create a function to calculate the mean of a list"
- "Add error handling to this code"
- "Convert this loop to use pandas"
- "Fix the syntax error in this cell"
- Check: Jupyter AI settings in chat panel
- Verify: API keys are set correctly
- Install: Required provider packages
- Restart: JupyterLab after changes
- Invalid API keys: Verify keys are correct and active
- Missing packages: Install required AI provider packages
- Ollama not running: Start with
ollama serve
- Never commit API keys to version control
- Code may be sent to third-party AI services
- Consider local models (Ollama) for sensitive code