AgentGPT#
AgentGPT 是 Githu 作者@asim-shrestha的作品,AgentGPT 通过设定既定目标,让 ChatGPT 对你的目标进行拆解和分析,并且根据拆解的任务进行循环分析,实现自动化目标任务流程,得到目标结果数据。
目标支持 ChatGPT3.5/4.0 的模型,属于开源项目,可以实现个人本地化部署。
需要注意的是,用户需要开通 ChatGPT 的付费 API 才能使用(也就是说,需要已经完成绑卡付费的 ChatGPT 账号)
官方体验地址:Reworkd/AgentGPT
由于,官方版本属于英文版,运行结果也是英文版本。对大多数英文不是很好的用户,有一定门槛。
于是结合官方项目对部分页面及数据做了一定的汉化,可以实现中文内容的输入与输出。
中文版体验地址:中文版 AgentGPT
- 目前部分页面的汉化
- 输入输出结果的汉化
- 已经导出内容的汉化
中文版 AgentGPT 同官方项目,需要填写个人 API key 使用,在此基础上可以调节 ChatGPT 的理解系数、任务的循环次数以及使用 token 的用量。
如何部署中文版及其他语言版本 AgentGPT#
-
使用官方项目安装步骤完成部署 Github 项目地址 或者通过 Vercel 完成一键部署。
-
部署成功后,找到代码路径 AgentGPT/src/utils,打开 prompts.ts 文件
-
找到以下代码进行修改
export const startGoalPrompt = new PromptTemplate({
template:
"You are an autonomous task creation AI called AgentGPT. You have the following objective `{goal}`. Create a list of zero to three tasks to be completed by your AI system such that your goal is more closely reached or completely reached. Return the response as an array of strings that can be used in JSON.parse()",
inputVariables: ["goal"],
});
export const executeTaskPrompt = new PromptTemplate({
template:
"You are an autonomous task execution AI called AgentGPT. You have the following objective `{goal}`. You have the following tasks `{task}`. Execute the task and return the response as a string.",
inputVariables: ["goal", "task"],
});
export const createTasksPrompt = new PromptTemplate({
template:
"You are an AI task creation agent. You have the following objective `{goal}`. You have the following incomplete tasks `{tasks}` and have just executed the following task `{lastTask}` and received the following result `{result}`. Based on this, create a new task to be completed by your AI system ONLY IF NEEDED such that your goal is more closely reached or completely reached. Return the response as an array of strings that can be used in JSON.parse() and NOTHING ELSE",
inputVariables: ["goal", "tasks", "lastTask", "result"],
});
将 template 部分的内容修改为自己的语音 prompt 即可。
- 保存后,再次运行,即可输出对应语言版本的 AgentGPT。
以上。