Fix linting

This commit is contained in:
yangdx
2025-05-08 04:29:43 +08:00
parent 45d4db1eff
commit 10dbbe4ebf
2 changed files with 11 additions and 3 deletions

View File

@@ -926,7 +926,11 @@ async def kg_query(
) )
# Build system prompt # Build system prompt
user_prompt = query_param.user_prompt if query_param.user_prompt else PROMPTS["DEFAULT_USER_PROMPT"] user_prompt = (
query_param.user_prompt
if query_param.user_prompt
else PROMPTS["DEFAULT_USER_PROMPT"]
)
sys_prompt_temp = system_prompt if system_prompt else PROMPTS["rag_response"] sys_prompt_temp = system_prompt if system_prompt else PROMPTS["rag_response"]
sys_prompt = sys_prompt_temp.format( sys_prompt = sys_prompt_temp.format(
context_data=context, context_data=context,
@@ -1911,7 +1915,11 @@ async def naive_query(
) )
# Build system prompt # Build system prompt
user_prompt = query_param.user_prompt if query_param.user_prompt else PROMPTS["DEFAULT_USER_PROMPT"] user_prompt = (
query_param.user_prompt
if query_param.user_prompt
else PROMPTS["DEFAULT_USER_PROMPT"]
)
sys_prompt_temp = system_prompt if system_prompt else PROMPTS["naive_rag_response"] sys_prompt_temp = system_prompt if system_prompt else PROMPTS["naive_rag_response"]
sys_prompt = sys_prompt_temp.format( sys_prompt = sys_prompt_temp.format(
content_data=text_units_str, content_data=text_units_str,