Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vblagoje committed Oct 7, 2023
1 parent 5a6f341 commit 6d7f7e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haystack/preview/components/samplers/top_p.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def run(self, documents: List[Document], top_p: Optional[float] = None):
top_p,
)
highest_prob_indices = torch.argsort(probs, descending=True)
selected_docs = [documents[int(highest_prob_indices[0].item())]]
selected_docs = [documents[highest_prob_indices[0].item()]]

return {"documents": selected_docs}

Expand Down

0 comments on commit 6d7f7e1

Please sign in to comment.