Add friends_only filter to beli_search_restaurants tool

Replaces include_friends with friends_only so the LLM can return
exclusively friend-sourced rows when user asks what their friends like,
rather than mixing in own rankings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-17 22:44:28 -04:00
parent 834c2c5bfe
commit 98b4b46b11
+6 -3
View File
@@ -1319,7 +1319,7 @@ async def beli_search_restaurants(
cuisine: str = "",
name: str = "",
category: str = "",
include_friends: bool = True,
friends_only: bool = False,
) -> str:
"""Search restaurant, bar, cafe, and bakery recommendations from Beli profiles.
@@ -1337,7 +1337,8 @@ async def beli_search_restaurants(
category: Filter by type — 'restaurant', 'bar', 'cafe', 'bakery', 'dessert'. Leave blank for all.
IMPORTANT: When the user asks for "restaurants", "top restaurants", or "places to eat",
always pass category='restaurant'. Only leave blank when the user explicitly wants all types.
include_friends: Include friends' rankings (default True). Set False for own lists only.
friends_only: Set True when the user specifically asks what their friends like or recommend.
False (default) returns the user's own rankings only.
Returns:
Formatted list of matching places with ratings, type, location, and attribution.
@@ -1347,7 +1348,9 @@ async def beli_search_restaurants(
try:
qs = BeliRestaurant.all()
if not include_friends:
if friends_only:
qs = qs.exclude(friend_beli_user_id="")
else:
qs = qs.filter(friend_beli_user_id="")
if status: