AgentGPT#
AgentGPT is the work of GitHub author @asim-shrestha. AgentGPT sets predefined goals and allows ChatGPT to break down and analyze your goals. It then performs iterative analysis based on the breakdown tasks to automate the goal-oriented task flow and obtain goal result data.
AgentGPT supports ChatGPT 3.5/4.0 models and is an open-source project that can be deployed locally for personal use.
Please note that users need to have a paid API subscription for ChatGPT in order to use it (i.e., a ChatGPT account with a completed payment and linked card).
Official demo link: Reworkd/AgentGPT
Since the official version is in English, the results are also in English. This poses a certain barrier for users who are not proficient in English.
Therefore, based on the official project, certain pages and data have been localized to Chinese, allowing for input and output of Chinese content.
Chinese version demo link: Chinese Version of AgentGPT
- Localization of certain pages
- Localization of input and output results
- Localization of exported content
Similar to the official version of AgentGPT, the Chinese version requires filling in a personal API key. Additionally, it allows for adjusting the understanding coefficient of ChatGPT, the number of task iterations, and the usage of tokens.
How to Deploy the Chinese Version and Other Language Versions of AgentGPT#
-
Follow the installation steps of the official project to complete the deployment GitHub Project Link or use Vercel for one-click deployment.
-
After successful deployment, navigate to the code path AgentGPT/src/utils and open the prompts.ts file.
-
Find the following code to make modifications:
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"],
});
Modify the content in the template section to your own language prompt.
- Save the file and run it again to output the corresponding language version of AgentGPT.
That's it.