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

Function action

examples/remix/app/routes/api.langbase.pipes.run-tool.ts:5–16  ·  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(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};

Callers

nothing calls this directly

Calls 2

runMethod · 0.95
getPipeWithToolFunction · 0.50

Tested by

no test coverage detected