langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Prompt language translations

Open lakshyaag opened this issue 2 years ago • 4 comments

Starting a new issue to track this idea to provide functionality to translate prompts based on the input language.

lakshyaag avatar Mar 01 '23 14:03 lakshyaag

Utilizing this library: GoogleTrans to provide automatic translations. However, I'm running into version issues error with poetry. Can somebody help me out? @hwchase17

Translation branch here: https://github.com/lakshyaag/langchain/commit/0010da7102bb6097fb69d787be0fccc770713783

lakshyaag avatar Mar 01 '23 16:03 lakshyaag

try this: Poetry add googletrans =="3.1.0a0" remove the latest version of googletrans. let me know if it worked!

AldawsariNLP avatar Mar 07 '23 16:03 AldawsariNLP

Nope, not working. Still giving me an issue.

lakshyaag avatar Mar 08 '23 08:03 lakshyaag

Please add prompt like this: Answer in as the same language as question

tuhoangwkm avatar Jun 15 '23 04:06 tuhoangwkm

Just add the following sentence to the question: "Please answer in <Italian/Spanish/French/....>". In this way the input can be in any language and only the output language is specified.

ccasadei avatar Jun 30 '23 08:06 ccasadei

Hi, @lakshyaag! I'm Dosu, and I'm here to help the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.

From what I understand, the issue is about adding functionality to translate prompts based on the input language. You were trying to use the GoogleTrans library for automatic translations but faced version issues with poetry. Some suggestions have been made to try a specific version of GoogleTrans and to add a prompt specifying the desired language for the answer.

Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days.

Thank you for your contribution to the LangChain repository!

dosubot[bot] avatar Sep 29 '23 16:09 dosubot[bot]