Skip to content

Commit daba1fb

Browse files
kachenjrJarrettAWS
authored andcommitted
Fix/aws realtime tooluse barge in (livekit#3704)
Co-authored-by: Jarrett Kachenmeister <[email protected]>
1 parent ad0cad9 commit daba1fb

File tree

2 files changed

+365
-270
lines changed

2 files changed

+365
-270
lines changed

examples/voice_agents/realtime_joke_teller.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ async def tell_joke(category: list[str] | None = None) -> dict[str, Any]:
139139
Available categories are: Any, Misc, Programming, Dark, Pun, Spooky, Christmas
140140
"""
141141
j = await Jokes()
142-
joke = await j.get_joke(category=category if category is not None else ["Any"])
142+
# Use safe_mode=True to ensure jokes are appropriate for all ages
143+
joke = await j.get_joke(category=category if category is not None else ["Pun"], safe_mode=True)
143144
if joke["type"] == "single":
144145
return {"joke": joke["joke"]}
145146
else:

0 commit comments

Comments
 (0)