From 0733f8878f93a17ad281b6a71ea8685877bf78c7 Mon Sep 17 00:00:00 2001 From: Junyan Qin Date: Fri, 27 Jun 2025 21:37:53 +0800 Subject: [PATCH] feat: add sidebar for rag and related i18n --- .../home-sidebar/sidbarConfigList.tsx | 19 +++++++++++++++++++ web/src/i18n/locales/en-US.ts | 4 ++++ web/src/i18n/locales/ja-JP.ts | 19 +++++++++++++++++++ web/src/i18n/locales/zh-Hans.ts | 4 ++++ 4 files changed, 46 insertions(+) diff --git a/web/src/app/home/components/home-sidebar/sidbarConfigList.tsx b/web/src/app/home/components/home-sidebar/sidbarConfigList.tsx index ef9c6f45..1c3fb4bb 100644 --- a/web/src/app/home/components/home-sidebar/sidbarConfigList.tsx +++ b/web/src/app/home/components/home-sidebar/sidbarConfigList.tsx @@ -88,4 +88,23 @@ export const sidebarConfigList = [ zh_Hans: 'https://docs.langbot.app/zh/plugin/plugin-intro.html', }, }), + new SidebarChildVO({ + id: 'knowledge', + name: t('knowledge.title'), + icon: ( + + + + ), + route: '/home/knowledge', + description: t('knowledge.description'), + helpLink: { + en_US: 'https://docs.langbot.app/en/deploy/knowledge/readme.html', + zh_Hans: 'https://docs.langbot.app/zh/deploy/knowledge/readme.html', + }, + }), ]; diff --git a/web/src/i18n/locales/en-US.ts b/web/src/i18n/locales/en-US.ts index d0df9841..5596e35f 100644 --- a/web/src/i18n/locales/en-US.ts +++ b/web/src/i18n/locales/en-US.ts @@ -230,6 +230,10 @@ const enUS = { atTips: 'Mention the bot', }, }, + knowledge: { + title: 'Knowledge', + description: 'Configuring knowledge bases for improved LLM responses', + }, register: { title: 'Initialize LangBot 👋', description: 'This is your first time starting LangBot', diff --git a/web/src/i18n/locales/ja-JP.ts b/web/src/i18n/locales/ja-JP.ts index bac6f805..21b0ff7d 100644 --- a/web/src/i18n/locales/ja-JP.ts +++ b/web/src/i18n/locales/ja-JP.ts @@ -232,6 +232,10 @@ const jaJP = { atTips: 'ボットをメンション', }, }, + knowledge: { + title: '知識ベース', + description: 'LLMの応答品質を向上させるための知識ベースを設定します', + }, register: { title: 'LangBot を初期化 👋', description: 'これはLangBotの初回起動です', @@ -260,6 +264,21 @@ const jaJP = { 'パスワードのリセットに失敗しました。メールアドレスと復旧キーを確認してください', backToLogin: 'ログインに戻る', }, + embedding: { + description: 'テキストのベクトル化に使用する埋め込みモデルを管理します', + createModel: '埋め込みモデルを作成', + editModel: '埋め込みモデルを編集', + getModelListError: '埋め込みモデルリストの取得に失敗しました:', + embeddingModels: '埋め込みモデル', + extraParametersDescription: + 'リクエストボディに追加されるパラメータ(encoding_format、dimensions など)', + }, + llm: { + description: 'チャットメッセージの生成に使用するLLMモデルを管理します', + llmModels: 'LLMモデル', + extraParametersDescription: + 'リクエストボディに追加されるパラメータ(max_tokens、temperature、top_p など)', + }, }; export default jaJP; diff --git a/web/src/i18n/locales/zh-Hans.ts b/web/src/i18n/locales/zh-Hans.ts index 96acc0e6..1bd04ca8 100644 --- a/web/src/i18n/locales/zh-Hans.ts +++ b/web/src/i18n/locales/zh-Hans.ts @@ -225,6 +225,10 @@ const zhHans = { atTips: '提及机器人', }, }, + knowledge: { + title: '知识库', + description: '配置可用于提升模型回复质量的知识库', + }, register: { title: '初始化 LangBot 👋', description: '这是您首次启动 LangBot',