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

BUG: Chat History Defaults to Spanish Despite English Language Selected #294

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

josephedward
Copy link
Contributor

Issue #, if available: #240

Description of changes:

  • added param that interpolates a language for the model to use, or defaults to english
  • added a test that iterates through the languages supported by the project

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

- added param that interpolates a language for the model to use, or defaults to english
- added a test that iterates through the languages supported by the project
@statefb
Copy link
Contributor

statefb commented May 7, 2024

Thank you for your contribution! May I ask you a few things?

@wadabee Please tell us if you have any good suggestion to reflect language to pass it to API (Local storage? We should take a look at React i18next).

@josephedward
Copy link
Contributor Author

Yes @statefb I will make those modifications, might take me a few days to look at it closely. Lots of possibilities for further integrating language capabilities...you could make a literal with supported languages as the param, like you did with models. And you could do more to detect languages in real-time. Willing to work with @wadabee to introduce react-i18next in the frontend, could be interesting.

@statefb
Copy link
Contributor

statefb commented May 9, 2024

@josephedward Thank you, that's totally no problem. Can I ask you about more detail what are you planning for another language feature?

Willing to work with @wadabee to introduce react-i18next in the frontend, could be interesting.

react-i18next is already introduced. According to this stack overflow, we can get current language using useTranslation hook, which would be the best and easiest way to pass it to backend API.

@josephedward
Copy link
Contributor Author

react-i18next is already introduced

I knew you were using i18n, didn't realize you were already using that specific library.

Can I ask you about more detail what are you planning for another language feature?

If this commit helps, go ahead and merge.

According to this stack overflow, we can get current language using useTranslation hook, which would be the best and easiest way to pass it to backend API.

I will work on this soon if you want to keep this PR open 😊

@statefb
Copy link
Contributor

statefb commented May 10, 2024

No problem, this PR would be helpful and thank you again for your willingness for contribution!
I'll definitely leave this PR open. Please create a commit when you have time 😄

- added useTranslation hook to useConversationApi.ts
- updated the interpolation text in propose_conversation_title in chat.py
- added a URL segment corresponding to the lanugage param in conversaption.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants