Play ChatGPT: Auto-GPT project deployment and evaluation

1. Introduction to Auto-GPT

Recently, the super-large-scale language model represented by ChatGPT has become popular, and various secondary development projects are emerging in an endless stream.

This week, Auto-ChatGPT is blown up in the AI ​​circle, and it has 61.4K likes on GitHub.

Project address: https://github.com/Torantulino/Auto-GPT

Introduced in the original words of the project: " Auto-GPT is an experimental open source application that demonstrates the capabilities of the GPT-4 language model. This program is powered by GPT-4 to autonomously develop and manage businesses to increase net worth. As One of the first examples of GPT-4 operating fully autonomously, Auto-GPT pushes the boundaries of what's possible in AI. "

Little Chat is our right-hand man, but when using it to complete tasks, we need to use "spells" to awaken its magical power. If the "spell" you input is not suitable enough, Chat will resist you, and then you can only continue to search for a suitable "spell" until Chat is in a good mood. But if you manage to cast the right "spell", Little Chat will hang out with you and happily answer your questions. Next, you just need to keep using the "spell" to ask it questions until you complete the task. This process is called "human-in-the-loop". Are you familiar with it? This concept is what MOSS told Tu Hengyu in the easter egg of "The Wandering Earth 2": " Balabala is the learning of human-in-the-loop based on Yaya consciousness" .

Then, as a mature general artificial intelligence (AGI), TA should learn to do iterative thinking by itself, so as to achieve the ultimate goal. For example, if your instructor asks you: "What is the function of Mp1p protein?", as a mature research dog, you will most likely go to Baidu, Google, and Pubmed to find relevant literature, and then come up with one, two, three.

And this is what the Auto-GPT project wants to do: to enable artificial intelligence to complete tasks through self-iterative thinking like humans. Therefore it has the following properties:

(1) Access to the Internet: You must be able to surf the Internet, and be able to obtain various knowledge through searching and information collection.

(2) Long-term and short-term memory management: You must have a good memory, be able to store important information for a long time, and at the same time be able to quickly access short-term memory to facilitate timely processing of tasks.

(3) GPT-4 text generation: You also need to have a writing pen, and be able to use GPT-4 to generate high-quality texts, such as articles and emails.

(4) Visit popular websites and platforms: To learn about the latest current events and hot topics like humans, you must know which popular websites and platforms to visit.

(5) GPT-3.5 file management: Finally, you must be able to organize files. Like GPT-3.5, you can efficiently store and manage files.

2. Auto-GPT deployment

