Skip to content

feat: 高级编排检索结果字符串添加标题字段 #1377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ def execute(self, dataset_id_list, dataset_setting, question,
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]),
'directly_return': '\n'.join([paragraph.get('content') for paragraph in result if
paragraph.get('is_hit_handling_method')]),
'data': '\n'.join(
[f"{paragraph.get('title', '')}:{paragraph.get('content')}" for paragraph in
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},

{})
Expand Down
Loading