Open du82 opened 1 year ago
Thanks for opening this.
Deepl pricing looks like $5.49 + $25 per 1 million characters. Taking some random articles off of hacker news, running them through reader view, and looking at the character counts:
const translateCost = () => document.body.textContent.replace(/\s+/g, " ").length * (25 / 1000000)
https://github.com/brexhq/prompt-engineering = $1.26 http://tofspot.blogspot.com/2013/10/9-great-ptolemaic-smackdown-from.html = $0.83 https://xstate.js.org/docs/ = $0.14 https://apnews.com/article/offgrid-solar-electrification-indonesia-0991d77d68f879c4daa12e7d3dfd97ee = $0.16 https://chipsandcheese.com/2021/07/13/arm-or-x86-isa-doesnt-matter/ = $0.41
(Does this calculation seem right?)
For an individual user, this is pretty cheap, but if many people start using this it could get expensive really quickly (or even for an individual user - someone who translates one longish article per day could cost $5-10 per month).
Maybe we should publish a userscript and let people supply their own API key?
I operate a publicly available version of scripts/matrix-translation-bot with about a thousand characters per day translated. What I do is I make many free trial accounts if one is about to roll over into paid territory, it uses another account.
That's not an option for everyone, so having a place in settings to provide an API key would be awesome. It lets those who are scared of proprietary translation tech not worry since if you dont provide a key, it doesn't do anything. Those who want it can add a key.
Yeah, that doesn't sound like something we can include in the release, but how about we make a userscript where people can add their own API key and link to it from the release notes?
Here's for the deepl implementation @PalmerAL
I've used DeepL in quite a few of my projects, and its the most accurate translator I've found. It's also cheap from an API request POV, and privacy focused.