diff --git a/ui/src/locales/lang/en_US/index.ts b/ui/src/locales/lang/en_US/index.ts index 16bd5f6bb..371a3a424 100644 --- a/ui/src/locales/lang/en_US/index.ts +++ b/ui/src/locales/lang/en_US/index.ts @@ -1,12 +1,12 @@ import en from 'element-plus/es/locale/lang/en'; import components from './components'; import layout from './layout'; -import pages from './pages'; +import views from './views'; export default { lang: 'English', layout, - pages, + views, components, en, }; diff --git a/ui/src/locales/lang/en_US/pages/index.ts b/ui/src/locales/lang/en_US/pages/index.ts deleted file mode 100644 index bd77588db..000000000 --- a/ui/src/locales/lang/en_US/pages/index.ts +++ /dev/null @@ -1,4 +0,0 @@ - -export default { - -}; diff --git a/ui/src/locales/lang/en_US/views/404.ts b/ui/src/locales/lang/en_US/views/404.ts new file mode 100644 index 000000000..c63711136 --- /dev/null +++ b/ui/src/locales/lang/en_US/views/404.ts @@ -0,0 +1,5 @@ +export default { + title: "404", + message: "Unable to Access Application", + operate: "Back to Home", +}; diff --git a/ui/src/locales/lang/en_US/views/application.ts b/ui/src/locales/lang/en_US/views/application.ts new file mode 100644 index 000000000..a0efaa6cd --- /dev/null +++ b/ui/src/locales/lang/en_US/views/application.ts @@ -0,0 +1,103 @@ +export default { + applicationList: { + title: "Applications", + searchBar: { + placeholder: "Search by name", + }, + card: { + createApplication: "Create Application", + overview: "Overview", + demo: "Demo", + setting: "Settings", + delete: { + tooltip: "Delete", + confirmTitle: "Are you sure you want to delete this application?", + confirmMessage: "Deleting this application will no longer provide its services. Please proceed with caution.", + confirmButton: "Delete", + cancelButton: "Cancel", + successMessage: "Successfully deleted" + } + }, + tooltips: { + demo: "Demo", + setting: "Settings", + delete: "Delete" + }, + }, + applicationForm: { + title: { + create: "Create Application", + edit: "Edit Settings", + info:"Application Information" + }, + form: { + appName: { + label: "Application Name", + placeholder: "Please enter the application name", + requiredMessage: "Application name is required" + }, + appDescription: { + label: "Application Description", + placeholder: "Describe the application scenario and use, e.g.: MaxKB assistant answering user questions about MaxKB product usage" + }, + aiModel: { + label: "AI Model", + placeholder: "Please select an AI model", + unavailable: "(Unavailable)" + }, + prompt: { + label: "Prompt", + placeholder: "Please enter prompt", + tooltip: "By adjusting the content of the prompt, you can guide the direction of the large model conversation. This prompt will be fixed at the beginning of the context. Variables used: {data} carries known information from the knowledge base; {question} is the question posed by the user." + }, + multipleRoundsDialogue: "Multiple Rounds Dialogue", + relatedKnowledgeBase: "Related Knowledge Base", + relatedKnowledgeBaseWhere: "Associated knowledge bases are displayed here", + prologue: "Prologue", + problemOptimization: { + label: "Problem Optimization", + tooltip: "Optimize the current question based on historical chat to better match knowledge points." + }, + addModel: "Add Model", + paramSetting: "Parameter Settings", + add: "Add", + apptest:"Debug Preview" + }, + buttons: { + confirm:"Confirm", + cancel: "Cancel", + create: "Create", + createSuccess: "Create Success", + save: "Save", + saveSuccess: "Save Success" + }, + dialogues: { + addDataset: "Add Related Knowledge Base", + removeDataset: "Remove Knowledge Base", + paramSettings: "Parameter Settings", + refresh: "Refresh", + selectSearchMode: "Search Mode", + vectorSearch: "Vector Search", + vectorSearchTooltip: "Vector search is a retrieval method based on vector distance calculations, suitable for large data volumes in the knowledge base.", + fullTextSearch: "Full-text Search", + fullTextSearchTooltip: "Full-text search is a retrieval method based on text similarity, suitable for small data volumes in the knowledge base.", + hybridSearch: "Hybrid Search", + hybridSearchTooltip: "Hybrid search is a retrieval method based on both vector and text similarity, suitable for medium data volumes in the knowledge base.", + similarityThreshold: "Similarity Threshold", + topReferences: "Top N References", + maxCharacters: "Maximum Characters per Reference", + noReferencesAction: "When there are no knowledge base references", + continueQuestioning: "Continue Questioning AI Model", + provideAnswer: "Provide a Specific Answer", + prompt: "Prompt", + promptPlaceholder:"Please enter a prompt", + concent:"Content", + concentPlaceholder:"Please enter content", + designated_answer:"Hello, I am MaxKB Assistant. My knowledge base only contains information related to MaxKB products. Please rephrase your question." + } + }, + prompt:{ + defaultPrompt:"Known information:\n{{data}}\nResponse requirements:\n- Please use concise and professional language to answer the user's question.\n- If you do not know the answer, reply, \"No relevant information was found in the knowledge base; it is recommended to consult technical support or refer to the official documentation for operations.\"\n- Avoid mentioning that your knowledge is obtained from known information.\n- Ensure the answer is consistent with the information described in the known data.\n- Please use Markdown syntax to optimize the format of the answer.\n- Directly return any images, link addresses, and script languages found in the known information.\n- Please respond in the same language as the question.\nQuestion:\n{question}", + defaultPrologue:"Hello, I am MaxKB Assistant. You can ask me questions about using MaxKB.\n- What are the main features of MaxKB?\n- Which large language models does MaxKB support?\n- What document types does MaxKB support?" + } +}; diff --git a/ui/src/locales/lang/en_US/views/index.ts b/ui/src/locales/lang/en_US/views/index.ts new file mode 100644 index 000000000..37553f490 --- /dev/null +++ b/ui/src/locales/lang/en_US/views/index.ts @@ -0,0 +1,6 @@ +import notFound from './404'; +import application from './application'; +export default { + notFound, + application, +}; diff --git a/ui/src/locales/lang/zh_CN/index.ts b/ui/src/locales/lang/zh_CN/index.ts index db4da9942..dc182c7f0 100644 --- a/ui/src/locales/lang/zh_CN/index.ts +++ b/ui/src/locales/lang/zh_CN/index.ts @@ -1,12 +1,12 @@ import zhCn from 'element-plus/es/locale/lang/zh-cn'; import components from './components'; import layout from './layout'; -import pages from './pages'; +import views from './views'; export default { lang: '简体中文', layout, - pages, + views, components, zhCn, }; diff --git a/ui/src/locales/lang/zh_CN/pages/index.ts b/ui/src/locales/lang/zh_CN/pages/index.ts deleted file mode 100644 index bd77588db..000000000 --- a/ui/src/locales/lang/zh_CN/pages/index.ts +++ /dev/null @@ -1,4 +0,0 @@ - -export default { - -}; diff --git a/ui/src/locales/lang/zh_CN/views/404.ts b/ui/src/locales/lang/zh_CN/views/404.ts new file mode 100644 index 000000000..44562310c --- /dev/null +++ b/ui/src/locales/lang/zh_CN/views/404.ts @@ -0,0 +1,5 @@ +export default { + title: "404", + Message: "无法访问应用", + operate: "返回首页", +}; diff --git a/ui/src/locales/lang/zh_CN/views/application.ts b/ui/src/locales/lang/zh_CN/views/application.ts new file mode 100644 index 000000000..ded07d92d --- /dev/null +++ b/ui/src/locales/lang/zh_CN/views/application.ts @@ -0,0 +1,103 @@ +export default { + applicationList: { + title: "应用", + searchBar: { + placeholder: "按名称搜索", + }, + card: { + createApplication: "创建应用", + overview: "概览", + demo: "演示", + setting: "设置", + delete: { + tooltip: "删除", + confirmTitle: "是否删除应用:", + confirmMessage: "删除后该应用将不再提供服务,请谨慎操作。", + confirmButton: "删除", + cancelButton: "取消", + successMessage: "删除成功" + } + }, + tooltips: { + demo: "演示", + setting: "设置", + delete: "删除" + }, + }, + applicationForm: { + title: { + create: "创建应用", + edit: "设置", + info:"应用信息" + }, + form: { + appName: { + label: "应用名称", + placeholder: "请输入应用名称", + requiredMessage: "请输入应用名称" + }, + appDescription: { + label: "应用描述", + placeholder: "描述该应用的应用场景及用途,如:MaxKB 小助手回答用户提出的 MaxKB 产品使用问题" + }, + aiModel: { + label: "AI 模型", + placeholder: "请选择 AI 模型", + unavailable: "(不可用)" + }, + prompt: { + label: "提示词", + placeholder: "请输入提示词", + tooltip: "通过调整提示词内容,可以引导大模型聊天方向,该提示词会被固定在上下文的开头。可以使用变量:{data} 是携带知识库中已知信息;{question}是用户提出的问题。" + }, + multipleRoundsDialogue: "多轮对话", + relatedKnowledgeBase: "关联知识库", + relatedKnowledgeBaseWhere: "关联知识库展示在这里", + prologue: "开场白", + problemOptimization: { + label: "问题优化", + tooltip: "根据历史聊天优化完善当前问题,更利于匹配知识点。" + }, + addModel: "添加模型", + paramSetting: "参数设置", + add: "添加", + apptest:"调试预览" + }, + buttons: { + confirm:"确认", + cancel: "取消", + create: "创建", + createSuccess: "创建", + save: "保存", + saveSuccess: "保存" + }, + dialogues: { + addDataset: "添加关联知识库", + removeDataset: "移除知识库", + paramSettings: "参数设置", + refresh: "刷新", + selectSearchMode: "检索模式", + vectorSearch: "向量检索", + vectorSearchTooltip: "向量检索是一种基于向量相似度的检索方式,适用于知识库中的大数据量场景。", + fullTextSearch: "全文检索", + fullTextSearchTooltip: "全文检索是一种基于文本相似度的检索方式,适用于知识库中的小数据量场景。", + hybridSearch: "混合检索", + hybridSearchTooltip: "混合检索是一种基于向量和文本相似度的检索方式,适用于知识库中的中等数据量场景。", + similarityThreshold: "相似度高于", + topReferences: "引用分段数 TOP", + maxCharacters: "最多引用字符数", + noReferencesAction: "无引用知识库分段时", + continueQuestioning: "继续向 AI 模型提问", + provideAnswer: "指定回答内容", + prompt: "提示词", + promptPlaceholder:"请输入提示词", + concent:"内容", + concentPlaceholder:"请输入内容", + designated_answer:"你好,我是 MaxKB 小助手,我的知识库只包含了 MaxKB 产品相关知识,请重新描述您的问题。" + } + }, + prompt:{ + defaultPrompt:"已知信息:\n {{data}} \n回答要求:\n- 请使用简洁且专业的语言来回答用户的问题。\n- 如果你不知道答案,请回答“没有在知识库中查找到相关信息,建议咨询相关技术支持或参考官方文档进行操作”。\n- 避免提及你是从已知信息中获得的知识。\n- 请保证答案与已知信息中描述的一致。\n- 请使用 Markdown 语法优化答案的格式。\n- 已知信息中的图片、链接地址和脚本语言请直接返回。\n- 请使用与问题相同的语言来回答。\n问题:\n{question}", + defaultPrologue:"您好,我是 MaxKB 小助手,您可以向我提出 MaxKB 使用问题。\n- MaxKB 主要功能有什么?\n- MaxKB 支持哪些大语言模型?\n- MaxKB 支持哪些文档类型?" + } +}; diff --git a/ui/src/locales/lang/zh_CN/views/index.ts b/ui/src/locales/lang/zh_CN/views/index.ts new file mode 100644 index 000000000..37553f490 --- /dev/null +++ b/ui/src/locales/lang/zh_CN/views/index.ts @@ -0,0 +1,6 @@ +import notFound from './404'; +import application from './application'; +export default { + notFound, + application, +}; diff --git a/ui/src/views/404/index.vue b/ui/src/views/404/index.vue index 4c7350ca1..bb00f107e 100644 --- a/ui/src/views/404/index.vue +++ b/ui/src/views/404/index.vue @@ -2,10 +2,10 @@ -
404
-
很抱歉,无法访问应用!
+
{{ $t('views.notFound.title')}}
+
{{ $t('views.notFound.message') }}
- +
@@ -42,6 +42,7 @@ const router = useRouter() } } } + @media only screen and (max-width: 1000px) { .not-found-container .message-container { text-align: center; diff --git a/ui/src/views/application/CreateAndSetting.vue b/ui/src/views/application/CreateAndSetting.vue index ee666229c..d9416d7dc 100644 --- a/ui/src/views/application/CreateAndSetting.vue +++ b/ui/src/views/application/CreateAndSetting.vue @@ -1,13 +1,13 @@ - + @@ -135,29 +134,29 @@ :placeholder="defaultPrompt" /> - + - +
关联的知识库展示在这里{{$t('views.application.applicationForm.form.relatedKnowledgeBaseWhere')}}
- +