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

Function action

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

Source from the content-addressed store, hash-verified

3import {ActionFunction} from '@remix-run/node';
4
5export const action: ActionFunction = async ({request}) => {
6 const runOptions = await request.json();
7
8 // 1. Initiate the Pipe.
9 const pipe = new Pipe(getPipeSummary());
10
11 // 2. Run the Pipe.
12 const {stream, threadId} = await pipe.run(runOptions);
13
14 // 3. Return the ReadableStream directly.
15 return new Response(stream, {
16 status: 200,
17 headers: {
18 'lb-thread-id': threadId ?? '',
19 },
20 });
21};

Callers

nothing calls this directly

Calls 2

runMethod · 0.95
getPipeSummaryFunction · 0.85

Tested by

no test coverage detected