Skip to content

Commit 78b4e7d

Browse files
committed
one chunk at a time
1 parent 04e2b84 commit 78b4e7d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

guardrails/telemetry/runner_tracing.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,11 @@ def trace_call_wrapper(*args, **kwargs):
265265
) as call_span:
266266
try:
267267
response = fn(*args, **kwargs)
268+
if isinstance(response, LLMResponse) and (
269+
response.async_stream_output or response.stream_output
270+
):
271+
# TODO: Iterate, add a call attr each time
272+
return response
268273
add_call_attributes(call_span, response, *args, **kwargs)
269274
return response
270275
except Exception as e:

0 commit comments

Comments
 (0)