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。
以上。