Skip to main content

OpenAI

Jupyter AI Agents supports models from OpenAI.

To use OpenAI directly, you'll need to:

  1. Get an API key from OpenAI
  2. Set up your environment variables:
export OPENAI_API_KEY="..."

Example usage with direct OpenAI integration:

# Prompt agent example with OpenAI
jupyter-ai-agents prompt \
--url http://localhost:8888 \
--token MY_TOKEN \
--model-provider openai \
--model-name gpt-4o-mini \
--path test.ipynb \
--input "Create a matplotlib example"