news 2026/4/16 20:03:12

AI Agent学习:MetaGPT之我的工作

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
AI Agent学习:MetaGPT之我的工作

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

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

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

llm的配置以及embedding配置:

# 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

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

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, }

二、用Discord 发送 github trending 跑通

做好配置

整个过程就是配置

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

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/4/16 11:06:02

蓝牙打印(二)不指定某个打印机

蓝牙页面-手动点击搜索蓝牙 然后选中某个打印机 进行手动点击打印--权限配置什么的 在上面某个都已配置了import React, { useEffect, useState, useRef } from react; import {Button,View,Alert,PermissionsAndroid,Platform,Text,ScrollView,TouchableOpacity, } from reac…

作者头像 李华
网站建设 2026/4/15 21:05:36

【第59套】来了,这一套出来了!

写在前面 车门焊死,考研将至,准备冲刺!我将持续为大家更新25最新真题解析!学得快的同学可以和我一起,全力冲刺~注意,目前我只发布最新年份的真题,其他年份的真题,一个是很…

作者头像 李华
网站建设 2026/4/16 14:40:58

【第60套】题目质量很高!

写在前面车门焊死,考研将至,准备冲刺!我将持续为大家更新25最新真题解析!学得快的同学可以和我一起,全力冲刺~注意,目前我只发布最新年份的真题,其他年份的真题,一个是很…

作者头像 李华