File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
apps/application/chat_pipeline/step/chat_step/impl Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ def get_stream_result(message_list: List[BaseMessage],
142
142
paragraph .hit_handling_method == 'directly_return' ]
143
143
if directly_return_chunk_list is not None and len (directly_return_chunk_list ) > 0 :
144
144
return iter (directly_return_chunk_list ), False
145
- elif no_references_setting .get (
145
+ elif len ( paragraph_list ) == 0 and no_references_setting .get (
146
146
'status' ) == 'designated_answer' :
147
147
return iter ([AIMessageChunk (content = no_references_setting .get ('value' ))]), False
148
148
if chat_model is None :
@@ -185,7 +185,7 @@ def get_block_result(message_list: List[BaseMessage],
185
185
paragraph .hit_handling_method == 'directly_return' ]
186
186
if directly_return_chunk_list is not None and len (directly_return_chunk_list ) > 0 :
187
187
return directly_return_chunk_list [0 ], False
188
- elif no_references_setting .get (
188
+ elif len ( paragraph_list ) == 0 and no_references_setting .get (
189
189
'status' ) == 'designated_answer' :
190
190
return AIMessage (no_references_setting .get ('value' )), False
191
191
if chat_model is None :
You can’t perform that action at this time.
0 commit comments