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

feat: Use Romanian & other languages in QA embedding #4047

Closed
wants to merge 45 commits into from

Conversation

rennokki
Copy link
Contributor

@rennokki rennokki commented May 2, 2024

Description

I saw there is jut Chinese & English when creating Q&A embeddings. I have added all the languages that exist, plus the Romanian language.

Since the prompt is English and mentions {language}, it was relevant enough to just add a new prompt_name that may be used to infer the language in any prompt.

Fixes # (issue) — N/A

Type of Change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update, included: Dify Document

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

N/A

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • optional I have made corresponding changes to the documentation
  • optional I have added tests that prove my fix is effective or that my feature works
  • optional New and existing unit tests pass locally with my changes

Added prompt_name for langs
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 2, 2024
@rennokki rennokki changed the title feat: Use Romanian & other languages in QA feat: Use Romanian & other languages in QA embedding May 2, 2024
@dosubot dosubot bot added ☕️ typescript Pull request that update TypeScript code. 💪 enhancement New feature or request 📚 documentation Improvements or additions to documentation labels May 2, 2024
@@ -312,6 +312,7 @@ export const useLanguages = () => {
cs: t(`${langPrefix}cs`),
th: t(`${langPrefix}th`),
id: t(`${langPrefix}id`),
ro: t(`${langPrefix}ro`),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is relevant, just came across this.

example: 'Hello, Dify!',
supported: true,
},
{
value: 'zh-Hans',
name: '简体中文',
prompt_name: 'Chinese',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if both should be Chinese. I think this is the Simplified one and the other is Traditional?

rennokki and others added 21 commits May 9, 2024 06:39
…Dify's Japanese README (langgenius#4075)

Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
Co-authored-by: rongjun.qiu <qiurj@hengtonggroup.com.cn>
Co-authored-by: baxiang <baxiang@lixiang.com>
Co-authored-by: owen <owen@owen.hawk-toad.ts.net>
Fyphen1223 and others added 23 commits May 9, 2024 06:44
Co-authored-by: luowei <glpat-EjySCyNjWiLqAED-YmwM>
Co-authored-by: crazywoola <427733928@qq.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
…ggenius#4110)

Co-authored-by: Gimling <huangjl@ruyi.ai>
Co-authored-by: takatost <takatost@gmail.com>
Added prompt_name for langs
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels May 9, 2024
@rennokki
Copy link
Contributor Author

rennokki commented May 9, 2024

I fudged it up. :)

@rennokki
Copy link
Contributor Author

rennokki commented May 9, 2024

Messing up this PR. New one: #4205

@rennokki rennokki closed this May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 documentation Improvements or additions to documentation 💪 enhancement New feature or request size:XL This PR changes 500-999 lines, ignoring generated files. ☕️ typescript Pull request that update TypeScript code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet