MetaGPT( The Multi-Agent Framework):颠覆AI开发的革命性多智能体元编程框架

news2024/10/6 3:30:50

一个多智能体元编程框架,给定一行需求,它可以返回产品文档、架构设计、任务列表和代码。这个项目提供了一种创新的方式来管理和执行项目,将需求转化为具体的文档和任务列表,使项目管理变得高效而智能。对于需要进行规划和协调的项目,这个框架提供了强大的支持.

MetaGPT’s 能力展示

https://github.com/geekan/MetaGPT/assets/34952977/34345016-5d13-489d-b9f9-b82ace413419

例如,如果你输入’ python startup.py ’ ’ Design a RecSys like今日头条’ ',你会得到很多输出,其中之一是data & api Design

生成一个分析和设计示例的成本约为0.2美元(在GPT-4 API费用中),而生成一个完整项目的成本约为2.0美元。

1.安装

1.1 安装视频指南

  • Matthew Berman: How To Install MetaGPT - Build A Startup With One Prompt!!
  • 常规安装
#Step 1: Ensure that NPM is installed on your system. Then install mermaid-js. (If you don't have npm in your computer, please go to the Node.js offical website to install Node.js https://nodejs.org/ and then you will have npm tool in your computer.)
npm --version
sudo npm install -g @mermaid-js/mermaid-cli

#Step 2: Ensure that Python 3.9+ is installed on your system. You can check this by using:
python --version

#Step 3: Clone the repository to your local machine, and install it.
git clone https://github.com/geekan/metagpt
cd metagpt
pip install -e.

Note:

  • If already have Chrome, Chromium, or MS Edge installed, you can skip downloading Chromium by setting the environment variable
    PUPPETEER_SKIP_CHROMIUM_DOWNLOAD to true.

  • Some people are having issues installing this tool globally. Installing it locally is an alternative solution,

    npm install @mermaid-js/mermaid-cli
    
  • don’t forget to the configuration for mmdc in config.yml

    PUPPETEER_CONFIG: "./config/puppeteer-config.json"
    MMDC: "./node_modules/.bin/mmdc"
    
  • if pip install -e. fails with error [Errno 13] Permission denied: '/usr/local/lib/python3.11/dist-packages/test-easy-install-13129.write-test', try instead running pip install -e. --user

  • 将Mermaid图表转换为SVG、PNG和PDF格式。除了Node.js版本的mermaid - cli之外,你现在还可以选择使用Python版本的剧作家、pyppeteer或mermaid。

    • Playwright

      • Install Playwright
      pip install playwright
      
      • Install the Required Browsers

      to support PDF conversion, please install Chrominum.

      playwright install --with-deps chromium
      
      • modify config.yaml

      uncomment MERMAID_ENGINE from config.yaml and change it to playwright

      MERMAID_ENGINE: playwright
      
    • pyppeteer

      • Install pyppeteer
      pip install pyppeteer
      
      • Use your own Browsers

      pyppeteer alow you use installed browsers, please set the following envirment

      export PUPPETEER_EXECUTABLE_PATH = /path/to/your/chromium or edge or chrome
      

      please do not use this command to install browser, it is too old

      pyppeteer-install
      
      • modify config.yaml

      uncomment MERMAID_ENGINE from config.yaml and change it to pyppeteer

      MERMAID_ENGINE: pyppeteer
      
    • mermaid.ink

      • modify config.yaml

      uncomment MERMAID_ENGINE from config.yaml and change it to ink

      MERMAID_ENGINE: ink
      

      Note: this method does not support pdf export.

1.2 Docker安装指南

#Step 1: Download metagpt official image and prepare config.yaml
docker pull metagpt/metagpt:latest
mkdir -p /opt/metagpt/{config,workspace}
docker run --rm metagpt/metagpt:latest cat /app/metagpt/config/config.yaml > /opt/metagpt/config/key.yaml
vim /opt/metagpt/config/key.yaml # Change the config

