MCPcopy Create free account
hub / github.com/Superflows-AI/superflows / processAPIoutput

Function processAPIoutput

supabase/functions/execute-code-2/requests.ts:16–27  ·  view source on GitHub ↗
(
  out: Json | Json[],
  chosenAction: Action,
)

Source from the content-addressed store, hash-verified

14import { Action, ActionPlusApiInfo, Header, Json } from "./types.ts";
15
16export function processAPIoutput(
17 out: Json | Json[],
18 chosenAction: Action,
19): Json | Json[] {
20 const keys = chosenAction.keys_to_keep;
21 if (keys && Array.isArray(keys) && keys.every((k) => typeof k === "string")) {
22 console.info("Filtering to keep keys:", keys);
23 out = filterKeys(out, keys as string[]);
24 }
25
26 return out;
27}
28
29function forgeLogMessage(url: string, requestOptions: RequestInit) {
30 return `Attempting fetch with url: ${url}\n\nWith options:${JSON.stringify(

Callers 1

index.tsFile · 0.90

Calls 1

filterKeysFunction · 0.90

Tested by

no test coverage detected