mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
c
This commit is contained in:
parent
1c81cdda3c
commit
796da39f40
2 changed files with 8 additions and 8 deletions
|
@ -833,10 +833,10 @@ def search():
|
||||||
|
|
||||||
tmp_prompt = res['title'] +'\n'+ res['content'] + '\n' + new_url +'\n'
|
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)
|
raws.append(tmp_prompt)
|
||||||
prompt += tmp_prompt +'\n'
|
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'
|
prompt += tmp_prompt +'\n'
|
||||||
if prompt != "":
|
if prompt != "":
|
||||||
gpt = ""
|
gpt = ""
|
||||||
|
@ -846,7 +846,7 @@ def search():
|
||||||
}
|
}
|
||||||
if '搜索' not in search_type:
|
if '搜索' not in search_type:
|
||||||
gpt_data = {
|
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,
|
"max_tokens": 1000,
|
||||||
"temperature": 0.2,
|
"temperature": 0.2,
|
||||||
"top_p": 1,
|
"top_p": 1,
|
||||||
|
@ -856,7 +856,7 @@ def search():
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
gpt_data = {
|
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,
|
"max_tokens": 1000,
|
||||||
"temperature": 0.2,
|
"temperature": 0.2,
|
||||||
"top_p": 1,
|
"top_p": 1,
|
||||||
|
|
|
@ -833,10 +833,10 @@ def search():
|
||||||
|
|
||||||
tmp_prompt = res['title'] +'\n'+ res['content'] + '\n' + new_url +'\n'
|
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)
|
raws.append(tmp_prompt)
|
||||||
prompt += tmp_prompt +'\n'
|
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'
|
prompt += tmp_prompt +'\n'
|
||||||
if prompt != "":
|
if prompt != "":
|
||||||
gpt = ""
|
gpt = ""
|
||||||
|
@ -846,7 +846,7 @@ def search():
|
||||||
}
|
}
|
||||||
if '搜索' not in search_type:
|
if '搜索' not in search_type:
|
||||||
gpt_data = {
|
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,
|
"max_tokens": 1000,
|
||||||
"temperature": 0.2,
|
"temperature": 0.2,
|
||||||
"top_p": 1,
|
"top_p": 1,
|
||||||
|
@ -856,7 +856,7 @@ def search():
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
gpt_data = {
|
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,
|
"max_tokens": 1000,
|
||||||
"temperature": 0.2,
|
"temperature": 0.2,
|
||||||
"top_p": 1,
|
"top_p": 1,
|
||||||
|
|
Loading…
Add table
Reference in a new issue