(req: NextRequest)
| 3 | import pipeWithTools from '../../../../../baseai/pipes/pipe-with-tool'; |
| 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(pipeWithTools()); |
| 10 | |
| 11 | // 2. Run the pipe with user messages and other run options. |
| 12 | let result = await pipe.run(runOptions); |
| 13 | |
| 14 | // 2. Return the response stringified. |
| 15 | return new Response(JSON.stringify(result)); |
| 16 | } |
nothing calls this directly
no test coverage detected