Skip to content

An open source implementation of OpenAI's ChatGPT Code interpreter for AOAI

License

Notifications You must be signed in to change notification settings

shawnmittal/gpt-code-ui-azure

 
 

Repository files navigation

AOAI Code Interpreter

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.

Installation for Local Test/Dev

This installation process assumes you have node and Python 3.9 or greater installed.

Open a terminal and run:

python3 -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt
pip install -e .
make compile_frontend
gptcode

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 Azure 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 the MAX_TOKEN_LIMIT to one that is compatible with the models you will be using. For instance, if you are using GPT-4-32k, you can increase the token limit from the default of 430,000 to slighly less than 32,000.

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

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

cp .env.azure-example .env
vim .env
gptcode

Original Code Credit

The original code base this repo is built on is from Rick Lamers. Here is the repository this repo is forked from GPT-Code UI.

About

An open source implementation of OpenAI's ChatGPT Code interpreter for AOAI

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 55.6%
  • TypeScript 31.3%
  • CSS 7.8%
  • Makefile 2.4%
  • Shell 1.3%
  • JavaScript 0.8%
  • HTML 0.8%