MCPcopy
hub / github.com/thesysdev/openui / buildSystemPrompt

Function buildSystemPrompt

examples/openui-dashboard/src/app/api/chat/route.ts:14–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12} as const;
13
14function buildSystemPrompt(): string {
15 return generatePrompt({
16 ...promptSpec,
17 tools: toolDefs.map((t) => t.toToolSpec()),
18 });
19}
20
21export async function POST(req: NextRequest) {
22 const { messages } = (await req.json()) as { messages: ChatCompletionMessageParam[] };

Callers 1

POSTFunction · 0.85

Calls 2

generatePromptFunction · 0.90
toToolSpecMethod · 0.80

Tested by

no test coverage detected