乐知付加密服务平台

如果你有资源, 平台可以帮你实现内容变现, 无需搭建知识付费服务平台。

点击访问官方网站 https://lezhifu.cc

扫码关注公众号 乐知付加密服务平台-微信公众号
autogpt执行任务流程 | chenzuoli's blog

autogpt执行任务流程

最近玩了下autogpt,用它爬取网页数据(成功),用它构建网站(失败)了,下面说下他是怎么做的。

任务流程

  1. 给本次执行的任务取名字
  2. 给autogpt取名字(它担任什么角色,是哪个方向的专家)
  3. 给autogpt添加任务,分5个goal,这是我们给它需要执行的任务
  4. 接下来就是它自己执行任务了:
    a. 根据你给的目标描述,形成自己的想法(Thoughts),给出这个想法的原因(Reason),然后给出这个想法的执行计划(Plan),然后自己对以上内容进行评判(CRITICISM),形成下一条执行指令(Next Action)
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    (env) ubuntu@VM-0-2-ubuntu:~/Documents/Auto-GPT-0.2.0$ python -m autogpt --gpt3only
    Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file.
    GPT3.5 Only Mode: ENABLED
    Welcome to Auto-GPT! Enter the name of your AI and its role below. Entering nothing will load defaults.
    Name your AI: For example, 'Entrepreneur-GPT'
    AI Name: website build ai tools
    website build ai tools here! I am at your service.
    Describe your AI's role: For example, 'an AI designed to autonomously develop and run businesses with the sole goal of increasing your net worth.'
    website build ai tools is: an AI tools for building website
    Enter up to 5 goals for your AI: For example: Increase net worth, Grow Twitter Account, Develop and manage multiple businesses autonomously'
    Enter nothing to load defaults, enter nothing when finished.
    Goal 1: 搜索一个官网模版程序,包含首页、产品介绍、关于等页面
    Goal 2: 使用flask api编写后台程序
    Goal 3: 使用bootstrap编写前端页面
    Goal 4: 所有项目源码保存到website文件夹中
    Goal 5: 并写一个readme.md,介绍下这个项目,并包含启动运行方法
    Using memory of type: LocalCache
    WEBSITE BUILD AI TOOLS THOUGHTS: I think we should start by searching for an appropriate website template that we can use for the project
    REASONING: As an AI tool for building websites, it's important to start off on the right foot by finding a template that can be a good representation of what we want to achieve.
    PLAN:
    - Search for a suitable website template
    CRITICISM: I can't think of any constructive criticism at the moment, but I will continue to reflect on my decisions
    Attempting to fix JSON by finding outermost brackets
    Apparently json was fixed.
    NEXT ACTION: COMMAND = google ARGUMENTS = {'input': 'website template for building AI tool website'}
    Enter 'y' to authorise command, 'y -N' to run N continuous commands, 'n' to exit program, or enter feedback for website build ai tools...
    请注意我给出5个goal之后,它开始执行的指令:THOUGHTS,REASONING,PLAN,CRITICISM,Next Action。
    当我输入y之后,它就会执行Next Action中的指令,然后再次给出THOUGHTS,REASONING,PLAN,CRITICISM,Next Action。
    当然你也可以输入y -N,让它连续执行N次Next Action中的指令。
  5. 上面我给出了构建一个官网,包含首页、产品介绍、关于三个页面的任务,但是他写的很复杂,下面是我记录的他额外做的事情,而且功能很多:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    1. WEBSITE BUILD AI TOOLS THOUGHTS:  We need to create a sign-in and sign-up page for our website.
    2. We should create an authentication system for our website.
    3. Choose a third-party email service provider (ESP) or set up an email server
    4. Add a search bar to the navigation bar of our website using Bootstrap
    5. Create a search results page that displays the products matching the user's search terms
    6. Choose a search engine such as ElasticSearch or Whoosh.
    7. Choose a payment gateway provider such as Stripe or PayPal, and create an account.
    8. We should add a subscription feature to our website.
    9. Create a view for users to enter their email address to request a password reset link.
    10. We need to add a contact us page to our website
    11. Create a new web page to host the contact form
    导致这个网站项目越来越复杂,最后执行了1个半小时,耗费了我数以万计的token之后,我终结了它的执行。

总结

autogpt是一个很有意思的项目,它可以帮助我们快速的构建一个项目,但是它的执行流程是怎么样的呢?我认为它是这样的:

  1. 通过给出的目标描述,形成自己的想法(Thoughts),给出这个想法的原因(Reason),然后给出这个想法的执行计划(Plan),然后自己对以上内容进行评判(CRITICISM),形成下一条执行指令(Next Action)
  2. 执行Next Action中的指令,然后再次给出THOUGHTS,REASONING,PLAN,CRITICISM,Next Action。
  3. 重复2,直到任务完成。

期间,用的是google search来获取信息,然后自己进行分析,形成下一条执行指令。

OP: 有兴趣的可以去玩玩,不过要注意token的消耗,我玩了1个半小时,消耗了我数以万计的token,最后还是失败了,不过我还是学到了很多东西,了解了它的执行流程。

开源地址:https://github.com/Significant-Gravitas/Auto-GPT.git


好了,今天的内容就到这里,谢谢大家的阅读,如果你觉得这篇文章对你有帮助,欢迎点赞,转发,评论,谢谢!

我是一名AI爱好者,欢迎关注我的公众号:BiuBiuAI社区,一起学习AI,一起成长!

-------------本文结束感谢您的阅读-------------