|
01。 概述 随着对话式和基于聊天的语言模型的快速发展,复杂任务解决取得了显著进展。然而,它们的成功在很大程度上依赖于人类输入来引导对话,这可能具有挑战性且耗时。本文探讨了构建可扩展技术以促进交流代理之间的自主合作,并洞察其“认知”过程的潜力。为了应对实现自主合作的挑战,我们提出了一种名为角色扮演的新型交流代理框架。我们的方法涉及使用初始提示引导聊天代理完成任务,同时保持与人类意图的一致性。我们展示了如何使用角色扮演生成用于研究聊天代理行为和能力的对话数据,为调查对话语言模型提供了宝贵的资源。我们的贡献包括引入一种新型交流代理框架,为研究多代理系统的合作行为和能力提供一种可扩展的方法,并将我们的库开源以支持交流代理及更广泛领域的研究。 CAMEL是一个开源库,旨在研究自主和交流代理。该库认为,大规模研究这些代理能够提供对其行为、能力和潜在风险的宝贵见解。为了促进这一领域的研究,CAMEL实现了并支持了多种类型的代理、任务、提示、模型和模拟环境。 02。 如何使用? 提供了一个演示,展示了两个 ChatGPT 代理(扮演 Python 程序员)和股票交易员之间的对话,他们合作开发股票市场交易机器人。 安装
要安装基本 CAMEL 库: 某些功能需要额外的依赖项: pipinstall'camel-ai[all]'
pipinstall'camel-ai[huggingface-agent]'
pipinstall'camel-ai[tools]'
从源代码使用Poetry安装CAMEL(推荐方式): #Makesureyourpythonversionislaterthan3.9 #Youcanusepyenvtomanagemultiplepythonverisonsinyoursytstem
#Clonegithubrepo gitclonehttps://github.com/camel-ai/camel.git
#Changedirectoryintoprojectdirectory cdcamel
#Ifyoudidn'tinstallpeotrybefore pipinstallpoetry#(Optional)
#Wesuggestusingpython3.10 poetryenvusepython3.10#(Optional)
#ActivateCAMELvirtualenvironment poetryshell
#InstallthebaseCAMELlibrary #Ittakesabout90seconds poetryinstall
#InstallCAMELwithalldependencies poetryinstall-Eall#(Optional)
#Exitthevirtualenvironment exit
使用 conda 和 pip 从源安装 CAMEL:
#Createacondavirtualenvironment condacreate--namecamelpython=3.9
#ActivateCAMELcondaenvironment condaactivatecamel
#Clonegithubrepo gitclone-bv0.1.6.6https://github.com/camel-ai/camel.git
#Changedirectoryintoprojectdirectory cdcamel
#InstallCAMELfromsource pipinstall-e.
#Orifyouwanttouseallotherextrapackages pipinstall-e.[all]#(Optional)
|