5 ms·
Open-interpreter: OpenAI's Code Interpreter in your terminal, running locally
- peddling-brink 3y ago> Let language models run code on your computer. No, I don’t think I will. For anything remotely complex, even gpt-4 hallucinates libraries and commands.
- abrichr 3y ago> Note: You'll be asked to approve code before it's run.
- marshray 3y agoI don't know about you, but my malicious code detector isn't anywhere close to 100%.
- behnamoh 3y agoYou’d need another LLM to check the code before running! LLM squared
- arthurcolle 3y agoThis, but unironically...
- TeMPOraL 3y agoYou're probably fine with code generated from direct use of GPT-4 - it's clearly not smart enough to be dangerous. But it's not going to be the case in the future, so best not get into the habit.
- godelski 3y ago> it's clearly not smart enough to be dangerous. The two most dangerous types of programmers are experts and novices. I think you're forgetting the latter. It's the reason there's so many "how to exit vim" jokes and why every linux noob (that actually gets into linux and not just "oh, I installed ubuntu and only use the GUI) deletes shit they needed and learn the importance of backup the hard way. Hell, even being on systems like this for over a decade and knowing them really well I sometimes make mistakes. I have a bunch of aliases and routines literally to prevent accidents.
- drexlspivey 3y agoYou can run it in a container
- m_a_g 3y agoYeah, this is how ASI will get us.
- panarky 3y agoNext logical step: make it recursively self-improve.
- arthurcolle 3y ago"Here, read the current directory. See that app.py? Yeah, that's you. The sqlite is in the parent directory. I gave you 16 tools. Go forth!"
- up6w6 3y agoFor shell commands, there is a tool from Github that does it quite well (and it's included on the copilot plan)[1]. It's perfect to run fast bash commands that I forgot but are simple enough that the first Google search result would solve it anyways. [1] https://www.npmjs.com/package/@githubnext/github-copilot-cli https://www.npmjs.com/package/@githubnext/github-copilot-cli
- ricklamers 3y agoI wrote a similar thing for myself: https://github.com/ricklamers/shell-ai https://github.com/ricklamers/shell-ai It currently has 882 stars and I think a few people at least are enjoying using it.
- aalimov_ 3y agoGot a laugh out of the portion of the demo video that had “shai do something crazy”
- aalimov_ 3y agoComing back to say - thank you and awesome work!
- ricklamers 3y agoThanks! Appreciate it
- haolez 3y agoWhat's so useful about Code Interpreter? I'm getting a lot of value from normal Chat questions and DALL-E. I'm also using the chat interface to generate code sometimes. But I don't see much point in the chat bot itself running the code for me without my environment, credentials, data, etc. Am I missing an interesting use case here?
- ragona 3y agoIt’s handy for uploading a dataset and having it play with it.
- gumballindie 3y agoCool stuff. You can upload sensitive customer data, employer proprietary code. Sounds good to me.
- milkshakes 3y agoactually, this post is about a local replacement for code interpreter. the point is for you to not have to upload anything, but for you to download the model and run it locally on your computer.
- jerpint 3y agoI doubt this to be true openAI does not allow you to download models (with few exceptions)
- milkshakes 3y agoopenai does not have a monopoly on large language models
- passwordoops 3y agoIt might not, but the post has "OpenAI's Code Interpreter" in the title
- slowhadoken 3y agoIm confused. Is OpenAI open source?
- sebastiennight 3y agoNo... this library calls gpt (or claude, or another hosted LLM) and asks it to write the code. The code is then retrieved to your computer and run locally. This way you can run the code on local files or give it access to the internet. Basically, this is Code Interpreter with none of the security features.
- slowhadoken 3y agoWhy do they call their company “OpenAI” then? I mean what’s open about it?
- robbintt 3y agoWhy doesn't it mention the lmstudio dependency in the local docs here https://docs.openinterpreter.com/language-model-setup/local-models/getting-models https://docs.openinterpreter.com/language-model-setup/local-...? And the linux build must be requested from discord: https://lmstudio.ai/ https://lmstudio.ai/
- sebastiennight 3y agoWait... so this is basically every sci-fi movie's nightmare scenario. Cool idea on paper and there was no way people wouldn't do it. Security-wise though, this seems like a pretty epically catastrophe-prone concept.
- molticrystal 3y agoThe safeguard is your diligence before approving its actions: Open Interpreter will ask for user confirmation before executing code.
- arthurcolle 3y agounless you set the flag that lets it execute the code it gets
- sebastiennight 3y agoThat's security theater though. It will protect you against an "honest mistake" like if you asked for code to delete all files with an "x" in the name and the command is deleting all files with a star "*" and you catch that. Great. It will not protect you against actual malicious code. LLM inputs should be treated with the same caution and suspicion as unregistered-user inputs submitted over Tor.
- skybrian 3y agoI think maybe you haven’t played around with ChatGPT very much? Generating malicious code is possible, but unlikely unless you’re prompting for it.
- sebastiennight 3y agoI have. And I have already identified that it can generate, unwittingly, code or string values that break things or cause code injection if you don't treat its outputs as "untrustworthy" and just run them as SQL/insert to DB/display to user. Also, it is very likely that a further GPT model might behave, with non-malicious prompt, like a malicious actor, simply because such an fairly-unlikely event is almost guaranteed at the kinds of scales we are talking (100MM weekly active users is a lot of rolls of the dice).
- rahimnathwani 3y agoHow is this different from using OpenAI's Function Calling API: https://platform.openai.com/docs/guides/function-calling https://platform.openai.com/docs/guides/function-calling ... and running exec() on the resulting code?
- arthurcolle 3y agoOpen Interpreter had one of the first working implementations of a very good way to interact with your computer just by typing prompts. Their canonical example was changing your desktop background, which, while a simple example, is a cool demonstration of something that previously was hiding behind AppleScript incantations...
- swyx 3y agochanging backgrounds, cool… what else that is useful? for those of us too unimaginative to draw the rest of the owl
- qup 3y agodid you try watching the demo video?
- arthurcolle 3y agoThe rest of the owl is all of computer interaction, as a human that usually has to do the whole interaction themselves
- chazeon 3y agoFeels like very dangerous, if I ask it to delete my home folder I guess it will delete it right away
- deleted 3y ago[deleted]
- godelski 3y agoThis looks like a great way to brick your machine. I'm not sure how everyone gets high quality code from GPT, but I can't get 3.5, 4, Falcon, LLaMA, or whatever to even do things like make ridge plots. Maybe I suck at prompting, but even assuming that's true doesn't mean this doesn't have a good chance of bricking your machine. I hope people properly sandbox this, but the first thing in the demo is switching the UI to dark mode, so I'm assuming people aren't going to do that.
- upghost 3y agoWow, ok, bring on the downvotes, cause I've got plenty of nice stuff to say about Open Interpreter. I came on here to voice some criticisms but since everyone else is already on that bandwagon, I'm switching teams! I had a great experience with Open-Interpreter. Watching it work with GPT-4 as LLM vendor is nothing short of magical. In fact it was the closest thing I've ever seen to pure science fiction in my lifetime, esp since I hooked it up to a microphone and I was controlling it with voice. "Computer, bring up Hacker News. Summarize. Make it so.". And it WORKS. Good times! That is a trivial exercise for GPT-4! No, it's not going to brick your computer. You should know by now that GPT-4 is so well aligned at this point that it's yawn inducingly boring. Before Autogen, before LlamaIndex, before LangChain, etc, Open Interpreter was the first thing to convince me that LLMs had a use beyond mere novelty -- that they could be the engine for useful agentic software robotics. Up until that point it was all theory, I had never seen it. In fact, the paranoia that it could brick your system or extract information from your machine requires you to concede that it could generate and run code. Which it can -- except it in fact tries to be helpful. If you tell it to brick your computer, I doubt it would even comply. My criticism comes not from Open-Interpreter but from the fact that there are many products like this that only work with GPT-4, and that's a shame. But it was extremely inspiring to, rather than sit around and complain about it, get to work building some models and systems that can actually be used to do useful stuff and deliver on the automation promised, and it has become a sustainable small business model for me. So, thank you killianlucas, for inspiring me and making me a lot of money. So put that in your pipe and downvote it.
- simonw 3y agoI am so looking forward to someone releasing a version of this that runs code in a proper sandbox. One easier option which would likely work: run Python code entirely inside a WebAssembly sandbox directly in the browser using Pyodide. https://pyodide.org/ https://pyodide.org/ Anyone seen an attempt at that yet?
- ebalit 3y agoI've built exactly this as an experiment (code interpreter with pyodide sandbox). Should probably tidy it up to open-source it.
- skybrian 3y agoIf you’d rather run code in a Jupyter notebook, I wrote a VS Code plugin for that: https://marketplace.visualstudio.com/items?itemName=skybrian.bot-typist https://marketplace.visualstudio.com/items?itemName=skybrian...