mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-23 15:55:11 +00:00
Remove stream frame version field
This commit is contained in:
@@ -31,7 +31,6 @@ StreamChannel = Literal[
|
||||
class StreamFrame(BaseModel):
|
||||
"""Stable public stream frame emitted by streamable runtimes."""
|
||||
|
||||
version: Literal["v1"] = "v1"
|
||||
id: str = Field(description="Unique frame/event identifier")
|
||||
seq: int | None = Field(default=None, description="Execution-local order")
|
||||
type: str = Field(description="Source event type")
|
||||
|
||||
@@ -218,7 +218,6 @@ def stream_frame_from_event(event: BaseEvent) -> StreamFrame:
|
||||
if not isinstance(data, dict):
|
||||
data = {"value": data}
|
||||
return StreamFrame(
|
||||
version="v1",
|
||||
id=event.event_id,
|
||||
seq=event.emission_sequence,
|
||||
type=event.type,
|
||||
|
||||
@@ -95,7 +95,6 @@ def test_stream_frame_contract_and_ordering() -> None:
|
||||
|
||||
assert stream.result == "done"
|
||||
assert all(isinstance(frame, StreamFrame) for frame in frames)
|
||||
assert all(frame.version == "v1" for frame in frames)
|
||||
assert [frame.seq for frame in frames] == sorted(frame.seq for frame in frames)
|
||||
|
||||
by_type = {frame.type: frame for frame in frames}
|
||||
|
||||
Reference in New Issue
Block a user