AI Agent学习:MetaGPT之我的工作

ref: ‍⁠​‌​‌​‬‍​​​​‍​​​⁠⁠​⁠​​‬‍‍​​‌​​‬​​《MetaGPT智能体开发入门》教程 - 飞书云文档

【多Agent】MetaGPT学习教程 - 飞书云文档

一、配置本地部署的llm和embedding

llm的配置以及embedding配置:

bash 复制代码
# Full Example: https://github.com/geekan/MetaGPT/blob/main/config/config2.example.yaml
# Reflected Code: https://github.com/geekan/MetaGPT/blob/main/metagpt/config2.py
# Config Docs: https://docs.deepwisdom.ai/main/en/guide/get_started/configuration.html
llm:
  api_type: 'openai'
  base_url : 'http://0.0.0.0:8000/v1'
  model: 'llama'


# RAG Embedding.
# For backward compatibility, if the embedding is not set and the llm's api_type is either openai or azure, the llm's config will be used. 
embedding:
  api_type: "openai"  "ollama" # openai / azure / gemini / ollama etc. Check EmbeddingType for more options.
  base_url: "http://0.0.0.0:8011/"
  api_key: ""
  model: "bge-large-en-v1.5"
  api_version: "v1"
  embed_batch_size: 100
  dimensions: # output dimension of embedding model

对于llm 如果max_model_len不能承受更多的话,需要修改metagpt\provider\openrouter_reasoning.py

python 复制代码
    def _get_max_tokens(self, messages: list[dict]):
        if not self.auto_max_tokens:
            return 1024
            return self.config.max_token
        # FIXME
        # https://community.openai.com/t/why-is-gpt-3-5-turbo-1106-max-tokens-limited-to-4096/494973/3
        return min(get_max_completion_tokens(messages, self.model, self.config.max_token), 1024) #4096)

对于rag案例:

需要修改metagpt\rag\schema.py

python 复制代码
class FAISSRetrieverConfig(IndexRetrieverConfig):
    """Config for FAISS-based retrievers."""

    dimensions: int = Field(default=0, description="Dimensionality of the vectors for FAISS index construction.")

    _embedding_type_to_dimensions: ClassVar[dict[EmbeddingType, int]] = {
        EmbeddingType.GEMINI: 768,
        EmbeddingType.OLLAMA: 1024, #4096,
    }

做好配置

整个过程就是配置

bash 复制代码
export DISCORD_TOKEN=
export DISCORD_CHANNEL_ID=

三、用Discord 发送 github trending动态 进阶版

读取readme总结

对应whole_run2.py

四、用Discord发送 huggingface paper动态

对应whole_run-huggingface.py

五、用邮件发送github trending动态

对应whole_run-email.py

六、多智能体:你画我猜 multi-ones.py

相关推荐
njsgcs1 分钟前
我有待做任务清单和不良操作图片集,如何设计ai agent协助我完成工作
大数据·人工智能
AI科技星4 分钟前
《全域数学》第三卷:代数原本 · 全书详述【乖乖数学】
开发语言·人工智能·机器学习·数学建模
AI科技星9 分钟前
《全域数学》第一部 数术本源 第三卷 代数原本第14篇 附录二 猜想证明【乖乖数学】
人工智能·算法·数学建模·数据挖掘·量子计算
XD7429716369 分钟前
科技早报|2026年5月2日:AI 编程工具开始按用量收费
人工智能·科技·ai编程·github copilot·科技早报
liangdabiao9 分钟前
乐高摩托车深度报告-致敬张雪夺冠 -基于llm-wiki技术自动化写文章的效果
运维·人工智能·自动化
KC27012 分钟前
Prompt 注入攻击的 5 种姿势和防御指南
人工智能
不懒不懒14 分钟前
【从零入门本地大模型:Ollama 安装部署 + Qwen2.5 实现零样本情感分类】
人工智能·分类·数据挖掘·大模型·ollama
徐健峰18 分钟前
GPT-image-2 热门玩法实战(二):AI 面相分析 & 个人色彩诊断 — 上传自拍秒出专业报告
人工智能·gpt
冰西瓜60019 分钟前
深度学习的数学原理(三十二)—— Transformer全场景掩码机制详解
人工智能·深度学习·transformer
绘梨衣54720 分钟前
Agentic RAG、传统RAG、ReAct、Function Calling 核心关系
人工智能·chatgpt·tensorflow