// the find
shroominic/codeinterpreter-api
👾 Open source implementation of the ChatGPT Code Interpreter
A LangChain-based wrapper that replicates ChatGPT's Code Interpreter feature — it takes a user prompt, generates Python code, runs it in a sandboxed CodeBox environment, and returns the output including generated files. Aimed at developers who want to embed data analysis or charting capabilities in their own apps without going through the ChatGPT UI.
The session abstraction is clean: context managers handle setup/teardown, and sync/async variants both work without separate APIs. File I/O is first-class — passing CSVs in and getting PNGs back is a one-liner. The CodeBox backend decouples execution from the LLM call, so the sandboxing concern is isolated. Local-first design means you can run the whole thing without any cloud dependency beyond OpenAI.
Last commit was November 2024, and OpenAI shipped a native Assistants API with Code Interpreter months before that — this project is essentially racing a better-funded first-party feature and losing. The dependency on LangChain is a significant drag: LangChain's API surface changes constantly and the version pins in this repo have already drifted. The CodeBox backend is a separate dependency with sparse documentation, and the production path routes through a commercial service the author controls, which is a hidden cost and single point of failure. No meaningful test coverage for the core session logic — only example-runner scripts.