MCPcopy Create free account
hub / github.com/CaviraOSS/OpenReason / runWithConfig

Function runWithConfig

examples/code/custom-config-example.ts:9–14  ·  view source on GitHub ↗
(label: string, config: T, query: string)

Source from the content-addressed store, hash-verified

7}
8
9async function runWithConfig<T extends Parameters<typeof openreason.init>[0]>(label: string, config: T, query: string) {
10 console.log(`\n=== ${label} ===`);
11 openreason.init(config);
12 const result = await openreason.reason(query);
13 console.log({ verdict: result.verdict, confidence: result.confidence, mode: result.mode, latency: result.latency });
14}
15
16async function customConfigExamples() {
17 await runWithConfig(

Callers 1

customConfigExamplesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected