UNPKG

@traceprompt/node

Version:

Client-side encrypted, audit-ready logging for LLM applications

18 lines (14 loc) 415 B
import { QueueItem } from "../types"; import { ConfigManager } from "../config"; import { Transport } from "../network/transport"; export async function flushBatch(batch: QueueItem[]): Promise<void> { const { orgId } = ConfigManager.cfg; const body = { orgId, records: batch.map(({ payload, leafHash }) => ({ payload, leafHash, })), }; await Transport.post("/v1/ingest", body); }