try rrf
This commit is contained in:
parent
1345f253a0
commit
bb3e175968
15
main.py
15
main.py
@ -11,7 +11,20 @@ def query(query:str):
|
|||||||
res = []
|
res = []
|
||||||
list = search_paper(query)
|
list = search_paper(query)
|
||||||
for i in list:
|
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'])
|
print(i['title'])
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user