![GPT-Code logo](https://private-user-images.githubusercontent.com/1309307/239578698-9ad4061d-2e26-4407-9431-109b650fb022.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyODE2MTAsIm5iZiI6MTcyNDI4MTMxMCwicGF0aCI6Ii8xMzA5MzA3LzIzOTU3ODY5OC05YWQ0MDYxZC0yZTI2LTQ0MDctOTQzMS0xMDliNjUwZmIwMjIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjFUMjMwMTUwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9N2FmN2QzMTRlYTAxMDBhMzI4YzJhNWRjYjkyMjlmMzYxMDQxMzhkNmM0NmRiOGMwMmM5NDMxNmRjMTAxYmMxYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.Ko6K8hKGV7-3-cHkibo-l9MAMNcMsQYPZf0JjG4KDkw)
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.
Open a terminal and run:
$ pip install gpt-code-ui
$ gptcode
![GPT-Code logo](https://private-user-images.githubusercontent.com/1309307/239578679-c29c504a-a7ed-4ae0-9360-d7224bc3e3d6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyODE2MTAsIm5iZiI6MTcyNDI4MTMxMCwicGF0aCI6Ii8xMzA5MzA3LzIzOTU3ODY3OS1jMjljNTA0YS1hN2VkLTRhZTAtOTM2MC1kNzIyNGJjM2UzZDYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjFUMjMwMTUwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzY1Y2ExNTU2OWVlMmI0ZjMyYWJjODgwZDk1MTBlMTA3NDYyN2E5NGEyNGExZTg4NzNmMGQ5NGNhZmViYmRiMCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.I_Sx_2nWiLHyawtZZnZLMsqi5JE1bNIkq6ESExdMdYY)
- 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)
You can put a .env in the working directory to load the OPENAI_API_KEY
environment variable.
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://...
).
Please do and have a look at the contributions guide! This should be a community initiative. I'll try my best to be responsive.