UNPKG

@earendil-works/pi-ai

Version:

Unified LLM API with automatic model discovery and provider configuration

10 lines • 392 B
export const OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH = 64; export function clampOpenAIPromptCacheKey(key) { if (key === undefined) return undefined; const chars = Array.from(key); if (chars.length <= OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH) return key; return chars.slice(0, OPENAI_PROMPT_CACHE_KEY_MAX_LENGTH).join(""); } //# sourceMappingURL=openai-prompt-cache.js.map