MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / POST

Function POST

examples/nextjs/app/api/langbase/pipes/run-tool/route.ts:5–16  ·  view source on GitHub ↗
(req: NextRequest)

Source from the content-addressed store, hash-verified

3import pipeWithTools from '../../../../../baseai/pipes/pipe-with-tool';
4
5export 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}

Callers

nothing calls this directly

Calls 2

runMethod · 0.95
pipeWithToolsFunction · 0.85

Tested by

no test coverage detected