tolgee-platform icon indicating copy to clipboard operation
tolgee-platform copied to clipboard

Support custom MT webservice

Open roeycohen opened this issue 2 years ago • 9 comments

Hi, Are there any plans to embed translations via chat gpt? One of the benefits of chat gpt is that we can tell him how to translate specific words or phrases, so they will be translated later in the same manner...

roeycohen avatar Apr 11 '23 18:04 roeycohen

Hello @roeycohen! We are planning on releasing our own AI Translator #1543 in the very near future 🙂 Also, when developing the Glossary feature #1418, we will enhance this AI Translator so it will provide you with translations that are consistent with your glossary.

Martin005 avatar Apr 14 '23 08:04 Martin005

amazing @Martin005,

I think it could be a nice to also add a custom webservice integration where Tolgee can send a text and desired language get back the translation from the client's server... On our case we have a small service that talk to CHAT-GPT and it could be great if we could just make it work with Tolgee...

roeycohen avatar Apr 18 '23 15:04 roeycohen

@roeycohen Thanks for the feedback! 🙂 Yes, I agree that a custom webservice integration would be great. Unfortunately, it doesn't fit into our current development plan.

But if you are courageous enough, you can try to implement this feature. I think it wouldn't be that hard to do it; you can check out the PR for Baidu machine translation support that was done by the community member @wfjsw. Basically, it gets the text string for translations, sends an HTTP request to Baidu's server and returns back the translation.

Martin005 avatar Apr 24 '23 09:04 Martin005

ok @Martin005, I'm not familiar with Kotlin, but I'll might give it a go.

Thanks for this project again :)

roeycohen avatar Apr 25 '23 05:04 roeycohen

@roeycohen You'll love it.

JanCizmar avatar Apr 25 '23 07:04 JanCizmar

Hi, I think that would be cool to have an "abstract" API to use machine learning translation instead of one per service, so anyone can develop the wrapper without needing to change the code.

The abstract would receive an API URL (wrapper), API secret (optional), text, from, and to as parameters.

The wrapper would be responsible for translating the incoming request to the specific Translator. It can be a micro-service,

And the good thing about this approach is that you don't need to change the code every time a new AI or translator appears. Anyone can it own service, for example, I do not think that Deepl/google have a good translation for Euskara, I use Elia. I could create a wrapper for that

horstmannmat avatar May 22 '23 18:05 horstmannmat

Hello, indeed, it would be cool. But we are not really motivated to provide such API since providing this ability would go against our monetization model. However, if you submit a PR for this, we will probably approve it since I believe just a few users would be interested in implementing their translation service.

JanCizmar avatar May 24 '23 09:05 JanCizmar

Even if only "business" or "enterprise" was allowed in a non-self-hosted environment? than at least costumers would have new motivation, for sign and would not compromise your monetisation :)

I will try to understand kotlin, but I think that it will require a new screen to add the infos, such as "allowed languages" "name" etc

Also it would require a new database table to save those info

horstmannmat avatar May 24 '23 20:05 horstmannmat

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jun 24 '23 02:06 github-actions[bot]

Hello, since there are not many from the community are requesting this, I am closing it for now.

JanCizmar avatar Apr 23 '24 07:04 JanCizmar