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

Function preamble

lib/v2/edge-runtime/ai.ts:879–896  ·  view source on GitHub ↗
(
  controller: ReadableStreamDefaultController,
  conversationId: number,
)

Source from the content-addressed store, hash-verified

877}
878
879export async function preamble(
880 controller: ReadableStreamDefaultController,
881 conversationId: number,
882) {
883 const encoder = new TextEncoder();
884
885 return function streamInfo(step: StreamingStepInput) {
886 controller.enqueue(
887 encoder.encode(
888 "data: " +
889 JSON.stringify({
890 id: conversationId,
891 ...step,
892 }),
893 ),
894 );
895 };
896}
897
898async function runCodeGen(
899 userRequest: string,

Callers 2

matchQuestionToAnswerFunction · 0.90
BertieFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected