Skip to content
 
 

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPT magic

A Jupyter/IPython magic command for generating code using GPT

Usage

Generating code with GPT by loading the extension and prefixing your line with %gpt.

%load_ext gpt
%gpt Your request here

Install

Install with pip

pip install gpt-magic

Please note that users will need to provide their own OpenAI API key. Set an environment variable called OPEN_AI_KEY with your key. Or pass the API key when loading the extension, by running the following line before %load_ext gpt_magic:

import os
os.environ["OPENAI_API_KEY"] = "your_openai_api_key_here"

Model

The current default is the gpt-3-turbo model, but can be changed using OPENAI_MODEL environmental variable.

Using GPT-4 example

import os
os.environ["OPENAI_MODEL"] = "gpt-4"

About

Extend JupyterLab with GPT magic commands

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages