So far we have used generative models that, in response to a specific user request (prompt), offer an output: a text, an image, an audio track, and so on. Open Interpreter is an open source, locally run implementation of the OpenAI code interpreter. We have already seen what ChatGPT Code Interpreter is, a feature reserved for paying OpenAI users that allows artificial intelligence to run code on the cloud and perform a wide range of tasks, including generating graphs and maps, solving mathematical problems, editing files, and much more.
Open Interpreter, on the other hand, allows you to run the programming code generated by artificial intelligence, directly on a normal PC, workstation or server. This type of approach promises to be truly revolutionary because the user can ask the generative modelusing natural language instructions, to automate tasks, create content and carry out operations that would normally require many steps and the use of many tools.
Differenze tra Open Interpreter e ChatGPT Code Interpreter
The goal of Open Interpreter, as also explained on the official website, is to allow users LLM models (Large Language Model) to run code directly on the user’s system.
While Code Interpretercurrently based on the GPT-4 generative model, offers the opportunity to carry out the required tasks relying on the OpenAI infrastructure and without the possibility of drawing on data stored on local systems, Open Interpreter is able to execute the code in the environment of the user, with full access to the Internet e no restrictions in time and file size.
Conversely, Code Interpreter is hosted on OpenAI servers, is closed and severely limited: it does not have access to the Internet, has a limited set of pre-installed packages and does not allow you to upload and process code files. dimensions higher than 100 MB. The code executed a runtime it cannot take more than 120 seconds to complete all its processing: otherwise you will get an error message.
Running code locally with Open Interpreter: what can be the advantages?
To those who were skeptical about leaving run code on the local systemlet’s say right away that Open Interpreter responds exactly to requests (prompt) of users. Also, before running the code, the user must approve it specifically. Furthermore, there is a safe mode, currently in an experimental phase, which allows any risk to be mitigated. At the moment it only does this from the terminal window but, in the near future, it will be possible to use adedicated application.
For example, the user can order the execution of commands using the natural language in order to exploit the computational capabilities of the machine in use. Open Interpreter can therefore create and edit photos, videos, PDFs, control a browser, analyze large data sets, and so on. Can also generate applications actual using languages such as Python, JavaScript, PHP and so on.
In this demonstration video, you can see how Open Interpreter can modify system settings, create an application that acts as a timer in just a few seconds, summarize the contents of a document, interact with installed apps (such as email and calendar) to collect information and share it with other users, transform all the documents contained in a folder into PDF and so on. There is truly no limit to what you can do.
Installation and use
Installing Open Interpreter is simply done via the following command:
pip install open-interpreter
Once installation is complete, it is possible to interact with Open Interpreter through an interface similar to ChatGPT which focuses on the terminal window: just type interpreter
and communicate your request, preferably with as clear and detailed a description as possible.
To run both commands, you need to have Python and the pip package manager installed on the system.
The behavior of Open Interpreter can currently be customized by intervening on the configuration file config.yaml
. By using multiple configurations, you can have Open Interpreter switch between them.
In addition to the terminal window, users can develop simple apps which acquire as input the prompt to be passed to Open Interpreter. For example, the following simple lines of Python code allow you to obtain a graph containing the required information and then start one interactive chat:
import interpreter
interpreter.chat("Crea un grafico con l'andamento dei valori azionari di Apple e Meta") # Esegue il singolo comando indicato
interpreter.chat() # Avvia una chat interattiva
All the information about syntax advanced that Open Interpreter supports, are available on the official GitHub repository.