Skip to main content

Watcher To Open Interpreter Quick Start

Part 1.What is Open Interpreter

Open Interpreter is an open-source tool that facilitates interaction between users and their computers by enabling natural language commands to execute code in various programming languages. It acts as a bridge, allowing users to write instructions in plain language, which the interpreter then translates into executable code. This enhances productivity and makes programming more accessible, especially for those who may not be familiar with coding syntax.

Part 2.Operations in Node-RED

In this part, we need 4 modules to finish the job. There are SenseCap Watcher OpenSteam, function, http request and debug module.

  1. SenseCap Watcher OpenSteam module: Get message from Watcher to Node-RED.
  2. function module: Process data to get what message you want.
  3. http request module: Send message to Open Interpreter via http potocal.
  4. debug module: Debug the whole work flow to check if everything is ok.

We will show you how to configure those modules in following steps.

Step 1.Configure SenseCap Watcher OpenSteam module

Fisrt of all, you need to run a task in Watcher following the video below. If you want to know more please click here.

If you don't know how to send message from Watcher to Node_RED yet, please click here.

Step 2.Configure function module

msg.payload = {
content: msg.payload.value[0].content,
image_url: msg.payload.value[0].image_url
};
return msg;

Step 3.Configure http request module

We use POST request for security and send to port 3000, and we will use Open Interpreter to keep listening port 3000 later.

Step 4.Configure debug module

Select as following image.

When finished configuration, don't forget to Deploy them.

Part 3.Operations in Open Interpreter

tip

Before we keep continue, the prerequisite is you need to have Python development enviroment in your computer.

If you haven't, please click here for your reference.

Step 5.Install Open Interpreter

After installing Python, you can install Open Interpreter via Python easily, just one command.

pip install open-interpreter

Step 6.Start Open Interpreter

Interpreter have two mode, online mode and local mode. By default, Interpreter select online mode, using OpenAI GhatGPT gpt-4-turbo API Key. You can also set it to local mode that means you need to download model to run locally.

tip

I would recommend online mode because online mode is much faster and smarter than local mode and local mode often stuck.

Online mode

  1. Before we start, we need a OpenAI API Key. You can click here to get one if you are a OpenAI GPT-4 paid member.
  1. And then, we input interpreter this command to start it and it require us input API Key. After that, we set the model to gpt-4-turbo successfully.

Local mode

  1. Before we start, we need to download a model to run it locally. I would recommend Ollama here. Click here to jump. You should download this application and install it.
  1. When you install it successfully, run ollama in your PowerShell(or Terminal),it will like following image. And then, run ollama run llama3.1 to download model llama3.1 and run.
  1. If you want to try other models, click here to jump. Just run ollama run xxx.
  1. After installing model and run successfully, we can continue. We need to input interpreter -l this command to get into it,and then select ollama and llama3.1(the model you just download).

Step 7.Run commands

tip

I try many times to run the following command in Interpreter, but not every times the reaction of Interpreter are the same.

So you need to interact with Interpreter according to its reaction. Sometimes you need to reboot it and try again.

Here is my natural language command sent to Open Interpreter.

i want you to keep listening computer port 3000 and extract the image_url and open it in browser.

In the first time, Interpreter said she initial setup only support GET requests for simplicity but my request is POST for security, so she can't support it and suggeset me to modify the server to handle POST requests. I said yes and she will run automatically.

As you can see, the code run successfully, listening port 3000.

Now, use Watcher to detect yourself. The image will be captured and opened in browser automatically.

Congratulations on successfully integrating the Watcher and Open Interpreter applications! This achievement marks a significant step in your journey, showcasing your dedication and skill. As you move forward, you'll find even more fascinating concepts and tools to explore. Embrace the challenges and discoveries that lie ahead, and enjoy every moment of this exciting adventure!

Tech Support & Product Discussion

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.

Loading Comments...