mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
parent
8f529181bd
commit
5dfe56cefb
|
|
@ -70,6 +70,7 @@ class BaseSearchDatasetNode(ISearchDatasetStepNode):
|
|||
return get_none_result(question)
|
||||
paragraph_list = self.list_paragraph(embedding_list, vector)
|
||||
result = [self.reset_paragraph(paragraph, embedding_list) for paragraph in paragraph_list]
|
||||
result = sorted(result, key=lambda p: p.get('similarity'), reverse=True)
|
||||
return NodeResult({'paragraph_list': result,
|
||||
'is_hit_handling_method_list': [row for row in result if row.get('is_hit_handling_method')],
|
||||
'data': '\n'.join([paragraph.get('content') for paragraph in paragraph_list]),
|
||||
|
|
|
|||
Loading…
Reference in New Issue