This commit is contained in:
mxr612 2024-08-21 15:10:51 +08:00
parent 1345f253a0
commit bb3e175968

15
main.py
View File

@ -11,7 +11,20 @@ def query(query:str):
res = []
list = search_paper(query)
for i in list:
res.append({'id':'','datasetId':__CONFIG__['fastgpt_setId'], 'collectionId':__CONFIG__['fastgpt_colId'], 'sourceName':'Semantic Scholar','sourceId?':'', 'q':str(i['title']), 'a':str(i['abstract'])})
res.append({
'id':'','datasetId':__CONFIG__['fastgpt_setId'],
'collectionId':__CONFIG__['fastgpt_colId'],
'sourceName':'Semantic Scholar',
'sourceId?':'',
'q':str(i['title']),
'a':str(i['abstract']),
'score':[
{
'type': 'rrf'
'value':0.8
}
]
})
print(i['title'])
return res