rollback
Browse files
app.py
CHANGED
@@ -377,7 +377,8 @@ def chatbot_response(message, history, max_tokens, temperature, top_p, window_si
|
|
377 |
# distance, ad_summary, ad_keywords = get_response_from_db(keywords_dict, class_name="ad_DB02")
|
378 |
#数据库索引,数据库关键词平均方式
|
379 |
candidates=get_candidates_from_db(keywords_dict, class_name="ad_DB02",limit=3)
|
380 |
-
|
|
|
381 |
#先对候选集的distance进行筛选,保留小于threshold的
|
382 |
candidates.sort(key=lambda x:x['distance'])
|
383 |
candidates=[candidate for candidate in candidates if candidate['distance']<threshold]
|
|
|
377 |
# distance, ad_summary, ad_keywords = get_response_from_db(keywords_dict, class_name="ad_DB02")
|
378 |
#数据库索引,数据库关键词平均方式
|
379 |
candidates=get_candidates_from_db(keywords_dict, class_name="ad_DB02",limit=3)
|
380 |
+
print(f"candidates{candidates}")
|
381 |
+
|
382 |
#先对候选集的distance进行筛选,保留小于threshold的
|
383 |
candidates.sort(key=lambda x:x['distance'])
|
384 |
candidates=[candidate for candidate in candidates if candidate['distance']<threshold]
|