From d67f149052ac68ac83c947ce51a712f801dfb647 Mon Sep 17 00:00:00 2001 From: xuyuan23 <643854343@qq.com> Date: Sun, 28 May 2023 22:00:57 +0800 Subject: [PATCH] Introduction to the usage method of adding multi-language interface support --- README.md | 9 +++++++-- README.zh.md | 3 +++ pilot/language/lang_content_mapping.py | 6 +++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7f3d18de1..87ab44781 100644 --- a/README.md +++ b/README.md @@ -190,6 +190,11 @@ We provide a user interface for Gradio, which allows you to use DB-GPT through o To use multiple models, modify the LLM_MODEL parameter in the .env configuration file to switch between the models. +### Multi Language Usage +To use multiple language model, modify the LLM_MODEL parameter in the .env configuration file to switch between the models. + +In the .env configuration file, modify the LANGUAGE parameter to switch between different languages, the default is English (Chinese zh, English en, other languages ​​to be added) + ### Create your own knowledge repository: 1.Place personal knowledge files or folders in the pilot/datasets directory. @@ -239,8 +244,8 @@ This project is standing on the shoulders of giants and is not going to work wit ## Contributors -|[
csunny](https://github.com/csunny)
|[
xudafeng](https://github.com/xudafeng)
|[
明天](https://github.com/yhjun1026)
| [
Aries-ckt](https://github.com/Aries-ckt)
|[
thebigbone](https://github.com/thebigbone)
| -| :---: | :---: | :---: | :---: |:---: | +|[
csunny](https://github.com/csunny)
|[
xudafeng](https://github.com/xudafeng)
|[
明天](https://github.com/yhjun1026)
| [
Aries-ckt](https://github.com/Aries-ckt)
|[
thebigbone](https://github.com/thebigbone)
|[
Shinexy](https://github.com/xuyuan23)
| +| :---: | :---: | :---: | :---: |:---: |:---: | This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Fri May 19 2023 00:24:18 GMT+0800`. diff --git a/README.zh.md b/README.zh.md index 015d754b2..3db20702c 100644 --- a/README.zh.md +++ b/README.zh.md @@ -188,6 +188,9 @@ $ python webserver.py ### 多模型使用 在.env 配置文件当中, 修改LLM_MODEL参数来切换使用的模型。 +### 多语言用户界面模式 +在.env 配置文件当中,修改LANGUAGE参数来切换使用不同的语言,默认是英文(中文zh, 英文en, 其他语言待补充) + ### 打造属于你的知识库: 1.将个人知识文件或者文件夹放入pilot/datasets目录中 diff --git a/pilot/language/lang_content_mapping.py b/pilot/language/lang_content_mapping.py index c6126e671..f293b8510 100644 --- a/pilot/language/lang_content_mapping.py +++ b/pilot/language/lang_content_mapping.py @@ -45,15 +45,15 @@ lang_dicts = { "please_choose_database": "Please choose database", "sql_generate_diagnostics": "SQL Generation & Diagnostics", "knowledge_qa_type_llm_native_dialogue": "LLM native dialogue", - "knowledge_qa_type_default_knowledge_base_dialogue": "Default Knowledge Base", - "knowledge_qa_type_add_knowledge_base_dialogue": "Added Knowledge Base", + "knowledge_qa_type_default_knowledge_base_dialogue": "Default documents", + "knowledge_qa_type_add_knowledge_base_dialogue": "Added documents", "dialogue_use_plugin": "Dialogue Extension", "create_knowledge_base": "Create Knowledge Base", "sql_schema_info": "the schema information of database {}: {}\n", "current_dialogue_mode": "Current dialogue mode", "database_smart_assistant": "Database smart assistant", "sql_vs_setting": "In the automatic execution mode, DB-GPT can have the ability to execute SQL, read knowledge from the network, automatically store and learn", - "knowledge_qa": "Knowledge QA", + "knowledge_qa": "Documents QA", "configure_knowledge_base": "Configure Knowledge Base", "new_klg_name": "New Knowledge Base name", "add_as_new_klg": "Add as new knowledge base",