I’m using the `generate_reply` method of the sessi...
# agents
a
I’m using the
generate_reply
method of the session, but I’m facing an issue — it keeps calling tools during
generate_reply
. What setting should I use so it doesn’t call any tools?
l
Usually that happens because the tool definition needs modifying, see these best practices from the docs:
A good tool definition is key to reliable tool use from your LLM. Be specific about what the tool does, when it should or should not be used, what the arguments are for, and what type of return value to expect.
You might also consider using
session.say()
if that is a viable option for you, https://docs.livekit.io/agents/build/audio/#session-say
a
I can't use say() because i want dynamci message in same langugae the user is speaking.
✅ 1
e
We have this in a few places in our Python-based agent — seems like what you're looking for:
Copy code
await self.session.generate_reply(tool_choice="none")