# AutoGPT: a quick way to write your paper

### 背景

之前几周开头但是没进行完，遇到了报错，今天再来，刚好今天记录下来，分享给大家。

信息爆炸本身，也在技术级别变化，如果你没有点技能从海量信息中获取要点，那只能做个垂直专注于某个领域的人了。但是，社会发展的方向明显看出是学科融合和跨学科，所以，谁也逃不掉：海量分析处理信息的能力。

而ChatGPT的出现，基本给AI的语义网络（最早的Web3定义之一）来了一阵强心剂。基于ChatGPT的许多二次开发就出现了，例如这个：[https://github.com/Significant-Gravitas/Auto-GPT](https://github.com/Significant-Gravitas/Auto-GPT)， 应该是star最多的？137K。。。

它能让你基于ChatGPT API（一般需要付费）来布置系列任务，完成信息搜集、信息分析、研究结果输出系列动作，给出你答案结果。这比你自己挨个问ChatGPT要好很多。可以自己联网，自己搜索，自己查询，自己分析（这里用了API），很Cool。

据说有人利用这个训练了自己的投资分析机器人，喂了几万篇研报分析后，写出来东西很像模像样了。个人计划基于这个，训练个自己用的研究机器人。

### 推荐

1. 推荐一个国人Hack？中文版：[https://github.com/kaqijiang/Auto-GPT-ZH](https://github.com/kaqijiang/Auto-GPT-ZH)，有说明，我按这个来的。
    
2. 还有一个Web page版本：[https://auto-agentgpt.com/](https://auto-agentgpt.com/)，可以自己部署：[https://autogpt-next-web.gitbook.io/autogpt-next-web/](https://autogpt-next-web.gitbook.io/autogpt-next-web/)，另外一个歪果仁的gui版本，不过只是一个壳：[https://github.com/thecookingsenpai/autogpt-gui](https://github.com/thecookingsenpai/autogpt-gui)
    
3. 当然，最推荐的是原版：[https://github.com/Significant-Gravitas/Auto-GPT](https://github.com/Significant-Gravitas/Auto-GPT)， 以及插件，下面看看list，真吓人，感觉无所不能了，更多插件看这里：[https://github.com/Significant-Gravitas/Auto-GPT-Plugins](https://github.com/Significant-Gravitas/Auto-GPT-Plugins)。
    
    | Plugin | Description | Location |
    | --- | --- | --- |
    | Astro Info | This gives Auto-GPT info about astronauts. | [autogpt\_plugins/astro](https://github.com/Significant-Gravitas/Auto-GPT-Plugins/tree/master/src/autogpt_plugins/astro) |
    | API Tools | This allows Auto-GPT to make API calls of various kinds. | [autogpt\_plugins/api\_tools](https://github.com/Significant-Gravitas/Auto-GPT-Plugins/tree/master/src/autogpt_plugins/api_tools) |
    | Baidu Search | This search plugin integrates Baidu search engines into Auto-GPT. | [autogpt\_plugins/baidu\_search](https://github.com/Significant-Gravitas/Auto-GPT-Plugins/tree/master/src/autogpt_plugins/baidu_search) |
    | Bing Search | This search plugin integrates Bing search engines into Auto-GPT. | [autogpt\_plugins/bing\_search](https://github.com/Significant-Gravitas/Auto-GPT-Plugins/tree/master/src/autogpt_plugins/bing_search) |
    | Bluesky | Enables Auto-GPT to retrieve posts from Bluesky and create new posts. | [autogpt\_plugins/bluesky](https://github.com/Significant-Gravitas/Auto-GPT-Plugins/tree/master/src/autogpt_plugins/bluesky) |
    | Email | Revolutionize email management with the Auto-GPT Email Plugin, leveraging AI to automate drafting and intelligent replies. | [autogpt\_plugins/email](https://github.com/Significant-Gravitas/Auto-GPT-Plugins/tree/master/src/autogpt_plugins/email) |
    | News Search | This search plugin integrates News Articles searches, using the NewsAPI aggregator into Auto-GPT. | [autogpt\_plugins/news\_search](https://github.com/Significant-Gravitas/Auto-GPT-Plugins/tree/master/src/autogpt_plugins/news_search) |
    | Planner | Simple Task Planner Module for Auto-GPT | [autogpt\_plugins/planner](https://github.com/Significant-Gravitas/Auto-GPT-Plugins/blob/master/src/autogpt_plugins/planner/) |
    | Random Values | Enable Auto-GPT to generate various random numbers and strings. | [autogpt\_plugins/random\_values](https://github.com/Significant-Gravitas/Auto-GPT-Plugins/tree/master/src/autogpt_plugins/random_values) |
    
    ### 过程
    
    1. Get API keys: [https://platform.openai.com/account/api-keys](https://platform.openai.com/account/api-keys)
        
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1685783849659/53f87dc9-a0fc-496c-9415-c8cdcee37f3d.png align="center")
    
    1. Docker：用Mac上的Docker，省心省力，[https://hub.docker.com/r/significantgravitas/auto-gpt](https://hub.docker.com/r/significantgravitas/auto-gpt)
        
    2. Follow你用的版本说了，run起来，这个不多说了，大家自己follow
        
    3. 关键部分：
        
        报错了咋处理，毕竟是开源免费的，不是商业级别的稳定产品。
        
        常见错误：
        
        **跑不起来：**
        
        我尝试了用yml文件build和用docker pull hub的image，env也设置了apikey，但不知道是因为我两种都尝试造成了docker端口冲突？没有正常run起来，报错是找不到env的api key啥的
        
        解决办法：
        
        两个docker都删除，完全使用[https://docs.agpt.co/setup/#configuration](https://docs.agpt.co/setup/#configuration)，里面说的命令行操作（提前安装好mac的docker），不pull，编辑yaml，使用build，然后run，起来了
        
        **api报错：**
        
        .env编辑的时候有个坑，里面有两个openaiapi的入口，一个没有注释（记得是），一个有注释（Azure那里），使用一个即可，另外一个注释掉，我开始赋值了第一个，总是报错，原来第二个赋值为your-open-ai-key啥的了
        
        **Python报错:**
        
        python -m venv venvAutoGPT
        
        source venvAutoGPT/bin/activate
        
        pip3 install --upgrade pip
        
        这里把python -m venv venvAutoGPT，在mac中改为python3 -m venv venvAutoGPT
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1686279378521/cf6a56f5-9218-4771-9f5a-42bad31de2fc.png align="center")
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1686279397547/bc84a94f-b97b-4bcd-bcdc-5c4e43820558.png align="center")
        
    4. 使用案例
        
        之前编辑了一个案例task，但没run起来，这次来个简单点的
        
        1&gt;搜索关于crypto token，crypto wallet在全球各个国家使用情况的文章
        
        2&gt;找到Top 20
        
        3&gt;提取要点内容，给出当下这个国家的经济现状等哪些方面可能需要crypto的帮助来改善？给出是什么核心原因造成了这个crypto的使用现状
        
        4&gt;形成一篇整合各国crypto使用现状的分析文章
        
    5. 其他可能？
        
        更新到了最新的0.4，刚跑正常，试试看
        
    6. 发现API 的费用需要单独购买，免费给了18$的额度，不过估计很快就用光了
