Function
sseChunk
(delta: Record<string, unknown>, finish: string | null)
Source from the content-addressed store, hash-verified
| 78 | }; |
| 79 | |
| 80 | const sseChunk = (delta: Record<string, unknown>, finish: string | null) => |
| 81 | `data: ${JSON.stringify({ |
| 82 | id: "chatcmpl-replay", |
| 83 | object: "chat.completion.chunk", |
| 84 | created: 0, |
| 85 | model: "replay-model", |
| 86 | choices: [{ index: 0, delta, finish_reason: finish }], |
| 87 | })}\n\n`; |
| 88 | |
| 89 | /** |
| 90 | * Serve a scripted brain for the lifetime of the surrounding scope. |
Tested by
no test coverage detected