尝试部署并使用autoGPT

尝试部署并使用autoGPT

本文为作者学习记录自用,可能包含错误信息

任务过程

  • 部署autoGPT
  • 使用autoGPT

部署autoGPT过程

从github上clone了仓库,试运行,失败。尝试了docker等方式,未果,最终采用清华源安装依赖,并打开全局代理,解决。

在启动时遇到了检查openai api的情况,启用api付费服务后,解决。

但是运行时仍会发生各种错误,遂根据官网教程又装了一遍autoGPT,终于能够稳定运行。官网教程链接

bug及解决

  1. clone stable版本
git clone -b stable https://github.com/Significant-Gravitas/Auto-GPT.git
  1. 使用时需要开全局代理
  2. 需启用openai api付费服务
  3. 一定要运行docker并给docker换源:

(29条消息) Windows Docker 配置国内镜像源的两种方法_windows docker 镜像源_灬倪先森_的博客-CSDN博客

试运行autoGPT

bug及解决

  1. browse_website 过程出错:
DevTools listening on ws://127.0.0.1:8373/devtools/browser/82840282-fba5-4b6e-bcb6-ea9e581dbf21
[19972:24924:0706/111824.610:ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint 1.495 s for first_image_paint 1.493 s
[19972:24924:0706/111824.770:ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint 1.495 s for first_image_paint 1.493 s
[19972:24924:0706/111824.910:ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint 1.495 s for first_image_paint 1.493 s
[19972:24924:0706/111825.080:ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint 1.495 s for first_image_paint 1.493 s
[19972:24924:0706/111825.230:ERROR:page_load_metrics_update_dispatcher.cc(178)] Invalid first_paint 1.495 s for first_image_paint 1.493 s

可能是selenium的问题,需要更新下selenium。命令行运行:

pip install -U selenium
  1. openai err:
openai.error.APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/models (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))

解决:梯子问题。开全局代理,换个好点的梯子。

  1. browse_website过程,summarize_text(),缺少config

解决:搜索summarize_text,缺config参数的都加上。

过程记录

执行以下命令运行autoGPT(docker环境)

docker compose run --rm auto-gpt

测试1:写一个计算从1加到100的python代码

执行轮次:1

结果:完成任务

测试2:写一篇关于中国古代历史的文章

执行轮次:约40次

结果:

(要写一篇关于古代中国历史的文章,结果写成了四大发明的)

Introduction:

The Four Great Inventions of ancient China are the compass, gunpowder, papermaking, and printing. These inventions had a significant impact on civilization worldwide. They are celebrated for their historical significance and their contributions to science, technology, and culture.

The Compass:

The compass, invented during the Han Dynasty, revolutionized navigation and exploration. It allowed sailors to determine their direction accurately, leading to the expansion of trade and the exploration of new lands.

Gunpowder:

Gunpowder, invented during the Tang Dynasty, revolutionized warfare. It was initially used for fireworks and later developed into a powerful weapon. Gunpowder played a crucial role in the development of firearms and had a profound impact on military strategies.

Papermaking:

Papermaking, invented during the Han Dynasty, revolutionized the way information was recorded and disseminated. It replaced traditional writing materials such as bamboo and silk and made writing more accessible to a wider population. The invention of paper contributed to the spread of knowledge, the development of literature, and the advancement of bureaucracy.

Printing:

Printing, invented during the Tang Dynasty, revolutionized the production of books and disseminated knowledge on a large scale. The invention of movable type printing by Bi Sheng further improved the efficiency of printing. Printing played a crucial role in the preservation and transmission of knowledge.

Conclusion:

The Four Great Inventions of ancient China are a testament to the ingenuity and creativity of the Chinese people. These inventions not only had a significant impact on ancient Chinese society but also influenced the development of civilizations worldwide. They continue to be celebrated and recognized for their historical significance and their contributions to science, technology, and culture.

测试3:写一个网站,赞美一只鸡在打篮球

执行轮次:超过100轮

结果分析:

在本测试中使用了—continuous指令,该指令可以让autogpt自动执行直至其判定已经完成了任务为止,过程中不需要人类干预。autogpt反复执行了超过10轮,但还未完成任务,于是中止其运行。

检查其workspace,发现其已经生成了一个纯文本的html背景。但不知为何其依然没有停止运行。

检查工作记录,发现其似乎多次执行web_search和browse_website指令,反复在互联网上检索并归纳信息。在workspace内也生成了大量txt有关此题目的文本,但是其与autogpt在互联网上获取的文本量相比可以说是九牛一毛。

问题分析

  1. 系统不够稳定,仍然有许多bug。
  2. 执行效率低下,有时会发生死循环。
  3. 受网络波动影响较大。
  4. 未知的JSON写入错误,目前还未解决

人机交互上:

人机交互上,如不开启连续执行模式或者要求auto-gpt一次性执行若干条指令,auto-gpt每执行完一条指令前都会向人类汇报其即将执行的任务。但是,auto-gpt的指令执行结果却并不会以直观易懂的方式向人类呈现,这导致人类很难对auto-gpt的执行状态做出把握,并与其交互对其指令执行做出修正。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值