File tree Expand file tree Collapse file tree
sentry_sdk/integrations/pydantic_ai Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ def __init__(
3737 self .model_settings = model_settings
3838 self .is_streaming = is_streaming
3939 self ._isolation_scope : "Any" = None
40- self ._span : "Optional[sentry_sdk.tracing.Span]" = None
40+ self ._span : "Optional[sentry_sdk.tracing.Span, sentry_sdk.traces.StreamedSpan ]" = None
4141 self ._result : "Any" = None
4242
4343 async def __aenter__ (self ) -> "Any" :
Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ def ai_client_span(
314314
315315
316316def update_ai_client_span (
317- span : "sentry_sdk.tracing.Span" , model_response : "Any"
317+ span : "Union[ sentry_sdk.tracing.Span, StreamedSpan] " , model_response : "Any"
318318) -> None :
319319 """Update the AI client span with response data."""
320320 if not span :
You can’t perform that action at this time.
0 commit comments