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

相关推荐
无极低码13 分钟前
ecGlypher新手安装分步指南(标准化流程)
人工智能·算法·自然语言处理·大模型·rag
grant-ADAS19 分钟前
记录paddlepaddleOCR从环境到使用默认模型,再训练自己的数据微调模型再推理
人工智能·深度学习
炎爆的土豆翔29 分钟前
OpenCV 阈值二值化优化实战:LUT 并行、手写 AVX2 与 cv::threshold 性能对比
人工智能·opencv·计算机视觉
智能相对论1 小时前
从AWE看到海尔智慧家庭步步引领
人工智能
云和数据.ChenGuang1 小时前
魔搭社区 测试AI案例故障
人工智能·深度学习·机器学习·ai·mindstudio
小锋学长生活大爆炸1 小时前
【工具】无需Token!WebAI2API将网页AI转为API使用
人工智能·深度学习·chatgpt·openclaw
昨夜见军贴06161 小时前
AI审核赋能司法鉴定:IACheck如何保障刑事证据检测报告精准无误、经得起推敲?
人工智能
测试_AI_一辰1 小时前
AI系统到底怎么测?一套六层测试框架(Agent案例)
人工智能·功能测试·需求分析·ai编程
运维小欣1 小时前
智能体选型实战指南
运维·人工智能
小超同学你好1 小时前
LangGraph 14. MCP:把“外部能力”标准化接入 LLM
人工智能·语言模型·transformer