Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app_paper.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
import os
import shutil
import time
from datetime import datetime

import gradio as gr
import loguru
import pandas as pd
from anyio import value
import pytz

from trustrag.applications.rag_openai_bge import RagApplication, ApplicationConfig
from trustrag.modules.reranker.bge_reranker import BgeRerankerConfig
from trustrag.modules.retrieval.dense_retriever import DenseRetrieverConfig
from datetime import datetime
import pytz

# ========================== Config Start====================
app_config = ApplicationConfig()
app_config.docs_path = r"H:\Projects\TrustRAG\data\docs"
# app_config.key = "sk-04031f18c05a4dd5a561d33d984ca40f"
app_config.key = "sk-gDbFoQAYz9pwqBsH0aPA1H8DN9s0B9F3vWNjjPcijRBFjk7f"
app_config.key = "sk-xxx"
retriever_config = DenseRetrieverConfig(
model_name_or_path=r"H:\pretrained_models\mteb\bge-large-zh-v1.5",
dim=1024,
Expand Down
29 changes: 29 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<title>TrustRAG - 可靠输入与可信输出的RAG框架</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="TrustRAG是一款配置化模块化的Retrieval-Augmented Generation (RAG) 框架">
<meta name="author" content="网络数据科学与技术重点实验室 GoMate团队">
<meta name="keywords" content="RAG, TrustRAG, 检索增强生成, GoMate, 中科院">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
<link rel="icon" href="https://github.com/gomate-community.png" type="image/png">
Expand Down Expand Up @@ -52,6 +54,33 @@
var editHtml = '[:memo: 编辑此页](' + url + ')\n'
return editHtml + html
})
},
function(hook, vm) {
hook.afterEach(function (html, next) {
var footer = `
<hr style="margin-top: 50px; border: none; border-top: 1px solid #eee;">
<div style="text-align: center; padding: 20px; color: #666; font-size: 14px; line-height: 1.6;">
<div style="margin-bottom: 15px;">
<strong>🏛️ 研究与开发团队</strong><br>
本项目由网络数据科学与技术重点实验室 <a href="https://github.com/gomate-community" target="_blank" style="color: #42b983; text-decoration: none;"><strong>GoMate</strong></a> 团队完成<br>
团队指导老师为郭嘉丰、范意兴研究员
</div>
<div style="background: #f8f9fa; padding: 15px; border-radius: 8px; margin: 15px 0; text-align: left; font-family: 'Courier New', monospace; font-size: 12px;">
<strong>📄 Citation</strong><br>
<code style="display: block; white-space: pre-wrap; color: #333;">@article{fan2025trustrag,
title={TrustRAG: An Information Assistant with Retrieval Augmented Generation},
author={Fan, Yixing and Yan, Qiang and Wang, Wenshan and Guo, Jiafeng and Zhang, Ruqing and Cheng, Xueqi},
journal={arXiv preprint arXiv:2502.13719},
year={2025},
url={https://arxiv.org/abs/2502.13719}
}</code>
</div>
<div style="font-size: 12px; color: #999;">
© 2025 GoMate Team. All rights reserved.
</div>
</div>`
next(html + footer)
})
}
]
}
Expand Down
1 change: 1 addition & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## 安装环境
> python 3.12

下面是建议安装步骤
- 第一步:设置pip清华源
Expand Down
2 changes: 1 addition & 1 deletion trustrag/applications/rag.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ def chat(self, question: str = '', top_k: int = 5):
# selected_idx=[idx for idx in range(len(contents))],
# markdown=True
# )
return result, history, contents
return result, history, contents,question
Loading