Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plans to add multi language support ? #30

Open
chelaxian opened this issue Dec 4, 2023 · 11 comments
Open

plans to add multi language support ? #30

chelaxian opened this issue Dec 4, 2023 · 11 comments
Labels
enhancement New feature or request

Comments

@chelaxian
Copy link

in your previous mistakenly uploaded file titles.py i saw multiply languages variants.
do you plan to add some of them to settings for opportunity to change language of the bot?)

@Kourva
Copy link
Owner

Kourva commented Dec 4, 2023

Hmm.. That titles.py was for my other bot Group manager bot. but it could be cool to have multiple languages, or detecting user's Telegram language and answer using it.

Or setting language file (for example lang.txt) for each user to store response language and use it for answering.

I will work on it.

@Kourva Kourva pinned this issue Dec 4, 2023
@Kourva Kourva added the enhancement New feature or request label Dec 4, 2023
@chelaxian
Copy link
Author

chelaxian commented Dec 25, 2023

may be you can write some similar to init.py script that initialize commands of bot
but for example translate.py script - that asks you for prefered language and than automaticaly translate all customizable text in titles.py to prefered language just in time and maybe even online or even with chatgpt? i think machine translation will be acceptable for that little part of text and it will be easier to achive that than writing manually multiply copies of titles.py for each languages

@chelaxian
Copy link
Author

also you can add some parameter to translate.py that allow you to restore defaullt language (default state of titles.py)
for example it can be translate.py --default (translate.py -d) or translate.py --restore (translate.py -r)

@Kourva
Copy link
Owner

Kourva commented Dec 25, 2023

That's great idea to make translate.py script to initialize bot language (for global language), also we need a script to translate titles for each user, maybe using language command, I will work on it too, we can also use user's telegram language that comes from message details (message.from_user_language_code i think.)

I will try all of them and giving all methods to users, so everyone can choose whatever they want with their bots, global language or user-based language.

@Abdullrahman-Dawaliby
Copy link

Thank you for your great work! after editing it to suit my server and translating some commands to Arabic (I have added Arabic to some commands and disabled some commands like Dan because its soo slow) but can't we edit system role and adding reply to each request with the same language of that request. to it?

@Kourva
Copy link
Owner

Kourva commented Jan 27, 2024

Hi, You're welcome @Abdullrahman-Dawaliby

As what i got, The language in bot or multi language feature is for commands and bot's respond. most of times (or maybe always) ChatGPT is responding in same language of query or question, even without specifying that system role, but let's try and see difference! I will test it

@Abdullrahman-Dawaliby
Copy link

Hi, You're welcome @Abdullrahman-Dawaliby

As what i got, The language in bot or multi language feature is for commands and bot's respond. most of times (or maybe always) ChatGPT is responding in same language of query or question, even without specifying that system role, but let's try and see difference! I will test it

Thanks for your kindness, but when I send Arabic question like speak in Arabic (تحدث بالعربية) it reponse in Arabic but after that even if I sent an Arabic question it will respond either in completely another subject with multiple languages such as Russian and Hebrew and English in the same message, or it will respond correctly to the question but in English. Here is the bot link if you want to test it

@Kourva
Copy link
Owner

Kourva commented Jan 27, 2024

Hi, You're welcome @Abdullrahman-Dawaliby
As what i got, The language in bot or multi language feature is for commands and bot's respond. most of times (or maybe always) ChatGPT is responding in same language of query or question, even without specifying that system role, but let's try and see difference! I will test it

Thanks for your kindness, but when I send Arabic question like speak in Arabic (تحدث بالعربية) it reponse in Arabic but after that even if I sent an Arabic question it will respond either in completely another subject with multiple languages such as Russian and Hebrew and English in the same message, or it will respond correctly to the question but in English. Here is the bot link if you want to test it

It seems that the problem may stem from the different providers, as there are 4 providers, each using different models such as ChatGPT3.5 or Llama.

When you ask a question, the bot tries the first online provider, which could be Llama or ChatGPT3.5. On the other hand, some providers like Llama have pre-training data that is almost English, making it difficult for them to accurately answer questions in Persian or Arabic. This may explain the varied responses or glitches you receive.

In my country, most services are limited and banned, so I’m working on these projects using proxies like Tor and can't test them perfectly (sorry about that), but i try my best to make perfect projects.

You could consider removing the Llama provider (DeepInfra AI) to force the bot to only test ChatGPT providers, or you could explore changing the system role (maybe worked!).

@Abdullrahman-Dawaliby
Copy link

sorry but I fixed it already after I have tested the Deep-infra on their official website and disabled that API and removed the provider from the /ping command successfully but my ISP has some problems and now it worked. Unfortunately, my server is on sillydev.co.uk(free plan) and their server stopped suddenly and they are trying to fix. Do you know any other free server(VPS)?

@Abdullrahman-Dawaliby
Copy link

I am searching for free gpt-4 APIs so if I found some can you please help in merging them as I have basic python knowledge

@Kourva
Copy link
Owner

Kourva commented Jan 28, 2024

I am searching for free gpt-4 APIs so if I found some can you please help in merging them as I have basic python knowledge

Of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants