MCPcopy Create free account
hub / github.com/cortexkit/magic-context / main

Function main

tests/docker/fixtures/aimock-pi.cjs:15–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13const port = parseInt(process.env.AIMOCK_PORT || "4010", 10);
14
15async function main() {
16 const mock = new LLMock({ port });
17
18 // Catch-all fixture: respond to any chat-completion request with a
19 // short text reply. Predicate returns true unconditionally so we
20 // don't depend on sequenceIndex bookkeeping.
21 mock.on(
22 { predicate: () => true },
23 {
24 content: "hello",
25 },
26 );
27
28 await mock.start();
29 console.log(`aimock-pi listening on http://127.0.0.1:${port}`);
30}
31
32main().catch((err) => {
33 console.error("aimock-pi failed to start:", err);

Callers 1

aimock-pi.cjsFile · 0.70

Calls 1

startMethod · 0.65

Tested by

no test coverage detected