<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>【扩展教程】如何使用AutoGPT?</title>
</head>
<style>
img{max-width: 100%;}
</style>
<body style="padding: 15px;margin: 0 auto;max-width: 720px;">
<p>最近AutoGPT横空出世,主打的就是<strong>独立自主</strong>!</p><p>AutoGPT能够自己上网查资料、自己思考下一步该怎么做甚至可以操作你的电脑,简直就是AI天花板。</p><p>很多读者都希望我能出一篇非常详细的AutoGPT安装配置教程,没问题,请看本篇教程 💪</p><h1>准备工作</h1><ul class=" list-paddingleft-2"><li><p>电脑需要安装 Python 环境,版本至少要 3.10 以上(参考:<a href="https://mp.weixin.qq.com/s/3AYSkZVUsICHVHPCysF8NA"></a><a href="https://mp.weixin.qq.com/s/3AYSkZVUsICHVHPCysF8NA">https://mp.weixin.qq.com/s/3AYSkZVUsICHVHPCysF8NA</a> 或者按照网上其他教程)</p></li><li><p>电脑需要安装 Git(参考:<a href="https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git"></a><a href="https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git">https://git-scm.com/book/zh/v2/起步-安装-Git</a> 或者按照网上其他教程)</p></li><li><p>电脑具备特殊网络并且开启全局代理</p></li><li><p>ChatGPT 账号的 OpenAI API Key(参考ChatGPT教程的第三篇:<a href="https://enz.xet.tech/s/ISWFl"></a><a href="https://enz.xet.tech/s/ISWFl">https://enz.xet.tech/s/ISWFl</a>)</p></li></ul><h1>配置教程</h1><h2>1、打开电脑终端</h2><p>Windows电脑快捷键:Win + R ,输入 cmd 再点击 确定 即可打开电脑终端。</p><p style="text-align: center;"><img src="https://wechatapppro-1252524126.file.myqcloud.com/appjvw0xyju2052/image/b_u_6411a328d883a_1MTZvxLw/lgly1jr30e15.png" width="326" height="169" title="Untitled 0.png" alt="Untitled 0.png" style="width: 326px; height: 169.056px;"/></p><h2>2、在电脑上安装配置AutoGPT</h2><h3>1.克隆AutoGPT代码库</h3><p>将下面这段命令粘贴进去,并且按下 Enter 回车键</p><pre>git clone <https://github.com/Significant-Gravitas/Auto-GPT.git></pre><h3><img src="https://wechatapppro-1252524126.file.myqcloud.com/appjvw0xyju2052/image/b_u_6411a328d883a_1MTZvxLw/lgly1jr30gsc.png" width="100%" height="auto" title="Untitled 1.png" alt="Untitled 1.png"/></h3><h3>2.导航至刚才下载AutoGPT代码的目录</h3><p>将下面这段命令粘贴进去,并且按下 Enter 回车键</p><pre>cd Auto-GPT</pre><h3><img src="https://wechatapppro-1252524126.file.myqcloud.com/appjvw0xyju2052/image/b_u_6411a328d883a_1MTZvxLw/lgly1jr30toq.png" width="100%" height="auto" title="Untitled 2.png" alt="Untitled 2.png"/></h3><h3>3.安装AutoGPT所需要的依赖项</h3><p>将下面这段命令粘贴进去,并且按下 Enter 回车键</p><pre>pip install -r requirements.txt</pre><p><img src="https://wechatapppro-1252524126.file.myqcloud.com/appjvw0xyju2052/image/b_u_6411a328d883a_1MTZvxLw/lgly1jr30kzn.png" width="100%" height="auto" title="Untitled 3.png" alt="Untitled 3.png"/></p><p>然后就会如图所示自动下载安装对应的依赖项,可能会很慢,大家耐心等待。</p><p><img src="https://wechatapppro-1252524126.file.myqcloud.com/appjvw0xyju2052/image/b_u_6411a328d883a_1MTZvxLw/lgly1jr20tgg.png" width="100%" height="auto" title="4.png" alt="4.png"/></p><h3>4.配置AutoGPT</h3><ul class=" list-paddingleft-2"><li><p>首先我们在电脑本地找到刚才克隆的AutoGPT代码</p></li><ul class=" list-paddingleft-2" style="list-style-type: square;padding-left:30px;"><li><p>默认是在以下路径:</p></li><li><p><span style="color: unset; font-style: unset; font-variant-ligatures: unset; font-variant-caps: unset; font-weight: unset; text-decoration-line: unset; word-spacing: normal;">Windows:C: \Users\你的计算机用户名\Auto-GPT</span></p></li><li><p>macOS:/Users/你的计算机用户名/Auto-GPT</p></li><li><p><img src="https://wechatapppro-1252524126.file.myqcloud.com/appjvw0xyju2052/image/b_u_6411a328d883a_1MTZvxLw/lgly1jr20zzn.png" width="100%" height="auto" title="6.png" alt="6.png"/><br/></p></li><li><p>找到 .env.template 这个文件</p></li><li><p><img src="https://wechatapppro-1252524126.file.myqcloud.com/appjvw0xyju2052/image/b_u_6411a328d883a_1MTZvxLw/lgly1jr20p6f.png" width="100%" height="auto" title="7.png" alt="7.png"/><br/></p></li><li><p>将该文件重命名为 .env</p></li></ul><li><p><img src="https://wechatapppro-1252524126.file.myqcloud.com/appjvw0xyju2052/image/b_u_6411a328d883a_1MTZvxLw/lgly1jr20nfh.png" width="100%" height="auto" title="8.png" alt="8.png"/><br/></p></li><ul class=" list-paddingleft-2" style="list-style-type: square;padding-left:30px;"><li><p>然后选择<strong>以记事本的方式</strong>打开这个文件</p></li></ul></ul><ul class=" list-paddingleft-2"><ul class=" list-paddingleft-2" style="list-style-type: square;padding-left:30px;"><li><p>然后如图所示,找到 OPENAI 的选项,在箭头所指的位置替换上你的ChatGPT 账号的 OpenAI API Key</p><p><img src="https://wechatapppro-1252524126.file.myqcloud.com/appjvw0xyju2052/image/b_u_6411a328d883a_1MTZvxLw/lgly1jr204b6.png" width="100%" height="auto" title="9.png" alt="9.png"/><br/></p></li><li><p>最后保存并且关闭。</p></li></ul></ul><h2>3、使用AutoGPT</h2><p>以上步骤都配置好了之后,</p><h3>1.在终端中输入这个命令并且按下 Enter 回车键</h3><pre>python -m autogpt</pre><p><img src="https://wechatapppro-1252524126.file.myqcloud.com/appjvw0xyju2052/image/b_u_6411a328d883a_1MTZvxLw/lgly1jr2024e.png" width="100%" height="auto" title="11.png" alt="11.png"/></p><h3>2.然后会提示为AI取名,我这里取名是laogui(laogui)并且按下 Enter 回车键</h3><p><img src="https://wechatapppro-1252524126.file.myqcloud.com/appjvw0xyju2052/image/b_u_6411a328d883a_1MTZvxLw/lgly1jr202xj.png" width="100%" height="auto" title="12.png" alt="12.png"/></p><h3>3.紧接着就是为通过提示词来为这个AI设定身份</h3><p>我设定的是:is a software development engineer(是一名软件开发工程师)</p><p><img src="https://wechatapppro-1252524126.file.myqcloud.com/appjvw0xyju2052/image/b_u_6411a328d883a_1MTZvxLw/lgly1jr205od.png" width="100%" height="auto" title="13.png" alt="13.png"/></p><h3>4.紧接着还会提示输入五个GoaL</h3><p>GoaL也就是你希望AI达成的目标,最多输入五个。</p><p>如果你只设想了三个目标,那么只需要再输入第四点的时候多敲击一次Enter回车键就可以跳过。</p><p><img src="https://wechatapppro-1252524126.file.myqcloud.com/appjvw0xyju2052/image/b_u_6411a328d883a_1MTZvxLw/lgly1jr30w2j.png" width="100%" height="auto" title="14.png" alt="14.png"/></p><h3>5.然后AutoGPT就开始自己构思 Thinking 了</h3><p><img src="https://wechatapppro-1252524126.file.myqcloud.com/appjvw0xyju2052/image/b_u_6411a328d883a_1MTZvxLw/lgly1jr30o0x.png" width="100%" height="auto" title="15.png" alt="15.png"/></p><h3>6.Thinking 之后 AutoGPT 会根据你给的提示进行思考</h3><blockquote style="margin: 0px; padding: 0px 10px; border-left: 3px solid rgb(219, 219, 219);"><p>THOUGHTS: I need to start by cloning the repository for the website and setting up the basic structure.
REASONING:Cloning the repository will give me access to the codebase for the website, and allow me to start building the necessary components. Setting up the basic structure will give me a clear idea of what needs to be done next.
PLAN:Clone the repository Set up the basic structure
CRITICISM: I need to make sure I don't get bogged down in details and focus on the big picture.
SPEAK: I will start by cloning the repository and setting up the basic structure for the website.</p></blockquote><blockquote style="margin: 0px; padding: 0px 10px; border-left: 3px solid rgb(