Skip to content

Commit 9b32153

Browse files
committed
feat: make rankedresults subscribable
1 parent 18346f2 commit 9b32153

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rerankers/results.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ def __iter__(self):
3636
"""Allows iteration over the results list."""
3737
return iter(self.results)
3838

39+
def __getitem__(self, index):
40+
"""Allows indexing to access results directly."""
41+
return self.results[index]
42+
3943
def results_count(self) -> int:
4044
"""Returns the total number of results."""
4145
return len(self.results)

0 commit comments

Comments
 (0)