mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
Update webapp.py
This commit is contained in:
parent
3cdc5e6653
commit
d87cce2c9f
1 changed files with 3 additions and 3 deletions
|
@ -774,7 +774,7 @@ def search():
|
||||||
}
|
}
|
||||||
if original_search_query != search_query.query:
|
if original_search_query != search_query.query:
|
||||||
gpt_data = {
|
gpt_data = {
|
||||||
"prompt": prompt+"\n以上是问题 " + original_search_query + " 的搜索结果,用简体中文分条总结简报,在文中用markdown脚注指对应内容来源链接:",
|
"prompt": prompt+"\n以上是问题 " + original_search_query + " 的搜索结果,用简体中文分条总结简报,在文中用(链接)标注对应内容来源链接:",
|
||||||
"max_tokens": 1000,
|
"max_tokens": 1000,
|
||||||
"temperature": 0.7,
|
"temperature": 0.7,
|
||||||
"top_p": 1,
|
"top_p": 1,
|
||||||
|
@ -787,7 +787,7 @@ def search():
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
gpt_data = {
|
gpt_data = {
|
||||||
"prompt": prompt+"\n以上是关键词 " + search_query.query + " 的搜索结果,用简体中文分条总结简报,在文中用markdown脚注指对应内容来源链接:",
|
"prompt": prompt+"\n以上是关键词 " + search_query.query + " 的搜索结果,用简体中文分条总结简报,在文中用(链接)标注对应内容来源链接:",
|
||||||
"max_tokens": 1000,
|
"max_tokens": 1000,
|
||||||
"temperature": 0.7,
|
"temperature": 0.7,
|
||||||
"top_p": 1,
|
"top_p": 1,
|
||||||
|
@ -813,7 +813,7 @@ def search():
|
||||||
for i in range(1,16):
|
for i in range(1,16):
|
||||||
gpt = gpt.replace("["+str(i)+"] http","[^"+str(i)+"]: http").replace("["+str(i)+"]http","[^"+str(i)+"]: http").replace("["+str(i)+"]","[^"+str(i)+"]")
|
gpt = gpt.replace("["+str(i)+"] http","[^"+str(i)+"]: http").replace("["+str(i)+"]http","[^"+str(i)+"]: http").replace("["+str(i)+"]","[^"+str(i)+"]")
|
||||||
rgpt = gpt
|
rgpt = gpt
|
||||||
gpt = markdown.markdown( gpt , extensions=['footnotes'])
|
# gpt = markdown.markdown( gpt , extensions=['footnotes'])
|
||||||
|
|
||||||
for urls in url_pair.keys():
|
for urls in url_pair.keys():
|
||||||
gpt = gpt.replace("#fn:"+urls.replace("https://url",""),url_pair[urls])
|
gpt = gpt.replace("#fn:"+urls.replace("https://url",""),url_pair[urls])
|
||||||
|
|
Loading…
Add table
Reference in a new issue