Skip to content

Commit

Permalink
完成知识库功能;上传的文件支持分词;简单的BM25算法实现;
Browse files Browse the repository at this point in the history
  • Loading branch information
Unagi-cq committed Jan 9, 2025
1 parent 2f00b0e commit 3f6c907
Show file tree
Hide file tree
Showing 11 changed files with 345 additions and 56 deletions.
86 changes: 61 additions & 25 deletions thchat-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions thchat-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"element-plus": "^2.7.0",
"mammoth": "^1.9.0",
"marked": "^15.0.4",
"segmentit": "^2.0.3",
"vue": "^3.2.13",
"vue-i18n": "^11.0.1",
"vue-pdf": "^4.3.0",
Expand Down
49 changes: 42 additions & 7 deletions thchat-ui/src/assets/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ html {
/* 亮 主题样式 */
.light-theme {

/* AppAside AppHeader 背景样式 */
/* AppAside AppHeader 和 知识库卡片 背景样式 */
.aside-bg,
.header-bg {
.header-bg,
.kb-card {
background-color: #fff;
color: #333;
}
Expand All @@ -41,6 +42,7 @@ html {
--common-color: black;
/* 用户和机器人对话卡 底部提示信息字体颜色
* 侧边栏 标题栏 字体颜色
* 召回模块单条召回文本内容颜色
*/
--answer-stats-color: #888;
/* 布局背景 */
Expand All @@ -54,14 +56,24 @@ html {
* 侧边栏/工具栏 边框颜色
*/
--app-small-border-color: #ccc;
/* 召回模块背景颜色 */
--recall-bg-color: #f5f7fa;
/* 召回模块单条召回文本背景颜色 */
--recall-item-bg-color: #f0f2f5;
/*
* 召回模块单条召回文本标题颜色
* 召回模块单条召回文本分数颜色
*/
--recall-item-title-color: #636363;
}

/* 暗黑 主题样式 */
.dark-theme {

/* AppAside AppHeader 背景样式 */
/* AppAside AppHeader 和 知识库卡片 背景样式 */
.aside-bg,
.header-bg {
.header-bg,
.kb-card {
background-color: #333;
color: #fff;
}
Expand All @@ -88,6 +100,7 @@ html {
--common-color: white;
/* 用户和机器人对话卡 底部提示信息字体颜色
* 侧边栏 标题栏 字体颜色
* 召回模块单条召回文本内容颜色
*/
--answer-stats-color: #888;
/* 布局背景 */
Expand All @@ -101,14 +114,24 @@ html {
* 侧边栏/工具栏 边框颜色
*/
--app-small-border-color: #555;
/* 召回模块背景颜色 */
--recall-bg-color: #343434;
/* 召回模块单条召回文本背景颜色 */
--recall-item-bg-color: #444;
/*
* 召回模块单条召回文本标题颜色
* 召回模块单条召回文本分数颜色
*/
--recall-item-title-color: #aaaaaa;
}

/* 毛玻璃 主题样式 */
.glass-theme {

/* AppAside AppHeader 背景样式 */
/* AppAside AppHeader 和 知识库卡片 背景样式 */
.aside-bg,
.header-bg {
.header-bg,
.kb-card {
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
color: #333;
Expand Down Expand Up @@ -136,7 +159,10 @@ html {
* 输入框 边框颜色
*/
--common-color: black;
/* 用户和机器人对话卡 底部提示信息字体颜色 */
/*
* 用户和机器人对话卡 底部提示信息字体颜色
* 召回模块单条召回文本内容颜色
*/
--answer-stats-color: #888;
/* 布局背景 */
--layout-common-layout-bg: var(--custom-bg, url('../images/bg.jpg')) center center;
Expand All @@ -149,6 +175,15 @@ html {
* 侧边栏/工具栏 边框颜色
*/
--app-small-border-color: #aaa;
/* 召回模块背景颜色 */
--recall-bg-color: #f5f7fa;
/* 召回模块单条召回文本背景颜色 */
--recall-item-bg-color: #f0f2f5;
/*
* 召回模块单条召回文本标题颜色
* 召回模块单条召回文本分数颜色
*/
--recall-item-title-color: #636363;
}

.el-row {
Expand Down
Loading

0 comments on commit 3f6c907

Please sign in to comment.