Skip to main content
GPT-Code logo

An open source implementation of OpenAI's ChatGPT Code interpreter.

Simply ask the OpenAI model to do something and it will generate & execute the code for you.

Read the blog post to find out more.

Community

Judah Cooper offered to start & curate a Discord community. Join here.

Installation

Open a terminal and run:

pip install gpt-code-ui
gptcode

In order to make basic dependencies available it's recommended to run the following pip install in the Python environment that is used in the shell where you run gptcode:

pip install "numpy>=1.24,<1.25" "dateparser>=1.1,<1.2" "pandas>=1.5,<1.6" "geopandas>=0.13,<0.14" "tabulate>=0.9.0<1.0" "PyPDF2>=3.0,<3.1" "pdfminer>=20191125,<20191200" "pdfplumber>=0.9,<0.10" "matplotlib>=3.7,<3.8"

User interface

GPT-Code logo

Features

  • File upload
  • File download
  • Context awareness (it can refer to your previous messages)
  • Generate code
  • Run code (Python kernel)
  • Model switching (GPT-3.5 and GPT-4)

Misc.

Using .env for OpenAI key

You can put a .env in the working directory to load the OPENAI_API_KEY environment variable.

Configurables

Set the API_PORT, WEB_PORT, SNAKEMQ_PORT variables to override the defaults.

Set OPENAI_BASE_URL to change the OpenAI API endpoint that's being used (note this environment variable includes the protocol https://...).

You can use the .env.example in the repository (make sure you git clone the repo to get the file first).

For Azure OpenAI Services, there are also other configurable variables like deployment name. See .env.azure-example for more information. Note that model selection on the UI is currently not supported for Azure OpenAI Services.

cp .env.example .env
vim .env
gptcode

Docker

localagi took the effort of bundling the Python package in a Docker container. Check it out here: gpt-code-ui-docker.

Contributing

Please do and have a look at the contributions guide! This should be a community initiative. I'll try my best to be responsive.

Thank you for your interest in this project!

Release files for gpt-code-ui 0.42.40

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gpt-code-ui 0.42.40
File Size Uploaded
gpt_code_ui-0.42.40.tar.gz 424.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gpt-code-ui 0.42.40
File Interpreter ABI Platform
gpt_code_ui-0.42.40-py3-none-any.whl Python 3 none any Details

Total release size: 850.9 kB

Release files / gpt_code_ui-0.42.40.tar.gz

Download URL gpt_code_ui-0.42.40.tar.gz
Size 424.2 kB
Tags Source
SHA-256 checksum
How to use checksums
63cec24bbdb8ee3348e7cbd5e3d38a6de218ed071fcc91c5bef4f0e0fe3b538b
BLAKE2b-256 checksum
How to use checksums
cd7560843f0dfd49e54e7d5b96d755b6850860a944432ee7f2eccd5ff4409e5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Release files / gpt_code_ui-0.42.40-py3-none-any.whl

Download URL gpt_code_ui-0.42.40-py3-none-any.whl
Size 426.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32fdd5c518c22f6863ee5b9f3cda6b579f1666b59813e74820c155e5b637d286
BLAKE2b-256 checksum
How to use checksums
9790ec40ee10762dd79f5de1189fe3d29f95bdba55d694bea02608940c14918e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Release history Release notifications | RSS feed

This release

0.42.40 This release

2 release files

0.42.9

2 release files

0.42.8

2 release files

0.42.7

2 release files

0.42.6

2 release files

0.42.5

2 release files

0.42.4

2 release files

0.42.3

2 release files

0.42.2

2 release files

0.42.1

2 release files

0.42.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page