diff --git a/open-sse/utils/streamEmptyChoices.ts b/open-sse/utils/streamEmptyChoices.ts index 20d2ec50e6..05f8d8e4b9 100644 --- a/open-sse/utils/streamEmptyChoices.ts +++ b/open-sse/utils/streamEmptyChoices.ts @@ -20,8 +20,15 @@ import { buildErrorBody } from "./error.ts"; import { buildStreamSummaryFromEvents } from "./streamPayloadCollector.ts"; +type StructuredSSEEventLike = { + index: number; + timestamp?: string; + event?: string; + data: unknown; +}; + type StructuredSSECollectorLike = { - getEvents: () => unknown[]; + getEvents: () => StructuredSSEEventLike[]; build: (summary?: unknown, opts?: { includeEvents?: boolean }) => unknown; };