Open BrightXiaoHan opened 1 year ago
As i know, ChatGPT it's a proprietary language model learned to be chat partner. So ChatGPT is not have API to translate texts.
But if you can adopt their API to translate texts, you can add translator to a Linguist.
Actually, you can add any translator implementation, see custom translators docs.
All you need - implement JS class with few methods that will handle requests to translate
I investigated your idea, it looks that it possible to implement.
Also, i found a browser extension https://github.com/yetone/openai-translator that implement your idea. This browser extension cannot to translate web pages, but can translate single text.
I will implement ChatGPT translator in future release. Thank you for idea
I would suggest to support OpenAI API, with a custom URL, so that you would get support for both OpenAI's ChatGPT AND local LLMs with a single function (because most local LLMs implement an "OpenAI-like API" to try to be compatible with apps that already support ChatGPT). Eg, ollama, koboldcpp and text-generation-webui all offer OpenAI-like APIs.
Is it possible to adapt openai api to this project?