(ms)
| 20 | const enc = new TextEncoder(); |
| 21 | const sse = (parts) => new ReadableStream({ start(c) { for (const p of parts) c.enqueue(enc.encode(p)); c.close(); } }); |
| 22 | const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); |
| 23 | |
| 24 | let lastReqPath = null; |
| 25 | function mockOpenAI(reqPath, body) { |