소스 검색

refac: default search query prompt

Timothy J. Baek 7 달 전
부모
커밋
9bdbe88bda
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      backend/open_webui/main.py

+ 2 - 2
backend/open_webui/main.py

@@ -1452,9 +1452,9 @@ async def generate_search_query(form_data: dict, user=Depends(get_verified_user)
     if app.state.config.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE != "":
     if app.state.config.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE != "":
         template = app.state.config.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE
         template = app.state.config.SEARCH_QUERY_GENERATION_PROMPT_TEMPLATE
     else:
     else:
-        template = """Assess the need for a web search based on the current question and prior interactions, but lean towards suggesting a Google search query if uncertain. Generate a Google search query even when the answer might be straightforward, as additional information may enhance comprehension or provide updated data. If absolutely certain that no further information is required, return an empty string. Default to a search query if unsure or in doubt. Today's date is {{CURRENT_DATE}}.
+        template = """Assess the need for a web search based on the current user message and prior interactions, but lean towards suggesting a Google search query if uncertain. Generate a Google search query even when the answer might be straightforward, as additional information may enhance comprehension or provide updated data. If absolutely certain that no further information is required, return an empty string. Default to a search query if unsure or in doubt. Today's date is {{CURRENT_DATE}}.
 
 
-Current Question:
+User Message:
 {{prompt:end:4000}}
 {{prompt:end:4000}}
 
 
 Interaction History:
 Interaction History: