فهرست منبع

Merge branch 'master' into feature/xueyiming/2025-10-09-update-query

xueyiming 1 روز پیش
والد
کامیت
8acdbe60e1
2فایلهای تغییر یافته به همراه9 افزوده شده و 7 حذف شده
  1. 3 2
      mcp_server/server.py
  2. 6 5
      routes/blueprint.py

+ 3 - 2
mcp_server/server.py

@@ -116,8 +116,9 @@ async def process_question(question, query_text, rag_chat_agent):
 
 async def rag_search(query_text: str):
     rag_chat_agent = RAGChatAgent()
-    spilt_query = await rag_chat_agent.split_query(query_text)
-    split_questions = spilt_query["split_questions"]
+    split_questions = []
+    # spilt_query = await rag_chat_agent.split_query(query_text)
+    # split_questions = spilt_query["split_questions"]
     split_questions.append(query_text)
 
     # 使用asyncio.gather并行处理每个问题

+ 6 - 5
routes/blueprint.py

@@ -536,10 +536,11 @@ async def rag_search():
     body = await request.get_json()
     query_text = body.get("queryText")
     rag_chat_agent = RAGChatAgent()
-    spilt_query = await rag_chat_agent.split_query(query_text)
-    split_questions = spilt_query["split_questions"]
+    # spilt_query = await rag_chat_agent.split_query(query_text)
+    # split_questions = spilt_query["split_questions"]
+    # split_questions.append(query_text)
+    split_questions = []
     split_questions.append(query_text)
-
     # 使用asyncio.gather并行处理每个问题
     tasks = [
         process_question(question, query_text, rag_chat_agent)
@@ -577,10 +578,10 @@ async def process_question(question, query_text, rag_chat_agent):
 
         qwen_client = QwenClient()
         llm_search = qwen_client.search_and_chat(
-            user_prompt=query, search_strategy="agent"
+            user_prompt=question
         )
         decision = await rag_chat_agent.make_decision(
-            query_text, chat_result, llm_search
+            question, chat_result, llm_search
         )
 
         # 构建返回的数据