This commit is contained in:
@@ -184,4 +184,4 @@ def create_llm_call_node(llm, tools: list):
|
||||
log_state_change("llm_call", state, "离开(异常)")
|
||||
return error_result
|
||||
|
||||
return call_llm
|
||||
return call_llm
|
||||
@@ -17,6 +17,7 @@ from app.main_graph.utils.retry_utils import (
|
||||
RAG_RETRY_CONFIG,
|
||||
create_retry_wrapper_for_node
|
||||
)
|
||||
from app.logger import info
|
||||
|
||||
# 真正导入和利用已有 RAG 代码
|
||||
from app.rag.tools import create_rag_tool
|
||||
@@ -95,7 +96,7 @@ def inject_rag_tool_to_state(state: MainGraphState, rag_tool: Any) -> MainGraphS
|
||||
return state
|
||||
|
||||
|
||||
# ========== RAG 检索核心逻辑(真正利用已有代码) ==========
|
||||
# ========== RAG 检索核心逻辑(真正利用已有代码)==========
|
||||
async def _rag_retrieve_core(state: MainGraphState) -> MainGraphState:
|
||||
"""
|
||||
RAG 检索核心逻辑(真正利用 rag/tools.py) - 异步版本
|
||||
@@ -158,7 +159,7 @@ async def _rag_retrieve_core(state: MainGraphState) -> MainGraphState:
|
||||
raise RuntimeError("RAG 工具未初始化,请先调用 set_global_rag_tool() 或 set_global_rag_pipeline()")
|
||||
|
||||
|
||||
# ========== RAG 检索节点(带超时和重试) ==========
|
||||
# ========== RAG 检索节点(带超时和重试)==========
|
||||
async def rag_retrieve_node(state: MainGraphState, config: Optional[Dict[str, Any]] = None) -> MainGraphState:
|
||||
"""
|
||||
RAG 检索节点:带超时和重试,真正利用已有 RAG 代码
|
||||
|
||||
Reference in New Issue
Block a user