Hey, I am working with Google realtime models with...
# agents
c
Hey, I am working with Google realtime models with livekit agents for conversations. I found in the docs that system prompt is being sent on each turn, adding to that my system prompt is around 2,500 tokens. I am using the default target tokens for context compression (sliding window) but no luck. Also I couldn't find anything related to prompt caching. Logs for additional context: TURN N:
INFO:_main_:Total token usage: UsageSummary(llm_prompt_tokens=7552, llm_prompt_cached_tokens=0, llm_completion_tokens=43, tts_characters_count=0, tts_audio_duration=0.0, stt_audio_duration=0.0)
TURN N+1:
INFO:_main_:Total token usage: UsageSummary(llm_prompt_tokens=12207, llm_prompt_cached_tokens=0, llm_completion_tokens=84, tts_characters_count=0, tts_audio_duration=0.0, stt_audio_duration=0.0)
Any suggestion would be really helpful. Thank you.
e
@calm-book-72252 Make sure you are using the same context after initializing the agent.
r
How are you trying to manage the context length. You have a code example?
e
not right now, but once initialize the ctx you have to provide prompt and than you have to use that same ctx for prompt memory.