Description
Code Interpreter API is an open source Python library that rebuilds the ChatGPT Code Interpreter on top of LangChain. It lets a language model write and run Python code in a sandbox, so it can analyze datasets, draw stock charts, manipulate images and answer questions that need a calculation. You send it text and files and get back text and files, and it keeps the conversation memory so later questions build on earlier ones. The sandboxed Python code runs on CodeBox, and the library can reach the internet and install Python packages automatically when it needs them. The project says you can run everything locally except the language model call, which uses your own OpenAI API key, and it also supports Azure OpenAI through environment variables or a .env file. Local experiments install with an all extra, while a deployment can install the lighter package without the extra dependencies. The README shows examples such as a Bitcoin year-to-date chart and an analysis of the Iris dataset. For production, the author suggests the hosted CodeBox API for scaling, and the project welcomes contributions and bug reports. The source is public on GitHub, and the author accepts donations.…
Highlights
- Runs model-written Python in a sandbox
- Dataset analysis, charts and image manipulation
- Accepts text and files, returns text and files
- Conversation memory across questions
- Runs locally except the language model call
Ratings & Reviews
No ratings yet
Be the first to rate Codeinterpreter API.
People also visit
Codex Chatgpt Bridge
A safe bridge for Codex and ChatGPT to hand off coding work, save tokens
Codeinterpreter API FAQ
What is Code Interpreter API?
It is a Python library that gives a language model a sandbox to write and run code, modeled on the ChatGPT Code Interpreter.
Do I need an OpenAI account?
Yes. The language model calls use your own OpenAI API key, and Azure OpenAI can be configured instead.
Which tasks is it good for?
Dataset analysis, stock charting, image manipulation and other tasks that need code to produce a file or a number.
How do I install it?
Install the codeinterpreterapi package with pip. For local experiments, install the all extra, and for deployments the plain package is enough.
Can it run in production?
The author suggests using the CodeBox API for production scaling and says it is still in early development.
Is it free?
Yes. The library is open source. You pay for any OpenAI or Azure API usage yourself.
What are the best Codeinterpreter API alternatives?
Popular alternatives to Codeinterpreter API include aider, Codex Chatgpt Bridge and Yepanywhere. See all Codeinterpreter API alternatives
