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

Function action

examples/remix/app/routes/api.langbase.pipes.run-memory.ts:5–19  ·  view source on GitHub ↗
({request})

Source from the content-addressed store, hash-verified

3import {Pipe} from '@baseai/core';
4
5export const action: ActionFunction = async ({request}) => {
6 const runOptions = await request.json();
7 console.log('runOptions:', runOptions);
8
9 // 1. Initiate the Pipe.
10 const pipe = new Pipe(getPipeWithMemory());
11
12 // 2. Run the pipe with user messages and other run options.
13 const {stream} = await pipe.run(runOptions);
14
15 // 3. Return the ReadableStream directly.
16 return new Response(stream, {
17 status: 200,
18 });
19};

Callers

nothing calls this directly

Calls 2

runMethod · 0.95
logMethod · 0.80

Tested by

no test coverage detected