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

相关推荐
PPIO派欧云2 小时前
PPIO上线阿里Wan 2.6:制作电影级AI视频,对标Sora2
人工智能
知识分享小能手2 小时前
CentOS Stream 9入门学习教程,从入门到精通,Linux日志分析工具及应用 —语法详解与实战案例(17)
linux·学习·centos
火山kim2 小时前
经典论文研读报告:DAGGER (Dataset Aggregation)
人工智能·深度学习·机器学习
Coding茶水间2 小时前
基于深度学习的水果检测系统演示与介绍(YOLOv12/v11/v8/v5模型+Pyqt5界面+训练代码+数据集)
图像处理·人工智能·深度学习·yolo·目标检测·机器学习·计算机视觉
檐下翻书1732 小时前
算法透明度审核:AI 决策的 “黑箱” 如何被打开?
人工智能
undsky_2 小时前
【RuoYi-SpringBoot3-Pro】:接入 AI 对话能力
人工智能·spring boot·后端·ai·ruoyi
2301_783360132 小时前
【学习笔记】关于RNA_seq和Ribo_seq技术的对比和BAM生成
笔记·学习
qq_397731512 小时前
Objective-C 学习笔记(第9章)
笔记·学习·objective-c
网易伏羲3 小时前
网易伏羲受邀出席2025具身智能人形机器人年度盛会,并荣获“偃师·场景应用灵智奖
人工智能·群体智能·具身智能·游戏ai·网易伏羲·网易灵动·网易有灵智能体