From 4592ed1d944bdf096c54f6b0fb391b5ebf0e9719 Mon Sep 17 00:00:00 2001 From: Joseph Cheung Date: Thu, 2 Mar 2023 13:52:45 +0800 Subject: [PATCH] d --- searx/webapp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index d7f469cf6..0f967712d 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -833,10 +833,10 @@ def search(): tmp_prompt = res['title'] +'\n'+ res['content'] + '\n' + new_url +'\n' - if '搜索' in search_type and len( prompt + tmp_prompt +'\n' + "\n以上是关键词 " + original_search_query + " 的搜索结果,删除无关内容,用简体中文分条总结简报,在文中用(链接)标注对应内容来源链接,链接不要放在最后。结果:" ) <1600: + if '搜索' in search_type and len( prompt + tmp_prompt +'\n' + "\n以上是关键词 " + original_search_query + " 的搜索结果,删除无关内容,用简体中文分条总结简报,在文中用(网址)标注对应内容来源链接,链接不要放在最后。结果:" ) <1600: raws.append(tmp_prompt) prompt += tmp_prompt +'\n' - elif len( prompt + tmp_prompt +'\n' + "\n以上是 " + original_search_query + " 的网络知识。用简体中文完成"+ search_type +",如果使用了网络知识,删除无关内容,在文中用(链接)标注对应内容来源链接,链接不要放在最后。结果:") <1600: + elif len( prompt + tmp_prompt +'\n' + "\n以上是 " + original_search_query + " 的网络知识。用简体中文完成"+ search_type +",如果使用了网络知识,删除无关内容,在文中用(网址)标注对应内容来源链接,链接不要放在最后。结果:") <1600: prompt += tmp_prompt +'\n' if prompt != "": gpt = "" @@ -846,7 +846,7 @@ def search(): } if '搜索' not in search_type: gpt_data = { - "messages": [{'role':'assistant','content': prompt+"\n以上是 " + original_search_query + " 的网络知识"},{'role':'user','content':"用简体中文完成"+ search_type +",如果使用了网络知识,删除无关内容,在文中用(链接)标注对应内容来源链接,链接不要放在最后"}] , + "messages": [{'role':'assistant','content': prompt+"\n以上是 " + original_search_query + " 的网络知识"},{'role':'user','content':"用简体中文完成"+ search_type +",如果使用了网络知识,删除无关内容,在文中用(网址)标注对应内容来源链接,链接不要放在最后"}] , "max_tokens": 1000, "temperature": 0.2, "top_p": 1, @@ -856,7 +856,7 @@ def search(): } else: gpt_data = { - "messages": [{'role':'assistant','content': prompt+"\n以上是 " + original_search_query + " 的搜索结果"},{'role':'user','content':"用简体中文完成"+ search_type +",删除无关内容,用简体中文分条总结简报,在文中用(链接)标注对应内容来源链接,链接不要放在最后"}] , + "messages": [{'role':'assistant','content': prompt+"\n以上是 " + original_search_query + " 的搜索结果"},{'role':'user','content':"用简体中文完成"+ search_type +",删除无关内容,用简体中文分条总结简报,在文中用(网址)标注对应内容来源链接,链接不要放在最后"}] , "max_tokens": 1000, "temperature": 0.2, "top_p": 1,