UNPKG

llm-mock

Version:

Enterprise-grade LLM mock server for local and CI: scenarios, faults, latency, contracts, VCR. Supports standalone server and Express middleware.

12 lines (9 loc) 283 B
import { v4 as uuidv4 } from "uuid"; export function log(evt, data = {}) { console.log(JSON.stringify({ t: new Date().toISOString(), evt, ...data })); } export function withReqId(req, res, next) { req._reqId = uuidv4(); res.setHeader("x-request-id", req._reqId); next(); }