Hey I'm facing issues when using the "generate_rep...
# agents
b
Hey I'm facing issues when using the "generate_reply" when using gemini realtime... when I'm using with the below code await session.generate_reply(instructions=f"Just start by saying this welcome message to the user: {welcome_msg}") following this I've configured the gemini realtime to start interacting it... it is starting with this, but after that it is not responding and getting stuck... Does anybody faced this issue??
@refined-appointment-81829 @dry-elephant-14928 tagging you, if you have seen like this issue previously
s
either your agent is configured incorrectly or something else. can you send me the logs here? what error code? where is it getting stuck, etc?
r
I've not seen the issue. Logs may help or if you take this basic_agent.py and modify to reproduce the issue and share reproducible issues I can maybe help more.
b
@stocky-leather-74859 @refined-appointment-81829 Getting this error Traceback (most recent call last): File "/Users/karthikeyan/Workspace/KuralynX/worker/.venv/lib/python3.13/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs return await fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/karthikeyan/Workspace/KuralynX/worker/.venv/lib/python3.13/site-packages/livekit/agents/voice/agent_activity.py", line 1936, in _realtime_reply_task generation_ev = await self._rt_session.generate_reply( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ instructions=instructions or NOT_GIVEN ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ livekit.agents.llm.realtime.RealtimeError: generate_reply timed out waiting for generation_created event. {"pid": 41691, "job_id": "AJ_VepHh3io9bBD"}
Is it possible to use "say" with the gemini realtime model??
because that would ease my job, or pls suggest a better way??
r
You cannot use
say()
with real-time models. If you pick a non-realtime you can use say so your job can be eased.