First explain the prerequisites for deployment:

  1. smooth network;
  2. There is a small Chart account (because OpenAI's API Key is used), no PLUS account is required;
  3. Install Python 3.8 or above (mine is based on Anaconda environment).

All of the above are indispensable.

Optional items:

  1. PINECONE's API Key (memory function);
  2. GOOGLE_API_KEY and CUSTOM_SEARCH_ENGINE_ID (connect to Google engine);

The first step is to download the project

(a) This is simple, just go to the website of the project to download: "Code" - "Download ZIP" ;

(b) Unzip to a path, preferably in English, for example, mine is: E:\Auto-GPT\Auto-GPT-master-0415;

The second step is to install the python dependency library

(a) The dependent libraries required by the project are all in this folder named "requirements.txt" . Open it and see that there are 26 in total ;

(b) Remember to install Anaconda first, open Anaconda Prompt (anaconda), and enter the code:

conda create -n gptac_venv python=3.9 #生成一个名为gptac_venv的环境,我的python版本是3.9

Note: The old picture is used here, the same steps as before

Choose y here;

This means the installation is successful.

(c) Enter the newly created environment and enter the code:

conda activate gptac_venv

Note: The old picture is used here, the same steps as before

It can be seen that the base in the front brackets has become gptac_venv , which means switching from the basic environment ( base ) to the new environment we just created ( gptac_venv ), and then install the dependent library in this new environment.

(d) To install the dependent library, first switch the path to the path of the previously saved project: E:\Auto-GPT\Auto-GPT-master-0415, the operation is:

输入“e:”——回车,进入到E盘——输入“cd E:\Auto-GPT\Auto-GPT-master-0415”——回车,搞定;

Note: I installed the autogpt environment as jet_gpt. The reason why the above is gptac_venv is because I am lazy and use the old picture.

Then enter the code:

python -m pip install -r requirements.txt

Press Enter to start the installation.

There are many things that need to be installed, personal experience: it is related to the speed of the network, I am a magician.

If the installation is successful, there will be no error in the whole white text. If there is an error reported in red letters, let the Eight Immortals cross the sea to show their magical powers.

The third step is to configure OPENAI_API_KEY

(a) Ensure smooth network (most important);

(b) Generate OpenAI API Key, enter the URL, and log in to the account:

https://platform.openai.com/account/api-keyshttps://platform.openai.com/account/api-keys

Click "Create new secret key" - a pop-up window - copy your Key.

(c) Find the .env.template file in the project file, rename it to the .env file, and open the project file with Notepad, fill in your API KEY:

Note: The API here does not require double quotes: "".

The fourth step is to configure PINECONE_API_KEY

(a) Ensure smooth network (most important);

(b) Generate Pinecone API Key, enter the URL, register, and log in to the account:

Vector Database for Vector Search | PineconeThe #1 vector database. Search through billions of items for similar matches to any object, in milliseconds. It’s the next generation of search, an API call away.https://login.pinecone.io/

Click "API key" - a pop-up window;

 Copy out your PINECONE_API_KEY (Vaule) and PINECONE_ENV (Environment);

Fill in the .env file respectively:

The fourth step is to configure the GOOGLE search engine

There are two main things to fill in here: GOOGLE_API_KEY and CUSTOM_SEARCH_ENGINE_ID.

(a) Ensure smooth network (most important);

(b) Generate Google API Key, enter the URL, register, and log in to the account:

https://console.cloud.google.com/welcome?project=high-unity-383319&pli=1https://console.cloud.google.com/welcome?project=high-unity-383319&pli=1

(c) Create an unorganized latest project:

 (d) Enter custom search api , then select Management > Credentials > Create Credentials > API Key

 

 (e) This is GOOGLE_API_KEY ; then look at the ID of USTOM_SEARCH_ENGINE_ID:

(a) Make sure the network is smooth (the most important);
(b) CUSTOM_SEARCH_ENGINE_ID is generated, enter the URL:

https://programmablesearchengine.google.com/about/https://programmablesearchengine.google.com/about/

(c) Generate CUSTOM_SEARCH_ENGINE_ID, enter URL:

(d) Copy the CUSTOM_SEARCH_ENGINE_ID.

 Finally, open the .env file and enter GOOGLE_API_KEY and CUSTOM_SEARCH_ENGINE_ID: 

The fifth step is to run the program

Or open the Anaconda Prompt (anaconda) just now, switch to the newly created environment, and the project path: enter the code:

python -m autogpt --gpt3only

Enter!

 If the green word welcome back appears, it means success!

Simple usage: give the AI ​​a name> set the task> set the task target (up to 5)> run the program> command AutoGPT with y, n and other commands at each step.

3. Auto-GPT evaluation

(1) Set goals

Name: JET-GPT

Role: A mycologist with a focus on disseminated fungal infections

Goals: Introduce the research progress of fungal Mp1p protein

To put it simply, it is to help me briefly introduce the research progress of fungal Mp1p protein. Since I have run it before, here it automatically calls the last program, just enter y to continue running:

(2) Procedural thinking process:

 Show it with Google Translate:

TA will split the task by himself, first, go to Google search! !

We enter y and let TA proceed to the next step:

 TA went to the literature and analyzed:

Read out some information: 

 Then TA himself analyzes that this method is not good: "Since I have limited short-term memory, launching a GPT agent trained on text summarization will reduce my workload and save my time", and then how to solve: "I should launch a GPT agent to help me generate a summary of the information I gather from the website about the Mp1p protein. To do this, I can use the "start_agent" command."

 After running it again, some summaries are given:

It doesn't seem right, give it a try to continue self-reflection: TA seems to think that I want to watch the Mp1p of fungi:

Then he continued to search for documents on the Internet, and found that he could not read the information of the documents: "The maximum context length of this model is 4097 tokens" , which cannot be limited by GPT3.5. Then the information can only be extracted from the TA's known knowledge, which may be currently compiled.

So far, I let TA stop.

Summary: Although the result is not ideal, the process is really impressive. After all, it is in its infancy, and I can only use GPT3.5. There is still a lot of room for improvement in the future.

Four, a few points for attention

(1) About not being able to connect to the Internet

It is said that you need to change this 8000 to 4000 in the .env file. Rivers and lakes rumors, for reference.

 (2) Fees for API Key

It is said that there is a fee for calling OpenAI Key, and a new account registration, at least 5 dollars will be given away, and it will be gone when it is used up.

I ran this time and the cost is as follows. The total is 0.13 US dollars, which is almost 1 yuan, and the cost is still very high.

So let’s play and play, be aware that this is a process of burning money!

Guess you like

Origin blog.csdn.net/qq_30452897/article/details/130172611