Add explicit LLM stream lifecycle events (#26722)

This commit is contained in:
Kit Langton
2026-05-10 12:19:13 -04:00
committed by GitHub
parent 3b8790e034
commit ce061bf661
16 changed files with 201 additions and 126 deletions
+3 -1
View File
@@ -50,7 +50,9 @@ const request = LLM.request({
})
const raiseEvent = (event: FakeEvent): import("../src/schema").LLMEvent =>
event.type === "finish" ? { type: "request-finish", reason: event.reason } : { type: "text-delta", text: event.text }
event.type === "finish"
? { type: "request-finish", reason: event.reason }
: { type: "text-delta", id: "text-0", text: event.text }
const fakeProtocol = Protocol.make<FakeBody, FakeEvent, FakeEvent, void>({
id: "fake",