hwchase17 / notion-qa

MIT License
2.13k stars 374 forks source link

Other language support #13

Closed xingfanxia closed 1 year ago

xingfanxia commented 1 year ago

Is it possible to interact with chatbot in other languages with a notion db of posts in other languages in English? I tried Chinese it won't find any answers

xingfanxia commented 1 year ago

It works well with English

❯ python3 qa.py "how to add another git remote"                                                ─╯
Answer:  To add another git remote, use the command `git remote add other https://example.link/repository.git` and then `git fetch other`.

Sources: Notion_DB/Cubox 0087f2b099b644d9bf88c9b2de3e673f/Collections 07c81d214b5c4524950139cdaeaef653/Is it possible to cherry-pick a commit from anothe a98593fa23fc414d92b2cb8a7562d956.md
xingfanxia commented 1 year ago

But not Chinese

❯ python3 qa.py "中东谁亏钱了"                                                                 ─╯
Answer:  I don't know.

Sources: Notion_DB/Cubox 0087f2b099b644d9bf88c9b2de3e673f/Collections 07c81d214b5c4524950139cdaeaef653/Tech layoffs now hit Amazon Workers in 'unprofitab 2ecdb20d929d4726b64a3b95a0e83aae.md, Notion_DB/Cubox 0087f2b099b644d9bf88c9b2de3e673f/Collections 07c81d214b5c4524950139cdaeaef653/XIA, Xingfan_6540798- Airbnb Inc EVL docx pdf aeb6df3c513e4284baef6c943a1a44ed.md, Notion_DB/Cubox 0087f2b099b644d9bf88c9b2de3e673f/Collections 07c81d214b5c4524950139cdaeaef653/mp weixin qq com 78b9af5783ab429a87
nameless0704 commented 1 year ago

How did you solve this?

xingfanxia commented 1 year ago

How did you solve this?

You can fix this by updating the project to latest versions of lang-chain, there's some related code change due to the dep update

redcpp commented 1 year ago

@nameless0704 My latest PR should fix it. Tested it with the Spanish language.

JaxGG commented 1 year ago

@xingfanxia If you question is Chinese, and the answer is Chinese?