chore: add more summarize tracing (#6532)

This commit is contained in:
cthomas
2025-12-05 17:42:02 -08:00
committed by Caren Thomas
parent edeac2c679
commit 6fd73d4dcf
3 changed files with 5 additions and 0 deletions

View File

@@ -408,6 +408,7 @@ def simple_message_wrapper(openai_msg: dict) -> Message:
raise ValueError(f"Unknown role: {openai_msg['role']}")
@trace_method
async def simple_summary(
messages: List[Message],
llm_config: LLMConfig,

View File

@@ -1,6 +1,7 @@
from typing import List
from letta.log import get_logger
from letta.otel.tracing import trace_method
from letta.schemas.llm_config import LLMConfig
from letta.schemas.message import Message
from letta.schemas.user import User
@@ -10,6 +11,7 @@ from letta.services.summarizer.summarizer_config import SummarizerConfig
logger = get_logger(__name__)
@trace_method
async def summarize_all(
# Required to tag LLM calls
actor: User,

View File

@@ -2,6 +2,7 @@ from typing import List, Tuple
from letta.helpers.message_helper import convert_message_creates_to_messages
from letta.log import get_logger
from letta.otel.tracing import trace_method
from letta.schemas.agent import AgentState
from letta.schemas.enums import MessageRole
from letta.schemas.letta_message_content import TextContent
@@ -41,6 +42,7 @@ async def count_tokens(actor: User, llm_config: LLMConfig, messages: List[Messag
return tokens
@trace_method
async def summarize_via_sliding_window(
# Required to tag LLM calls
actor: User,