Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAI code interpreter (draft) #37

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Conversation

kharvd
Copy link
Owner

@kharvd kharvd commented Jun 23, 2023

This is in a super draft state, but mostly works, including inline images (at least in iTerm2). Under the hood, this uses new Function Calling API. Added Docker container for some extra security.

Screenshot 2023-06-23 at 12 28 56 AM

I had to disable all other models and price tracking for now (the latter because of issues with some packages in arm64 Docker)

Instructions

Letting an LLM execute arbitrary code is potentially unsafe, use at your own risk and only in an isolated environment such as Docker

  1. Make sure Docker is installed
cp gpt.yml.template gpt.yml

# insert your OpenAI key in gpt.yml

mkdir mnt
docker build -t gpt-cli .

# note that running with --no_price
docker run --rm -v ./mnt:/mnt -it gpt-cli python --no_price

# History is saved between runs

Known issues

  • Sometimes IPython kernel hangs after a restart

@kharvd kharvd mentioned this pull request Jun 23, 2023
wip

wip

wip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant