Skip to content

Commit 926ed71

Browse files
Merge pull request #163 from gomate-community/pipeline
Pipeline
2 parents 2484ec6 + 301fc88 commit 926ed71

4 files changed

Lines changed: 36 additions & 6 deletions

File tree

app_paper.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@
1010
import os
1111
import shutil
1212
import time
13+
from datetime import datetime
14+
1315
import gradio as gr
1416
import loguru
1517
import pandas as pd
16-
from anyio import value
18+
import pytz
1719

1820
from trustrag.applications.rag_openai_bge import RagApplication, ApplicationConfig
1921
from trustrag.modules.reranker.bge_reranker import BgeRerankerConfig
2022
from trustrag.modules.retrieval.dense_retriever import DenseRetrieverConfig
21-
from datetime import datetime
22-
import pytz
23+
2324
# ========================== Config Start====================
2425
app_config = ApplicationConfig()
2526
app_config.docs_path = r"H:\Projects\TrustRAG\data\docs"
26-
# app_config.key = "sk-04031f18c05a4dd5a561d33d984ca40f"
27-
app_config.key = "sk-gDbFoQAYz9pwqBsH0aPA1H8DN9s0B9F3vWNjjPcijRBFjk7f"
27+
app_config.key = "sk-xxx"
2828
retriever_config = DenseRetrieverConfig(
2929
model_name_or_path=r"H:\pretrained_models\mteb\bge-large-zh-v1.5",
3030
dim=1024,

docs/index.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<title>TrustRAG - 可靠输入与可信输出的RAG框架</title>
66
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
77
<meta name="description" content="TrustRAG是一款配置化模块化的Retrieval-Augmented Generation (RAG) 框架">
8+
<meta name="author" content="网络数据科学与技术重点实验室 GoMate团队">
9+
<meta name="keywords" content="RAG, TrustRAG, 检索增强生成, GoMate, 中科院">
810
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
911
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
1012
<link rel="icon" href="https://github.com/gomate-community.png" type="image/png">
@@ -52,6 +54,33 @@
5254
var editHtml = '[:memo: 编辑此页](' + url + ')\n'
5355
return editHtml + html
5456
})
57+
},
58+
function(hook, vm) {
59+
hook.afterEach(function (html, next) {
60+
var footer = `
61+
<hr style="margin-top: 50px; border: none; border-top: 1px solid #eee;">
62+
<div style="text-align: center; padding: 20px; color: #666; font-size: 14px; line-height: 1.6;">
63+
<div style="margin-bottom: 15px;">
64+
<strong>🏛️ 研究与开发团队</strong><br>
65+
本项目由网络数据科学与技术重点实验室 <a href="https://github.com/gomate-community" target="_blank" style="color: #42b983; text-decoration: none;"><strong>GoMate</strong></a> 团队完成<br>
66+
团队指导老师为郭嘉丰、范意兴研究员
67+
</div>
68+
<div style="background: #f8f9fa; padding: 15px; border-radius: 8px; margin: 15px 0; text-align: left; font-family: 'Courier New', monospace; font-size: 12px;">
69+
<strong>📄 Citation</strong><br>
70+
<code style="display: block; white-space: pre-wrap; color: #333;">@article{fan2025trustrag,
71+
title={TrustRAG: An Information Assistant with Retrieval Augmented Generation},
72+
author={Fan, Yixing and Yan, Qiang and Wang, Wenshan and Guo, Jiafeng and Zhang, Ruqing and Cheng, Xueqi},
73+
journal={arXiv preprint arXiv:2502.13719},
74+
year={2025},
75+
url={https://arxiv.org/abs/2502.13719}
76+
}</code>
77+
</div>
78+
<div style="font-size: 12px; color: #999;">
79+
© 2025 GoMate Team. All rights reserved.
80+
</div>
81+
</div>`
82+
next(html + footer)
83+
})
5584
}
5685
]
5786
}

docs/install.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
## 安装环境
2+
> python 3.12
23
34
下面是建议安装步骤
45
- 第一步:设置pip清华源

trustrag/applications/rag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ def chat(self, question: str = '', top_k: int = 5):
8888
# selected_idx=[idx for idx in range(len(contents))],
8989
# markdown=True
9090
# )
91-
return result, history, contents
91+
return result, history, contents,question

0 commit comments

Comments
 (0)