This commit is contained in:
Joseph Cheung 2023-03-02 15:01:14 +08:00
parent 1c81cdda3c
commit 796da39f40
2 changed files with 8 additions and 8 deletions

View file

@ -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,

View file

@ -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,