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

相关推荐
ACP广源盛1392462567310 小时前
WAIC2026 国产算力浪潮@ACP#YLB3118 在算力矩阵中的存储定位与落地场景
大数据·人工智能·分布式·单片机·嵌入式硬件
ACP广源盛1392462567310 小时前
WAIC2026 国产算力浪潮下@ACP#IX8024 在算力矩阵中的定位与落地场景
大数据·数据库·人工智能·嵌入式硬件·线性代数·矩阵
3A Cloud11 小时前
从「心即理」到提示词工程:深度解析 ClawHub 上的阳明心学技能(yangming-xinxue)
人工智能·笔记
大模型探索者11 小时前
统一工作台+预测外呼:华润保险经纪如何用中关村科金呼叫中心重构保险服务全流程?
人工智能
品牌测评11 小时前
当AI编码平台走向订阅制与多模型聚合:以Alaya Code为例的技术观察
人工智能
茶马古道的搬运工11 小时前
AI 深度技能之-解读DeepSeek Harness(一)- 初见
人工智能
oort12311 小时前
OortCodex 是奥尔特云 OortCloudSmart 推出的国产化工程化 AI 编码 Agent(奥尔特云编码智能体)
大数据·人工智能·算法
TheBestRucy11 小时前
基于Dify的旅游攻略&王者荣耀攻略智能助手项目
服务器·开发语言·人工智能·python·算法·旅游
你想知道什么?11 小时前
朴素贝叶斯算法-学习笔记
笔记·学习·算法
天吾cc11 小时前
JSON 与 cJSON 学习笔记
笔记·学习·json