Skip to content

Commit

Permalink
fixed bug: search error
Browse files Browse the repository at this point in the history
  • Loading branch information
yym68686 committed Nov 30, 2023
1 parent 01ef324 commit 0e64efc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def search_web_and_summary(
chatllm = ChatOpenAI(streaming=True, callback_manager=CallbackManager([chainStreamHandler]), temperature=config.temperature, openai_api_base=config.bot_api_url.v1_url, model_name=engine, openai_api_key=config.API)
useful_source_text = get_search_results(prompt, context_max_tokens)
summary_prompt = PromptTemplate(
input_variables=["web_summary", "question"],
input_variables=["web_summary", "question", "language"],
template=(
# "You are a text analysis expert who can use a search engine. You need to response the following question: {question}. Search results: {web_summary}. Your task is to thoroughly digest all search results provided above and provide a detailed and in-depth response in Simplified Chinese to the question based on the search results. The response should meet the following requirements: 1. Be rigorous, clear, professional, scholarly, logical, and well-written. 2. If the search results do not mention relevant content, simply inform me that there is none. Do not fabricate, speculate, assume, or provide inaccurate response. 3. Use markdown syntax to format the response. Enclose any single or multi-line code examples or code usage examples in a pair of ``` symbols to achieve code formatting. 4. Detailed, precise and comprehensive response in Simplified Chinese and extensive use of the search results is required."
"You need to response the following question: {question}. Search results: {web_summary}. Your task is to think about the question step by step and then answer the above question in {language} based on the Search results provided. Please response in {language} and adopt a style that is logical, in-depth, and detailed. Note: In order to make the answer appear highly professional, you should be an expert in textual analysis, aiming to make the answer precise and comprehensive. Directly response markdown format, without using markdown code blocks"
Expand Down

0 comments on commit 0e64efc

Please sign in to comment.