MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / getApp

Function getApp

packages/ai/src/narrative.ts:50–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48
49let _app: ReturnType<typeof betterAgent> | null = null;
50function getApp() {
51 if (_app) return _app;
52 const agent = defineAgent({
53 name: 'weekly-narrative',
54 description: 'Writes a weekly digest intro paragraph (one-shot).',
55 model: narrativeModel(),
56 contextSchema: z.object({}),
57 outputSchema: {
58 schema: narrativeOutputJsonSchema,
59 name: 'weekly_narrative',
60 strict: true,
61 },
62 instruction: () => INSTRUCTION,
63 tools: () => [],
64 maxSteps: 1,
65 // biome-ignore lint/suspicious/noExplicitAny: same dodge as enrich.ts
66 } as any);
67 _app = betterAgent({ agents: [agent] });
68 return _app;
69}
70
71export async function generateWeeklyNarrative(
72 input: WeeklyNarrativeInput,

Callers 1

generateWeeklyNarrativeFunction · 0.70

Calls 1

narrativeModelFunction · 0.85

Tested by

no test coverage detected