From bb3e17596897dfb58f35e75fad72a21232d02eae Mon Sep 17 00:00:00 2001 From: mxr612 Date: Wed, 21 Aug 2024 15:10:51 +0800 Subject: [PATCH] try rrf --- main.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index b867cde..5e77870 100644 --- a/main.py +++ b/main.py @@ -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