#Step 2: Run metagpt demo with container
docker run --rm \
    --privileged \
    -v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
    -v /opt/metagpt/workspace:/app/metagpt/workspace \
    metagpt/metagpt:latest \
    python startup.py "Write a cli snake game"

#You can also start a container and execute commands in it
docker run --name metagpt -d \
    --privileged \
    -v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
    -v /opt/metagpt/workspace:/app/metagpt/workspace \
    metagpt/metagpt:latest

docker exec -it metagpt /bin/bash
$ python startup.py "Write a cli snake game"

The command docker run ... do the following things:

  • Run in privileged mode to have permission to run the browser
  • Map host directory /opt/metagpt/config to container directory /app/metagpt/config
  • Map host directory /opt/metagpt/workspace to container directory /app/metagpt/workspace
  • Execute the demo command python startup.py "Write a cli snake game"

1.3 构造自定义

#You can also build metagpt image by yourself.
git clone https://github.com/geekan/MetaGPT.git
cd MetaGPT && docker build -t metagpt:custom .

1.4 相关配置

  • Configure your OPENAI_API_KEY in any of config/key.yaml / config/config.yaml / env
  • Priority order: config/key.yaml > config/config.yaml > env
#Copy the configuration file and make the necessary modifications.
cp config/config.yaml config/key.yaml
Variable Nameconfig/key.yamlenv
OPENAI_API_KEY # Replace with your own keyOPENAI_API_KEY: “sk-…”export OPENAI_API_KEY=“sk-…”
OPENAI_API_BASE # OptionalOPENAI_API_BASE: “https://<YOUR_SITE>/v1”export OPENAI_API_BASE=“https://<YOUR_SITE>/v1”

2.相关教程

#Run the script
python startup.py "Write a cli snake game"
#Do not hire an engineer to implement the project
python startup.py "Write a cli snake game" --implement False
#Hire an engineer and perform code reviews
python startup.py "Write a cli snake game" --code_review True

After running the script, you can find your new project in the workspace/ directory.

  • Preference of Platform or Tool

You can tell which platform or tool you want to use when stating your requirements.

python startup.py "Write a cli snake game based on pygame"
  • 使用指南
NAME
    startup.py - We are a software startup comprised of AI. By investing in us, you are empowering a future filled with limitless possibilities.

SYNOPSIS
    startup.py IDEA <flags>

DESCRIPTION
    We are a software startup comprised of AI. By investing in us, you are empowering a future filled with limitless possibilities.

POSITIONAL ARGUMENTS
    IDEA
        Type: str
        Your innovative idea, such as "Creating a snake game."

FLAGS
    --investment=INVESTMENT
        Type: float
        Default: 3.0
        As an investor, you have the opportunity to contribute a certain dollar amount to this AI company.
    --n_round=N_ROUND
        Type: int
        Default: 5

NOTES
    You can also use flags syntax for POSITIONAL ARGUMENTS

2.1 快速开始

It is difficult to install and configure the local environment for some users. The following tutorials will allow you to quickly experience the charm of MetaGPT.

  • MetaGPT quickstart

Try it on Huggingface Space

  • https://huggingface.co/spaces/deepwisdom/MetaGPT
  • 相关链接

https://github.com/geekan/MetaGPT/assets/2707039/5e8c1062-8c35-440f-bb20-2b0320f8d27d

3.更多推荐:终端LLM AI模型:mlc-llm

大型语言模型的机器学习编译(MLC LLM)是一种高性能的通用部署解决方案,允许使用带有编译器加速的本机api来本地部署任何大型语言模型。这个项目的使命是让每个人都能使用ML编译技术在每个人的设备上开发、优化和部署人工智能模型。

项目链接:https://github.com/mlc-ai/mlc-llm

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1341985.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

ssm基于JavaEE的智能实时疫情监管服务平台的设计与实现+jsp论文

摘 要 社会发展日新月异&#xff0c;用计算机应用实现数据管理功能已经算是很完善的了&#xff0c;但是随着移动互联网的到来&#xff0c;处理信息不再受制于地理位置的限制&#xff0c;处理信息及时高效&#xff0c;备受人们的喜爱。本次开发一套智能实时疫情监管服务平台有管…

