feat: add tracing to streaming interface (#2477)
This commit is contained in:
@@ -37,6 +37,7 @@ from letta.schemas.letta_message_content import ReasoningContent, RedactedReason
|
||||
from letta.schemas.message import Message
|
||||
from letta.schemas.openai.chat_completion_response import FunctionCall, ToolCall
|
||||
from letta.server.rest_api.json_parser import JSONParser, PydanticJSONParser
|
||||
from letta.tracing import trace_method
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
@@ -115,6 +116,7 @@ class AnthropicStreamingInterface:
|
||||
logger.error("Error checking inner thoughts: %s", e)
|
||||
raise
|
||||
|
||||
@trace_method
|
||||
async def process(self, stream: AsyncStream[BetaRawMessageStreamEvent]) -> AsyncGenerator[LettaMessage, None]:
|
||||
prev_message_type = None
|
||||
message_index = 0
|
||||
|
||||
Reference in New Issue
Block a user