File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 Type ,
2222 cast ,
2323 overload ,
24- get_args ,
2524)
2625
2726import backoff
5251 ObservationTypeLiteral ,
5352 ObservationTypeLiteralNoEvent ,
5453 ObservationTypeGenerationLike ,
54+ get_observation_types_list ,
5555)
5656from langfuse ._client .resource_manager import LangfuseResourceManager
5757from langfuse ._client .span import (
@@ -669,7 +669,7 @@ def _create_observation_from_otel_span(
669669 LangfuseGuardrail ,
670670 ]:
671671 """Create the appropriate observation type from an OTEL span."""
672- if as_type in get_args (ObservationTypeGenerationLike ):
672+ if as_type in get_observation_types_list (ObservationTypeGenerationLike ):
673673 observation_class = self ._get_span_class (as_type )
674674 # Type ignore to prevent overloads of internal _get_span_class function,
675675 # issue is that LangfuseEvent could be returned and that classes have diff. args
Original file line number Diff line number Diff line change 2626 Type ,
2727 Union ,
2828 cast ,
29- get_args ,
3029 overload ,
3130)
3231
You can’t perform that action at this time.
0 commit comments