File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
apps/application/chat_pipeline/step/chat_step/impl Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -208,10 +208,9 @@ def get_block_result(message_list: List[BaseMessage],
208208 problem_text = None ):
209209 if paragraph_list is None :
210210 paragraph_list = []
211-
212- directly_return_chunk_list = [AIMessage (content = paragraph .content )
213- for paragraph in paragraph_list if
214- paragraph .hit_handling_method == 'directly_return' ]
211+ directly_return_chunk_list = [AIMessageChunk (content = paragraph .content )
212+ for paragraph in paragraph_list if (
213+ paragraph .hit_handling_method == 'directly_return' and paragraph .similarity >= paragraph .directly_return_similarity )]
215214 if directly_return_chunk_list is not None and len (directly_return_chunk_list ) > 0 :
216215 return directly_return_chunk_list [0 ], False
217216 elif len (paragraph_list ) == 0 and no_references_setting .get (
You can’t perform that action at this time.
0 commit comments