Skip to content

Commit

Permalink
Update locale
Browse files Browse the repository at this point in the history
  • Loading branch information
Wannabeasmartguy committed Sep 5, 2024
1 parent ff0cc13 commit 427d377
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions locale/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"Load selected dialog": "Load dialog",
"Saved dialog settings": "Current dialog settings",
"Dialog name": "Dialog name",
"Add a new dialog": "Add a new dialog",
"Add a new dialog": "Add dialog",
"Save dialog": "Save dialog",
"Delete selected dialog": "Delete dialog",
"Collection": "Collection",
Expand Down Expand Up @@ -106,5 +106,6 @@
"Tools call": "Tools call",
"Click the Load button to apply the configuration": "Click the Load button to apply the configuration",
"Whether to enable the use of tools. Only available for some models. For unsupported models, normal chat mode will be used by default.": "Whether to enable the use of tools. Only available for some models. For unsupported models, normal chat mode will be used by default.",
"Please select a model": "Please select a model you want to use."
"Please select a model": "Please select a model you want to use.",
"Cited Source": "Cited Source"
}
3 changes: 2 additions & 1 deletion locale/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,6 @@
"Tools call": "工具调用",
"Click the Load button to apply the configuration": "请点击加载按钮以应用配置",
"Whether to enable the use of tools. Only available for some models. For unsupported models, normal chat mode will be used by default.": "是否启用工具调用。仅对部分模型有效。对于不支持的工具调用功能的模型,默认使用普通聊天模式。",
"Please select a model": "请选择一个你想要使用的模型"
"Please select a model": "请选择一个你想要使用的模型",
"Cited Source": "引用来源"
}
5 changes: 2 additions & 3 deletions pages/RAG_Chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from uuid import uuid4
from loguru import logger
from datetime import datetime
from sqlalchemy.exc import OperationalError
from pydantic import ValidationError

from configs.basic_config import (
Expand Down Expand Up @@ -47,10 +46,10 @@ def write_custom_rag_chat_history(chat_history, _sources):
response_sources_list = _sources[message["response_id"]]

for index, pop in enumerate(row1 + row2):
a = pop.popover(f"引用文件", use_container_width=True)
a = pop.popover(i18n("Cited Source") + f" {index+1}", use_container_width=True)
file_name = response_sources_list["metadatas"][index]["source"]
file_content = response_sources_list["page_content"][index]
a.text(f"引用文件{file_name}")
a.text(i18n("Cited Source")+ ": " + file_name)
a.code(file_content, language="plaintext")


Expand Down

0 comments on commit 427d377

Please sign in to comment.