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

Function action

examples/remix/app/routes/api.langbase.pipes.run.ts:5–17  ·  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
8 // 1. Initiate the Pipe.
9 // const pipe = new Pipe(getPipeTinyLlama());
10 const pipe = new Pipe(getPipeSummary());
11
12 // 2. Run the pipe
13 const result = await pipe.run(runOptions);
14
15 // 3. Return the response stringified.
16 return new Response(JSON.stringify(result));
17};

Callers

nothing calls this directly

Calls 2

runMethod · 0.95
getPipeSummaryFunction · 0.85

Tested by

no test coverage detected