Programmers teach you how to develop Jarvis

(0 comments)

Learn to develop Jarvis from programmers and unlock new smart computer experiences

In today's era of rapid technological development, every breakthrough in the field of artificial intelligence can make waves in the technological circle. The cloud3.5 model released by foreign AI giants and shopic companies once again refreshed the entire technology circle. Why? That is, it can transform an ordinary computer into a real "Jarvis" with API and general artificial intelligence.

1. Demonstration of magical functions similar to Jarvis

Now you just need to tell the computer a sentence as usual, such as "Find flights from Seattle to San Francisco next Tuesday to Thursday," and the computer will automatically open the flight search website and help you enter your address and information. search. The flight information you want, isn't this the real-life version of Iron Man Jarvis, it's amazing.

2. Specific steps for developing Jarvis

But how does such a powerful "Jarvis" do it? Fortunately, UNSHI has released its implementation source code. Let’s look at the specific steps.

  1. Download the source code : Enter the GITHUB source code address, slide to the startup document below, copy the get clo command first, and then paste it into the command line to download the source code of the project. 2. Enter the project : After downloading the source code, copy the CD command to enter the project to prepare for subsequent operations.
  2. Install dependencies : Copy the npm install command to install the project's dependencies so that the project has the basic conditions for running.
  3. Create environment variables : After the dependency installation is complete, copy the dot V dot sample file and create the environment variable dot UV. Once the file is created, you will find the enoppic API key stored in it. This key to the large AI model that can be used to call AOPPIC is very important.
  4. Start the project : After completing the previous steps, copy the npm start command and run it from the command line. At this time, look at the upper right corner and the project has been successfully launched.

3. Reveal the principles of project implementation

The successful launch of the project is only the first step. What is more worthy of discussion is its implementation principle. The entire project uses a cross-platform desktop application development framework - ELE (there may be typos in the original text here, presumably it is a development framework such as Electron). We open the main folder in the SRC folder. Stored here is the main process code of the Electron application, which is mainly responsible for creating and managing windows. Stored in the render folder is the code for rendering the corresponding square in the upper left corner. The button inside is the "Let's go" (start task button) on the page.

When we click the start task button, the "lang agent" method is triggered (this may also be a specific term in the material, or it may be a spelling mistake such as "lang agent"), which makes the computer have Jarvis thinking. Core approach to capabilities. It first obtains the user's chat content, and then calls ENOPIC's latest cloud3.5 dual-network model, which has powerful human-computer interaction capabilities. Afterwards, the model learns the current user's screen content by taking screenshots, and the model returns the corresponding action instructions. These action instructions are very important. It was they who turned the computer into a working "JARVIS".

For example, the "moss move" command tells the computer that the mouse should move to the specified XY axis coordinate position; the "left-click jack" command tells the computer to right-click and drag the current content to the specified coordinate position. In addition, there are cursor position instructions, left mouse click instructions, right mouse click instructions, middle mouse click instructions, mouse double click instructions, keyboard key instructions, etc. After each instruction is executed, the screenshot will be retaken, and The cloud3.5 model is notified so that it can continue to issue instructions to complete the user's task until the final model determines whether the task is completed. Once completed, FINNISH will be returned. This type of instruction indicates that the task has been completed and the entire program will terminate.

How about it? Isn't it interesting? Interested students can download the code and develop their own Jarvis. If there is anything you don’t understand during the process, you can also write it in the comment area and discuss it together. I hope you can gain something from your exploration of programming, and don’t forget to give me a follow so that you can learn more about cutting-edge programming knowledge. See you next time.

What do you think of Jarvis' development? Come and share your thoughts in the comment section. If you think this article is good, please share it with your friends who are also interested in programming.

Currently unrated

Comments


There are currently no comments

Please log in before commenting: Log in

Recent Posts

Archive

2024
2023
2022
2021
2020

Categories

Tags

Authors

Feeds

RSS / Atom