feat: 高级编排检索结果字符串添加标题字段
This commit is contained in:
parent
464aa13d2e
commit
451be0c81c
@ -62,9 +62,12 @@ class BaseSearchDatasetNode(ISearchDatasetStepNode):
|
|||||||
result = sorted(result, key=lambda p: p.get('similarity'), reverse=True)
|
result = sorted(result, key=lambda p: p.get('similarity'), reverse=True)
|
||||||
return NodeResult({'paragraph_list': result,
|
return NodeResult({'paragraph_list': result,
|
||||||
'is_hit_handling_method_list': [row for row in result if row.get('is_hit_handling_method')],
|
'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]),
|
'data': '\n'.join(
|
||||||
'directly_return': '\n'.join([paragraph.get('content') for paragraph in result if
|
[f"{paragraph.get('title', '')}:{paragraph.get('content')}" for paragraph in
|
||||||
paragraph.get('is_hit_handling_method')]),
|
paragraph_list]),
|
||||||
|
'directly_return': '\n'.join(
|
||||||
|
[f"{paragraph.get('title', '')}:{paragraph.get('content')}" for paragraph in result if
|
||||||
|
paragraph.get('is_hit_handling_method')]),
|
||||||
'question': question},
|
'question': question},
|
||||||
|
|
||||||
{})
|
{})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user