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

Function POST

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

runMethod · 0.95
pipeWithMemoryFunction · 0.85

Tested by

no test coverage detected