VScode的入门手册(IDEA迁移到VScode)

从IDEA迁移到VScode的过程中&#xff0c;会有很多不适应的地方&#xff0c;下面算是一篇VScode的入门手册&#xff0c;也可以说是从IDEA迁移到VScode的手册。 命令面板&#xff08;Command Palette&#xff09; 允许你快速访问和执行命令。 在 Visual Studio Code 中&#x…

数据库管理-第128期 2023总结(202301229)

数据库管理-第128期 2023总结&#xff08;202301229&#xff09; 到了2023年的最后一个工作日&#xff0c;也该对即将过去的2023年做一个小小的总结&#xff1a; 1 写文章 2023年在CSDN总共写了82篇文章。 2023年4月开始在墨天轮写文章&#xff0c;总共写了75篇文章&#xf…

设计模式(4)--对象行为(8)--状态

1. 意图 允许一个对象在其内部状态改变时改变它的行为。 2. 三种角色 上下文环境(Context)、抽象状态(State)、具体状态(Concrete State) 3. 优点 3.1 将与特定状态相关的行为局部化&#xff0c;并且将不同状态的行为分割开来。 3.2 使得状态转换显式化。 3.3 State对象可被共…

2024年医院设备维修培训安排

在你还考虑该不该干的时候别人已经走好远了 小时候觉得忘带作业是天大的事&#xff0c;高中的时候&#xff0c;觉得考不上大学是天大的事&#xff0c;恋爱的时候&#xff0c;觉得跟喜欢的人分开是天大的事&#xff0c;到现在回头看看&#xff0c;那些难以跨过的山&#xff0c;…

EST-100身份证社保卡签批屏按捺终端PC版web版本http协议接口文档,支持web网页开发对接使用

<!DOCTYPE html><html lang"zh-CN"><head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width,initial-scale1.0"><title>演示DEMO</title><script type"text/…

深入理解Mysql MHA高可用集群搭建:从实验到实战

1. 简介 MHA&#xff08;Master High Availability&#xff09;是一个高效的开源MySQL高可用性解决方案。由日本开发者yoshinorim&#xff08;前DeNA员工&#xff0c;现在Facebook&#xff09;创建&#xff0c;MHA支持MySQL的主从复制架构&#xff0c;自动化主节点故障转移。当…

EMC指令是什么?

摘要: EMC指令是欧盟颁布的一系列法规&#xff0c;旨在规范电子产品的电磁兼容性&#xff08;Electromagnetic Compatibility&#xff0c;EMC&#xff09;。这些指令要求产品在正常操作时不会产生电磁干扰&#xff0c;也不会对其他设备造成影响&#xff0c;同时能够抵御外部电磁…

什么是骨传导耳机?骨传导能保护听力吗?

骨传导耳机是一种非常特殊的蓝牙耳机&#xff0c;它通过骨传导技术将声音直接传送到内耳。这种技术不同于传统耳机&#xff0c;它不通过空气传送声音&#xff0c;而是通过头骨的振动来传送声音。 并且骨传导耳机能够在一定程度上起到保护听力的作用&#xff0c;主要是因为它们不…

vite + javascript 创建纯 javascript项目

1、环境搭建&#xff1a;需要安装 node 管理器命令&#xff1a;安装了node的后&#xff0c;可以使用 npm &#xff0c;也可以安装使用 cnpm / pnpm 下载 cnpm npm install -g cnpm --registryhttps://registry.npm.taobao.org 下载 pnpm npm i -g pnpm pnpm config set r…

ssm基于JavaWeb的校园心理健康网站的设计与实现论文

摘 要 如今的时代&#xff0c;是有史以来最好的时代&#xff0c;随着计算机的发展到现在的移动终端的发展&#xff0c;国内目前信息技术已经在世界上遥遥领先&#xff0c;让人们感觉到处于信息大爆炸的社会。信息时代的信息处理肯定不能用之前的手工处理这样的解决方法&#x…

