MetaGPT学习笔记
名词概念
Code = SOP(Team) 是核心哲学。
通过标准化的动作(Action)和角色(Role)抽象进行交互。
功能
可以通过安装子模块扩展能力,比如:
- RAG,
pip install 'metagpt[rag]'. 用途:用于基于 RAG(Retrieval-Augmented Generation,检索增强生成)的系统,结合多个 LLM(大语言模型)和向量存储技术。 - OCR,
pip install 'metagpt[ocr]'. 用途:用于光学字符识别(OCR)任务,识别和提取图像中的文本。 - search-ddg,
pip install 'metagpt[search-ddg]'. 用途:用于 DuckDuckGo 搜索功能。 - search-google,
pip install 'metagpt[search-google]'. 用途:用于与 Google API(如 Google 搜索 API)进行交互。 - selenium,
pip install 'metagpt[selenium]'. 用途:用于自动化浏览器操作和网页抓取。
联网功能
改造成本分析
Python语言适应性
提供API接口:
通过阿里云 Function AI 等 Serverless 平台,可将 Python 版 MetaGPT 部署为 HTTP 服务,供前端通过 API 调用
百炼部署教程
部署示例:
https://cap.console.aliyun.com/projects/cap-metagpt/production?tab=deployments&service=metagpt-webui
http://cap-metagpt.fcv3.1123606367976021.cn-hangzhou.fc.devsapp.net
叙事大纲:
https://docs.deepwisdom.ai/main/zh/guide/use_cases/agent/tutorial_assistant.html
文生图:
https://docs.deepwisdom.ai/main/zh/guide/use_cases/agent/interpreter/text2image.html
可视化:
https://docs.deepwisdom.ai/main/zh/guide/use_cases/agent/interpreter/data_visualization.html
设计技巧
分块
分块的设计解决了 LLM 大模型长文本的限制问题。
比如这个教程助手:生成技术类教程的例子:
先通过 LLM 大模型生成教程的目录,再对目录按照二级标题进行分块,对于每块目录按照标题生成详细内容,最后再将标题和内容进行拼接。
JS生态的类似项目
Mastra(13.5k star):
https://mastra.ai/
voltagent(1.8k star):
https://voltagent.dev/
亚马逊实验室:
https://github.com/awslabs/agent-squad
资料
Github:
https://github.com/FoundationAgents/MetaGPT
文档:
https://docs.deepwisdom.ai/main/zh/guide/get_started/introduction.html
论文:
https://arxiv.org/abs/2308.00352
技术拆解:
https://zhuanlan.zhihu.com/p/655238792
WebUI:
https://github.com/Ori-Replication/MetaGPT-WebUI
MetaGPT优化方案:
https://docs.deepwisdom.ai/v0.7/zh/rfcs/RFC-116-MetaGPT%E4%BC%98%E5%8C%96%E6%96%B9%E6%A1%88.html
Don’t Build Multi-Agents:
https://cognition.ai/blog/dont-build-multi-agents