chore: move context window estimate to agent_manager for full async (#2354)

This commit is contained in:
Sarah Wooders
2025-05-22 20:30:41 -07:00
committed by GitHub
parent 9fad8487db
commit e5e4ed5111
4 changed files with 287 additions and 13 deletions

View File

@@ -1618,14 +1618,6 @@ class SyncServer(Server):
def add_embedding_model(self, request: EmbeddingConfig) -> EmbeddingConfig:
"""Add a new embedding model"""
def get_agent_context_window(self, agent_id: str, actor: User) -> ContextWindowOverview:
letta_agent = self.load_agent(agent_id=agent_id, actor=actor)
return letta_agent.get_context_window()
async def get_agent_context_window_async(self, agent_id: str, actor: User) -> ContextWindowOverview:
letta_agent = self.load_agent(agent_id=agent_id, actor=actor)
return await letta_agent.get_context_window_async()
def run_tool_from_source(
self,
actor: User,