Skip to main content

Jupyter AI in Open OnDemand

Jupyter AI brings conversational AI capabilities directly into your JupyterLab environment. Use AI chat assistance, code generation, and natural language commands within your notebooks through ASU's Research Computing infrastructure.

Jupyter AI integrates large language models into JupyterLab, enabling you to:

  • Get coding help and explanations through an interactive chat interface
  • Use AI magic commands (%%ai) directly in notebook cells
  • Generate, debug, and optimize code with AI assistance
  • Ask questions about your data and analysis workflows

Getting Started With Jupyter AI​

Before you begin, ensure you have:

  • An active ASU Research Computing account
  • Successfully connected to the Web Portal
  • A valid Voyager API key (instructions below)

Step 1: Generate Your API Key​

You'll need an API key from Voyager to authenticate with ASU's LLM services.

  1. Navigate to https://voyager.rc.asu.edu and log in
  2. Open your profile and select the Keys tab (the API keys button at the top of the AI LLM tab opens it too)
  3. Click Create API key
  4. Copy and save your API key in a secure location; the full key is shown only once
  5. On the AI LLM tab, open the LLMs sub-tab and copy the ID of the model you want to use, exactly as written (for example muse-glimmer-30b). The copy icon next to a model's name copies its ID. You will enter it in Step 3.
Important

Your API key is sensitive information. Keep it secure and never share it with others or commit it to version control.

LLM Tab showing API key generation


Step 2: Launch Jupyter AI Session​

  1. Log in to the web portal
  2. Navigate to Interactive Apps → Jupyter
  3. In the session configuration:
    • Select the Jupyter-AI version from the dropdown
    • Configure your compute resources (cores, memory, time limit)
    • Choose your partition/queue
  4. Click Launch to start your session
  5. Once ready, click Connect to Jupyter to open JupyterLab

Step 3: Configure Jupyter AI​

Now you'll connect Jupyter AI to ASU's LLM service using your API key.

  1. In JupyterLab, open the Chat panel (look for the chat icon in the left sidebar)

  2. Click the gear/settings icon in the chat panel

    Opening the Jupyter AI chat panel

  3. Configure the following settings:

    API Endpoint URL:

    https://openai.rc.asu.edu/v1

    API Key:
    Paste the API key you generated in Step 1

    Model:
    Enter the model ID you copied in Step 1, exactly as Voyager lists it under AI LLM → LLMs.

    Configuring the API endpoint and key in settings

  4. Click Save to apply the configuration


Using Jupyter AI​

Chat Interface​

Use the chat panel to:

  • Ask questions about Python, data science, or your code
  • Request code examples and explanations
  • Get debugging help
  • Discuss analysis approaches

Simply type your question in the chat and receive AI-generated responses.

Magic Commands in Notebooks​

Jupyter AI's %%ai notebook magic commands are not included in the current Jupyter AI version on the web portal. Use the chat panel described above to ask questions and generate code.


Troubleshooting​

Authentication Errors​

If you receive authentication errors:

  • Verify your API key is correct and hasn't expired
  • Check that the API endpoint URL is exactly: https://openai.rc.asu.edu/v1
  • Try regenerating your API key in Voyager and updating the configuration

Model Not Found​

The model ID does not match the gateway. Copy it again from Voyager's AI LLM → LLMs sub-tab, paste it into the chat settings exactly as written, and save.

Chat Not Responding​

  • Ensure you've saved the configuration after entering your API key
  • Restart your Jupyter session: in the web portal, open My Interactive Sessions, delete the session, and launch a new one (restarting the notebook kernel does not restart the chat panel)
  • Check that you selected the Jupyter AI version when launching the session

Need to Update Your Key​

If your API key expires or needs rotation:

  1. Create a new key (or rotate the old one) on the Voyager Keys tab, and copy it; it is shown only once
  2. Open the chat settings (gear icon)
  3. Replace the old key with your new one
  4. Save the configuration

Additional Resources​

Security Note

Your API key is stored only in your JupyterLab user configuration and is not shared with other users or sessions.