Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,17 @@
from agent_control_models import Step
from galileo_core.schemas.logging.session import Session
from galileo_core.schemas.logging.span import (
AgentSpan,
ControlSpan,
LlmSpan,
RetrieverSpan,
Span,
ToolSpan,
WorkflowSpan,
)
from galileo_core.schemas.logging.trace import Trace

from .normalization import GalileoRecordNormalizer

type GalileoRecord = LlmSpan | ToolSpan | RetrieverSpan | Trace | Session
type GalileoSpan = LlmSpan | ToolSpan | RetrieverSpan
type GalileoCoreSpan = AgentSpan | WorkflowSpan | LlmSpan | RetrieverSpan | ToolSpan | ControlSpan
_MISSING = object()
_SPAN_TYPES = {"llm", "tool", "retriever"}
_RECORD_TYPES = _SPAN_TYPES | {"trace", "session"}
Expand Down Expand Up @@ -54,8 +51,8 @@ def _selected_values(
return selected_data, None


def _span_children(children: list[GalileoRecord], *, parent_type: str) -> list[GalileoCoreSpan]:
spans: list[GalileoCoreSpan] = []
def _span_children(children: list[GalileoRecord], *, parent_type: str) -> list[Span]:
spans: list[Span] = []
for child in children:
if not isinstance(child, (LlmSpan, ToolSpan, RetrieverSpan)):
raise RecordFactoryError(f"Galileo {parent_type} children must be span steps.")
Expand Down
Loading