mirror of https://github.com/Mai-with-u/MaiBot.git
Update src/chat/focus_chat/heartflow_prompt_builder.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>pull/952/head
parent
a242a4cb7a
commit
8775c66454
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue