Streaming Tracker • AI Agents Framework
StreamingTracker: Track streaming operations (LLM responses).
StreamingTracker
Defined in the profiler module.
AI Agents Framework
Track streaming operations (LLM responses).
Extends the core SDK’s `StreamingTracker (single owner of the TTFT start/first_token/chunk/end logic) with wrapper-only total_tokens support and records to the wrapper's context-aware Profiler`.
Constructor
ParamField
strNo description available.
Methods
Usage
tracker = StreamingTracker("chat")
tracker.start()
tracker.first_token() # Mark TTFT
for chunk in stream:
tracker.chunk()
tracker.end(total_tokens=100)Source
View on GitHubpraisonai/profiler.py at line 211