MCPcopy Create free account
hub / github.com/google/adk-python / _has_token_threshold_config

Function _has_token_threshold_config

src/google/adk/apps/compaction.py:205–211  ·  view source on GitHub ↗

Returns whether token-threshold compaction is fully configured.

(config: EventsCompactionConfig | None)

Source from the content-addressed store, hash-verified

203
204
205def _has_token_threshold_config(config: EventsCompactionConfig | None) -> bool:
206 """Returns whether token-threshold compaction is fully configured."""
207 return bool(
208 config
209 and config.token_threshold is not None
210 and config.event_retention_size is not None
211 )
212
213
214def _has_sliding_window_config(config: EventsCompactionConfig | None) -> bool:

Calls

no outgoing calls

Tested by

no test coverage detected