|
@@ -533,10 +533,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)
|
|
@@ -574,10 +575,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
|
|
|
)
|
|
|
|
|
|
# 构建返回的数据
|