reworkd / AgentGPT

🤖 Assemble, configure, and deploy autonomous AI Agents in your browser.
https://agentgpt.reworkd.ai
GNU General Public License v3.0
31.7k stars 9.23k forks source link

🗣 Multi-language translation based on browser language #253

Closed gglzl closed 1 year ago

gglzl commented 1 year ago

Edit from Asim:

Custom translations of the site / prompt. The default value of this will be the determined browser language. If there is no translation to the detected language then we will fall back to English. We should also have a dropdown or a pop-up modal which will allow the user to change only the language of the UI.

i18next will most likely be used for internationalization.

Cs4K1Sr4C commented 1 year ago

If you run it with your own API keys on your own deployment, then change the prompts which are located in the src/utils/prompts.ts file to the followings:

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() and use Chinese language", 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 on Chinese language.", 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 on Chinese language that can be used in JSON.parse() and NOTHING ELSE", inputVariables: ["goal", "tasks", "lastTask", "result"], });

asim-shrestha commented 1 year ago

@Cs4K1Sr4C going to assign you to this given you're looking into multi language translations across the app

asim-shrestha commented 1 year ago

Handled a bit in #326. @Cs4K1Sr4C is also working on translations on the prompt side