({request})
| 3 | import {Pipe} from '@baseai/core'; |
| 4 | |
| 5 | export const action: ActionFunction = async ({request}) => { |
| 6 | const runOptions = await request.json(); |
| 7 | |
| 8 | // 1. Initiate the Pipe. |
| 9 | const pipe = new Pipe(getPipeWithTool()); |
| 10 | |
| 11 | // 2. Run the pipe with user messages and other run options. |
| 12 | const 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