Skip to content

Commit 6fb5236

Browse files
fix: adjust max items in TopPicksService sampling and update item ID retrieval method
1 parent 4f8161c commit 6fb5236

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/services/recommendation/top_picks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,14 @@ async def _fetch_recommendations_from_top_items(
146146
List of candidate items
147147
"""
148148
# Get top items (loved first, then liked, then added, then top watched)
149-
top_items = self.smart_sampler.sample_items(library_items, content_type, max_items=15)
149+
top_items = self.smart_sampler.sample_items(library_items, content_type, max_items=10)
150150

151151
candidates = []
152152
tasks = []
153153

154154
for item in top_items:
155155
item = item.item
156-
item_id = item.get("_id", "")
156+
item_id = item.id
157157
if not item_id:
158158
continue
159159

0 commit comments

Comments
 (0)