Update src/chat/focus_chat/heartflow_prompt_builder.py

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
This commit is contained in:
墨梓柒andsourcery-ai[bot] authored and GitHub committed 2025-05-15 10:10:12 +08:00
1 parent a242a4cb7a
commit 8775c66454
1 file changed
+1 -1
@@ -613,7 +613,7 @@ class PromptBuilder:
all_knowledges = Knowledges.select()
if not all_knowledges:
return "" if not return_raw else []
return [] if return_raw else ""
query_embedding_magnitude = math.sqrt(sum(x * x for x in query_embedding))
if query_embedding_magnitude == 0: # Avoid division by zero