From d5a2cc91242c1190659fc313063930f39b4a375b Mon Sep 17 00:00:00 2001 From: yanqiangmiffy <1185918903@qq.com> Date: Thu, 3 Jul 2025 18:06:16 +0800 Subject: [PATCH 1/2] update --- app_paper.py | 10 +++++----- trustrag/applications/rag.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app_paper.py b/app_paper.py index bfee10e..5174f46 100644 --- a/app_paper.py +++ b/app_paper.py @@ -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, diff --git a/trustrag/applications/rag.py b/trustrag/applications/rag.py index 94c6c4c..4029135 100644 --- a/trustrag/applications/rag.py +++ b/trustrag/applications/rag.py @@ -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 From 301fc88afc87d7ea3f762b35e2bf70cafd8377c6 Mon Sep 17 00:00:00 2001 From: yanqiangmiffy <1185918903@qq.com> Date: Mon, 7 Jul 2025 11:22:37 +0800 Subject: [PATCH 2/2] update --- docs/index.html | 29 +++++++++++++++++++++++++++++ docs/install.md | 1 + 2 files changed, 30 insertions(+) diff --git a/docs/index.html b/docs/index.html index c583194..e66a699 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5,6 +5,8 @@ TrustRAG - 可靠输入与可信输出的RAG框架 + + @@ -52,6 +54,33 @@ var editHtml = '[:memo: 编辑此页](' + url + ')\n' return editHtml + html }) + }, + function(hook, vm) { + hook.afterEach(function (html, next) { + var footer = ` +
+
+
+ 🏛️ 研究与开发团队
+ 本项目由网络数据科学与技术重点实验室 GoMate 团队完成
+ 团队指导老师为郭嘉丰、范意兴研究员 +
+
+ 📄 Citation
+ @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} +} +
+
+ © 2025 GoMate Team. All rights reserved. +
+
` + next(html + footer) + }) } ] } diff --git a/docs/install.md b/docs/install.md index ac14cc2..c73302f 100644 --- a/docs/install.md +++ b/docs/install.md @@ -1,4 +1,5 @@ ## 安装环境 +> python 3.12 下面是建议安装步骤 - 第一步:设置pip清华源