Local-Code-Interpreter  by MrGreyfun

Local code execution for enhanced data analysis

created 1 year ago
312 stars

Top 87.5% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a local implementation of OpenAI's Advanced Data Analysis (formerly Code Interpreter), enabling users to execute Python code within their own environment. It targets developers and data scientists seeking greater control over execution, enhanced data security, and the flexibility to use GPT-3.5 or GPT-4 models without online sandbox limitations.

How It Works

The system leverages OpenAI's function calling capabilities to interpret user requests, generate Python code, and execute it within a local Jupyter environment. This approach allows for custom package installations, direct file handling without upload restrictions, and improved data privacy by keeping sensitive information on the user's machine. It also supports vision input via gpt-4-vision-preview through a non-end-to-end method.

Quick Start & Requirements

  • Install dependencies: pip install -r requirements.txt or pip install -r requirements_full.txt
  • Requires Python 3.9.16+, Jupyter Notebook 6.5.4, Gradio 3.39.0, OpenAI 1.40.3.
  • Configuration: Create config.json in src/ with API keys and model settings.
  • Run: python web_ui.py from the src/ directory.
  • Save conversations as Jupyter notebooks: python web_ui.py -n <path_to_notebook>
  • Official documentation: https://github.com/MrGreyfun/Local-Code-Interpreter

Highlighted Details

  • Supports both GPT-3.5 and GPT-4 models, including newer versions like gpt-4o.
  • Enables vision input with gpt-4-vision-preview.
  • Allows saving conversation history and executed code to Jupyter notebooks.
  • Offers enhanced data security by running code locally.

Maintenance & Community

  • Project is open for pull requests, with a "TO DO" list including Gradio updates.
  • No specific community channels (Discord/Slack) or notable contributors are listed in the README.

Licensing & Compatibility

  • The README does not explicitly state a license. The project is hosted on GitHub, implying a default open-source license, but specific terms are absent.
  • Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

Executing AI-generated code locally carries inherent security risks; users are strongly advised to use protective measures like virtual machines. The project relies on specific OpenAI model versions supporting function calling, and older versions will not work. Vision input is handled via a non-end-to-end approach.

Health Check
Last commit

11 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
3 stars in the last 90 days

Explore Similar Projects

Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
1 more.

gpt3-sandbox by shreyashankar

0%
3k
Web app for quick GPT-3 demo prototyping
created 5 years ago
updated 1 year ago
Feedback? Help us improve.