Skip to navigation

Electron latency guide and `prompt_cache_key`

Electron chat completions accept prompt_cache_key, a string that groups the requests of one conversation so every turn reuses the cache. Create one key per conversation, send it on every turn, and never share it between conversations.

What changed

  • New Optimizing Latency guide: one prompt_cache_key per conversation, static content first, append-only history, streaming, and one reused client.
  • prompt_cache_key added to the chat completions API reference and the Supported Parameters page.
  • Prefix Caching and Best Practices link to the new guide.

→ Optimizing Latency