UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

10 lines (9 loc) 300 B
/** Truncates a prompt cache key by Unicode code point count. */ function clampOpenAIPromptCacheKey(key) { if (key === void 0) return; const chars = Array.from(key); if (chars.length <= 64) return key; return chars.slice(0, 64).join(""); } //#endregion export { clampOpenAIPromptCacheKey as t };