From a6a5e945930c0504e9bcccb8a7079a478f3251b7 Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Tue, 8 Jul 2025 15:27:00 +0800 Subject: [PATCH] 'commit' --- dsRagAnything/Start.py | 2 +- dsRagAnything/T1_Train.py | 2 +- dsRagAnything/T2_Query.py | 2 +- dsRagAnything/Util/RagUtil.py | 6 +++--- .../Util/__pycache__/RagUtil.cpython-310.pyc | Bin 1869 -> 1848 bytes 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dsRagAnything/Start.py b/dsRagAnything/Start.py index fdd44bff..a4351f72 100644 --- a/dsRagAnything/Start.py +++ b/dsRagAnything/Start.py @@ -62,7 +62,7 @@ async def rag(request: fastapi.Request): try: # 初始化RAG组件 - llm_model_func = create_llm_model_func(v_history_messages=[]) + llm_model_func = create_llm_model_func(history_messages=[]) vision_model_func = create_vision_model_func(llm_model_func) embedding_func = create_embedding_func() diff --git a/dsRagAnything/T1_Train.py b/dsRagAnything/T1_Train.py index 10e0f62f..6c6c1fa7 100644 --- a/dsRagAnything/T1_Train.py +++ b/dsRagAnything/T1_Train.py @@ -45,7 +45,7 @@ async def main(): enable_equation_processing=True, # 处理公式 ) # 自定义的大模型函数 - llm_model_func = create_llm_model_func(v_history_messages=[]) + llm_model_func = create_llm_model_func(history_messages=[]) # 自定义的可视模型函数 vision_model_func = create_vision_model_func(llm_model_func) # 自定义的嵌入函数 diff --git a/dsRagAnything/T2_Query.py b/dsRagAnything/T2_Query.py index 1772a747..31c0ba1c 100644 --- a/dsRagAnything/T2_Query.py +++ b/dsRagAnything/T2_Query.py @@ -12,7 +12,7 @@ async def load_existing_lightrag(): WORKING_DIR = "./Topic/DongHua" # 创建 LLM 模型自定义函数 - llm_model_func = create_llm_model_func(v_history_messages=[]) + llm_model_func = create_llm_model_func(history_messages=[]) # 创建可视模型自定义函数 vision_model_func = create_vision_model_func(llm_model_func) # 创建嵌入模型自定义函数 diff --git a/dsRagAnything/Util/RagUtil.py b/dsRagAnything/Util/RagUtil.py index 09e29372..07ad809b 100644 --- a/dsRagAnything/Util/RagUtil.py +++ b/dsRagAnything/Util/RagUtil.py @@ -4,13 +4,13 @@ from lightrag.utils import EmbeddingFunc from Config.Config import * -def create_llm_model_func(v_history_messages): - def llm_model_func(prompt, system_prompt=None, history_messages=[], **kwargs): +def create_llm_model_func(history_messages): + def llm_model_func(prompt, system_prompt=None, **kwargs): return openai_complete_if_cache( LLM_MODEL_NAME, prompt, system_prompt=system_prompt, - history_messages=v_history_messages, + history_messages=history_messages, api_key=LLM_API_KEY, base_url=LLM_BASE_URL, **kwargs, diff --git a/dsRagAnything/Util/__pycache__/RagUtil.cpython-310.pyc b/dsRagAnything/Util/__pycache__/RagUtil.cpython-310.pyc index 31ea27cbe75d4d63951431b9761c6e4accf55c2e..77793a6d6733ee1858d291e3b0658254797d2f3f 100644 GIT binary patch delta 313 zcmX@hw}X#2pO=@50SMSn3wQ$xl)-VP$XtMYvGlA4W z0rSLPs*FsN6&Q6L++1{RisnoIPSGKfX|leyU{L=k*2iytU`OLVe6o9N`VY$A+m ZlMk_Z$qRz?$b$$qxNd|#{>j?xN&o=~H~0Vm delta 310 zcmdnNcb1PgpO=@50SL;EBTDO?JBu!(!emv}W87dnz=Xi$Z>$vp2tHJ>j!lnIeezm1 UFL@!5UIh@L4k9pAim@vJ02P)!o&W#<