(chunks: unknown[])
| 82 | ) |
| 83 | |
| 84 | function responsesStream(chunks: unknown[]) { |
| 85 | return new Response(chunks.map((chunk) => `data: ${JSON.stringify(chunk)}`).join("\n\n") + "\n\n", { |
| 86 | status: 200, |
| 87 | headers: { "Content-Type": "text/event-stream" }, |
| 88 | }) |
| 89 | } |
| 90 | |
| 91 | type NativeRequestInput = Parameters<typeof LLMNative.request>[0] |
| 92 |