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],
142142 paragraph .hit_handling_method == 'directly_return' ]
143143 if directly_return_chunk_list is not None and len (directly_return_chunk_list ) > 0 :
144144 return iter (directly_return_chunk_list ), False
145- elif no_references_setting .get (
145+ elif len ( paragraph_list ) == 0 and no_references_setting .get (
146146 'status' ) == 'designated_answer' :
147147 return iter ([AIMessageChunk (content = no_references_setting .get ('value' ))]), False
148148 if chat_model is None :
@@ -185,7 +185,7 @@ def get_block_result(message_list: List[BaseMessage],
185185 paragraph .hit_handling_method == 'directly_return' ]
186186 if directly_return_chunk_list is not None and len (directly_return_chunk_list ) > 0 :
187187 return directly_return_chunk_list [0 ], False
188- elif no_references_setting .get (
188+ elif len ( paragraph_list ) == 0 and no_references_setting .get (
189189 'status' ) == 'designated_answer' :
190190 return AIMessage (no_references_setting .get ('value' )), False
191191 if chat_model is None :
You can’t perform that action at this time.
0 commit comments