AutoGPT (基于GPT3.5) 体验评估

给AutoGPT的任务

  1. 想象一下古代美女西施的容貌
  2. 按她的容貌画一张人像图片

先上结论

AutoGPT牛的地方:

  1. 充分理解任务、 能计划,知道自己有没有完成任务;
  2. 在没有完成任务的时候,能给出有逻辑的下一步计划;
  3. 而且能 “批判式” 提示可能得风险;
  4. 不论结果如何,能自主网上冲浪、下载文件、画画;

还不成熟的地方(很早期的一个demo代码、别期待过高):

  1. 不知道什么是正确的方向;上来第一步走错,后面越走越离谱;目前搜索引擎还都是基于关键词索引的、还不是基于语义的,第一步交给搜索引擎可能还不如给GPT;
  2. 缺”长期记忆”的情况下,难以积累经验,每次都像个没头苍蝇,有一两次歪打正着但是记不住;pinecone是能带来“长期记忆”,不过“经验判断”这块是需要人类来“教会”它的。
  3. 能自发驱动任务,但是缺乏可控

网上不少说AutoGPT取代ChatGPT的博流量的内容,是不客观的。AutoGPT基于ChatGPT的理解能力(GPT4更强、但是也有规划方面的天生缺陷),来做任务设定、推理,是展示ChatGPT的一个现象级应用,不是GPT这样的硬核基础设施级别的东西。AutoGPT将极大地启发GPT在各行业场景中的应用、进而带来工作流程的变革、效率的提升,但最终形态可能是各个领域定制化的GPT应用、相关自动机能可控输出,全自动很难解决实际问题。。。

安装与配置要点

根据 官方或github文档,安装和配置很详细,

https://autogpt.net/autogpt-installation-and-features/

GPT3.5也可以跑起来,注意命令参数

python scripts/main.py –gpt3only

我的安装里面,采用了最小配置(GPT3.5, Google Search API, Image Generation),对于概念验证比较省时省力,不用配置Redis, Pinecone, Speech等。具体如下:

To install Auto-GPT, follow these steps:

  1. Make sure you have all the requirements above, if not, install/get them.

The following commands should be executed in a CMD, Bash or Powershell window. To do this, go to a folder on your computer, click in the folder path at the top and type CMD, then press enter.

  1. Clone the repository: For this step you need Git installed, but you can just download the zip file instead by clicking the button at the top of this page ☝️
git clone https://github.com/Torantulino/Auto-GPT.git
  1. Navigate to the project directory: (Type this into your CMD window, you’re aiming to navigate the CMD window to the repository you just downloaded)
cd 'Auto-GPT'
  1. Install the required dependencies: (Again, type this into your CMD window)
pip install -r requirements.txt
  1. Rename .env.template to .env and fill in your OPENAI_API_KEY. If you plan to use Speech Mode, fill in your ELEVEN_LABS_API_KEY as well.

GOOGLE API KEYS CONFIGURATION

This section is optional, use the official google api if you are having issues with error 429 when running a google search. To use the google_official_search command, you need to set up your Google API keys in your environment variables.

  1. Go to the Google Cloud Console.
  2. If you don’t already have an account, create one and log in.
  3. Create a new project by clicking on the “Select a Project” dropdown at the top of the page and clicking “New Project”. Give it a name and click “Create”.
  4. Go to the APIs & Services Dashboard and click “Enable APIs and Services”. Search for “Custom Search API” and click on it, then click “Enable”.
  5. Go to the Credentials page and click “Create Credentials”. Choose “API Key”.
  6. Copy the API key and set it as an environment variable named GOOGLE_API_KEY on your machine. See setting up environment variables below.
  7. Go to the Custom Search Engine page and click “Add”.
  8. Set up your search engine by following the prompts. You can choose to search the entire web or specific sites.
  9. Once you’ve created your search engine, click on “Control Panel” and then “Basics”. Copy the “Search engine ID” and set it as an environment variable named CUSTOM_SEARCH_ENGINE_ID on your machine. See setting up environment variables below.

Remember that your free daily custom search quota allows only up to 100 searches. To increase this limit, you need to assign a billing account to the project to profit from up to 10K daily searches.

SETTING UP ENVIRONMENT VARIABLES

For Windows Users:

setx GOOGLE_API_KEY "YOUR_GOOGLE_API_KEY"
setx CUSTOM_SEARCH_ENGINE_ID "YOUR_CUSTOM_SEARCH_ENGINE_ID"

For macOS and Linux users:

export GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"
export CUSTOM_SEARCH_ENGINE_ID="YOUR_CUSTOM_SEARCH_ENGINE_ID"

GPT3.5 ONLY MODE

If you don’t have access to the GPT4 api, this mode will allow you to use Auto-GPT!

python scripts/main.py --gpt3only

It is recommended to use a virtual machine for tasks that require high security measures to prevent any potential harm to the main computer’s system and data.

🖼 IMAGE GENERATION

By default, Auto-GPT uses DALL-e for image generation. To use Stable Diffusion, a HuggingFace API Token is required.

Once you have a token, set these variables in your .env:

IMAGE_PROVIDER=sd
HUGGINGFACE_API_TOKEN="YOUR_HUGGINGFACE_API_TOKEN"