(req: NextRequest)
| 3 | import pipeWithMemory from '../../../../../baseai/pipes/pipe-with-memory'; |
| 4 | |
| 5 | export async function POST(req: NextRequest) { |
| 6 | const runOptions = await req.json(); |
| 7 | |
| 8 | // 1. Initiate the Pipe. |
| 9 | const pipe = new Pipe(pipeWithMemory()); |
| 10 | |
| 11 | // 2. Run the pipe with user messages and other run options. |
| 12 | const {stream} = await pipe.run(runOptions); |
| 13 | |
| 14 | // 3. Return the ReadableStream directly. |
| 15 | return new Response(stream, { |
| 16 | status: 200, |
| 17 | }); |
| 18 | } |
nothing calls this directly
no test coverage detected