Hi, team, I am using Gemini live api: ```llm=googl...
# agents
l
Hi, team, I am using Gemini live api:
Copy code
llm=google.beta.realtime.RealtimeModel(
    model="gemini-2.0-flash-live-001",
The gemini implicit cache does not work, so how do I set up the explicit cache? Here is the metrics log: Session Usage Summary: UsageSummary(llm_prompt_tokens=30861, llm_prompt_cached_tokens=0, llm_input_audio_tokens=10, llm_completion_tokens=158, llm_output_audio_tokens=0, tts_characters_count=0, tts_audio_duration=0.0, stt_audio_duration=0.0)
r
I am not sure how Gemini implicit cache works. Have you checked their docs? in case it helps here is the source code for that plugin: https://github.com/livekit/agents/tree/main/livekit-plugins/livekit-plugins-google/livekit/plugins/google/beta/realtime
l
The doc says implicit cache will work automatically with us doing anything, but livekit metrics show that none of the tokens has been cached in my log. Gemini also provides an explicit cache method, but I do not know how Livekit integrates that method.
r
l
Can you please test if your Gemini live chatbot also shows cached token=0 or not?
https://github.com/livekit/agents/issues/2359 Here actually is an explicit cache feature request .
h
Second this - Gemini implicit caching is broken. Can we use explicit caching?