大创项目推荐 深度学习OCR中文识别 - opencv python

文章目录 0 前言1 课题背景2 实现效果3 文本区域检测网络-CTPN4 文本识别网络-CRNN5 最后 0 前言 &#x1f525; 优质竞赛项目系列&#xff0c;今天要分享的是 &#x1f6a9; **基于深度学习OCR中文识别系统 ** 该项目较为新颖&#xff0c;适合作为竞赛课题方向&#xff0c;…

提升FTP上传速度的方法(提升FTP下载速度的技巧)

在企业日常经营中&#xff0c;快速上传和下载文件至关重要。然而&#xff0c;在使用FTP&#xff08;文件传输协议&#xff09;进行文件传输时&#xff0c;速度可能成为瓶颈。为了提升工作效率&#xff0c;以下是一些建议&#xff0c;可以帮助企业提高FTP上传下载速度。 1、确保…

【赠书第14期】AI短视频制作一本通:文本生成视频+图片生成视频+视频生成视频

文章目录 前言 1 前期准备 2 拍摄与录制 3 后期编辑 4 技巧与注意事项 5 推荐图书 6 粉丝福利 前言 随着智能技术的迅猛发展&#xff0c;AI 短视频制作成为了一种新兴而创新的表达方式&#xff0c;广泛应用于社交媒体、广告营销、教育培训等领域。本文将介绍 AI 短视频…

VD6283TX环境光传感器(2)----移植闪烁频率代码

VD6283TX环境光传感器----2.移植闪烁频率代码 闪烁定义视频教学样品申请源码下载参考代码硬件准备开发板设置生成STM32CUBEMX串口配置IIC配置X-CUBE-ALSADC使用定时器触发采样KEIL配置FFT代码配置app_x-cube-als.c需要添加函数演示结果 闪烁定义 光学闪烁是指人造光源产生的光…

uniapp中uview组件库的Search 搜索 的用法

目录 基本使用 #设置输入框形状 #是否开启清除控件 #是否开启右边控件 #自定义样式 API #Props #Events 基本使用 通过placeholder参数设置占位内容通过v-model双向绑定一个变量值&#xff0c;设置初始化时搜索框的值&#xff0c;如果初始内容为空&#xff0c;那么请绑…

Thinkphp开发的返佣商城分销商城理财商城源码

&#xff08;本站长在localhost安装测试&#xff0c;发现提示有错&#xff0c;具体问题没有时间查找了&#xff0c;或者php解密插件没有安装&#xff0c;有能力的朋友自行折腾。&#xff09; 程序基于 THINKPHP6VUE 全新开发&#xff0c;保障安全的同时大大提高代码执行效率。…

基于梯度和频率域的深度超分辨率新方法笔记二

一、实现方法和网络结构的剖析 1.1 网络结构 梯度校准模块(GCM)和频率感知模块&#xff08;FAM&#xff09; 1&#xff09;梯度校准模块(GCM) 1、使用梯度映射函数&#xff08;如下图所示&#xff09;&#xff0c;将RGB和LR深度图映射到梯度域 2、再梯度域中使用RGB的梯度特…

彭涛:2023年终复盘,工作,团队,个人!

眨眼2023即将结束&#xff0c;2024即将开启&#xff0c;每年这个时候&#xff0c;都会简单总结下自己这一年&#xff0c;既是对今年的一个复盘和回顾&#xff0c;也是对新一年的向往和期待。 我的2023年&#xff0c;大概分为 「个人」&#xff0c;「家庭」&#xff0c;「团队」…

C语言——指针题目“指针探测器“

如果你觉得你指针学的自我感觉良好&#xff0c;甚至已经到达了炉火纯青的地步&#xff0c;不妨来试试这道题目&#xff1f; #include<stdio.h> int main() {char* c[] { "ENTER","NEW","POINT","FIRST" };char** cp[] { c 3…