Skip to content

Commit

Permalink
Change top_n if number of input nodes are less
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSecureHuman committed Dec 26, 2024
1 parent 2c85e1c commit 52dafb9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ def _postprocess_nodes(
},
}
)
# change top_n if the number of nodes is less than top_n
if len(nodes) < self.top_n:
self.top_n = len(nodes)

queries = [
{
Expand Down

0 comments on commit 52dafb9

Please sign in to comment.