AgentGPT#
AgentGPT は、GitHub の作者である@asim-shresthaによる作品です。AgentGPT は、設定された目標を使用して ChatGPT による目標の分解と分析を行い、分解されたタスクに基づいてループ分析を行い、自動化された目標タスクフローを実現し、目標の結果データを得ることができます。
目標は ChatGPT3.5/4.0 モデルをサポートしており、オープンソースプロジェクトであり、個人のローカル環境での展開が可能です。
注意点として、ユーザーは ChatGPT の有料 API を利用するためにサブスクリプションを開始する必要があります(つまり、支払い済みの ChatGPT アカウントが必要です)。
公式の体験サイト:Reworkd/AgentGPT
公式バージョンは英語版であり、実行結果も英語版です。英語が得意でない多くのユーザーにとっては、一定のハードルがあります。
そのため、公式プロジェクトを参考に、一部のページとデータを翻訳し、中国語のコンテンツの入力と出力を実現しました。
中国語版の体験サイト:中国語版 AgentGPT
- 現在、一部のページを中国語に翻訳しました。
- 入力と出力の結果を中国語に翻訳しました。
- エクスポートされたコンテンツを中国語に翻訳しました。
中国語版 AgentGPT は、公式プロジェクトと同様に、個人の API キーの入力が必要であり、それに基づいて ChatGPT の理解係数、タスクのループ回数、およびトークンの使用量を調整することができます。
中国語版および他の言語版 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 が出力されます。
以上。