Add modes self and self_sliding_window for prompt caching (#9372)
* add self compaction method with proper caching (pass in tools, don't refresh sys prompt beforehand) + sliding fallback * updated prompts for self compaction * add tests for self, self_sliding_window modes and w/o refresh messages before compaction * add cache logging to summarization * better handling to prevent agent from continuing convo on self modes * if mode changes via summarize endpoint, will use default prompt for the new mode --------- Co-authored-by: Amy Guan <amy@letta.com>
This commit is contained in:
@@ -61,8 +61,11 @@ class LLMClientBase:
|
||||
user_id: Optional[str] = None,
|
||||
compaction_settings: Optional[Dict] = None,
|
||||
llm_config: Optional[Dict] = None,
|
||||
actor: Optional["User"] = None,
|
||||
) -> None:
|
||||
"""Set telemetry context for provider trace logging."""
|
||||
if actor is not None:
|
||||
self.actor = actor
|
||||
self._telemetry_manager = telemetry_manager
|
||||
self._telemetry_agent_id = agent_id
|
||||
self._telemetry_agent_tags = agent_tags
|
||||
|
||||
Reference in New Issue
Block a user