Large language models (LLMs) have recently demonstrated remarkable capabilities to comprehend human intentions, engage in reasoning, and design planning-like behavior. To further unleash the power of LLMs to accomplish complex tasks, there is a growing trend to build agent framework that equips LLMs, such as ChatGPT, with tool-use abilities to connect with massive external APIs. In this work, we introduce ModelScope-Agent, a general and customizable agent framework for real-world applications, based on open-source LLMs as controllers. It provides a user-friendly system library, with customizable engine design to support model training on multiple open-source LLMs, while also enabling seamless integration with both model APIs and common APIs in a unified way. To equip the LLMs with tool-use abilities, a comprehensive framework has been proposed spanning over tool-use data collection, tool retrieval, tool registration, memory control, customized model training, and evaluation for practical real-world applications. Finally, we showcase ModelScopeGPT, a real-world intelligent assistant of ModelScope Community based on the ModelScope-Agent framework, which is able to connect open-source LLMs with more than 1000 public AI models and localized community knowledge in ModelScope. The ModelScope-Agent library\footnote{https://github.com/modelscope/modelscope-agent} and online demo\footnote{https://modelscope.cn/studios/damo/ModelScopeGPT/summary} are now publicly available.
翻译:大语言模型(LLMs)近期展现出理解人类意图、进行推理及设计类规划行为的卓越能力。为更充分释放大语言模型完成复杂任务的潜力,构建能赋予ChatGPT等大语言模型工具使用能力、使其连接海量外部API的智能体框架正成为重要趋势。本文提出ModelScope-Agent——一个面向真实世界应用、基于开源大语言模型作为控制器的通用可定制智能体框架。该框架提供用户友好的系统库,支持可定制的引擎设计以在多种开源大语言模型上进行模型训练,同时以统一方式实现与模型API及通用API的无缝集成。为赋予大语言模型工具使用能力,我们提出了涵盖工具使用数据收集、工具检索、工具注册、记忆控制、定制化模型训练及面向实际应用评估的完整框架。最后,我们展示了基于ModelScope-Agent框架的ModelScope Community真实世界智能助手——ModelScopeGPT,能够将开源大语言模型与ModelScope中超过1000个公开AI模型及本地化社区知识相连接。ModelScope-Agent库\footnote{https://github.com/modelscope/modelscope-agent}及在线演示\footnote{https://modelscope.cn/studios/damo/ModelScopeGPT/summary}现已公开提供。