WangShuXian6 / blog

FE-BLOG
https://wangshuxian6.github.io/blog/
MIT License
46 stars 10 forks source link

MetaGPT #154

Open WangShuXian6 opened 1 year ago

WangShuXian6 commented 1 year ago

MetaGPT

https://github.com/geekan/MetaGPT

多智能体元编程框架:给定一行需求,返回 PRD、设计、任务、存储库 使 GPTs 组成软件公司,协作处理更复杂的任务

https://github.com/geekan/MetaGPT/blob/main/docs/README_CN.md

WangShuXian6 commented 1 year ago

MetaGPT docker

docker-compose.yml

新建空目录 /opt/metagpt/config/opt/metagpt/workspace 下载 https://github.com/geekan/MetaGPT/blob/main/config/config.yaml 放入./opt/metagpt/config 文件夹 复制 config.yaml,重命名为key.yaml,在key.yaml内加入 ChatGPT API .[非必须,只是key.yaml优先级高于config.yaml] 配置 OPENAI_API_KEY,必填,需要GPT4,更换后需要重启容器 配置 OPENAI_API_BASE ChimeraGPT 必填

version: '3'
services:
  metagpt:
    image: metagpt/metagpt:v0.3
    restart: always
    #environment:
      #OPENAI_API_KEY: xxx
    volumes:
      #https://github.com/geekan/MetaGPT/blob/main/config/config.yaml 放入./opt/metagpt/config 文件夹
      - ./opt/metagpt/config:/app/metagpt/config
      #空文件夹
      - ./opt/metagpt/workspace:/app/metagpt/workspace
    container_name: metagpt
    privileged: true

#docker-compose up -d
#docker exec -it metagpt /bin/bash # 进入容器
#python startup.py "Write a cli snake game" # 在容器内运行metagpt
docker-compose up -d
docker exec -it metagpt /bin/bash # 进入容器
python startup.py "Write a cli snake game" # 在容器内运行metagpt