UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

18 lines (17 loc) • 572 B
import { i as sha256StableValue, n as sha256Hex } from "./node-crypto-BInnzoVt.mjs"; import { serializeModelRequestBody } from "@openclaw/ai/internal/openai"; //#region src/agents/embedded-agent-runner/provider-prompt-serialization.ts function prepareProviderPrompt({ payload, encode }) { if (!encode) return { ...sha256StableValue(payload), encoded: void 0 }; const encoded = serializeModelRequestBody(payload); return { digest: sha256Hex(encoded.body), byteWeight: encoded.body.byteLength, encoded }; } //#endregion export { prepareProviderPrompt as t };