what is prompt_cache_key parameter ?
# ask-ai
c
what is prompt_cache_key parameter ?
t
Thanks for reaching out, Antoine. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! The
prompt_cache_key
parameter is an optional string used in LiveKit's Large Language Model (LLM) integrations, like OpenAI, Baseten, and Groq. It gets passed straight to the LLM provider's API during chat completion, and it’s probably designed to help with prompt caching. This means it could let the system reuse previous computations for the same or similar prompts, which might boost performance and keep things consistent. That said, how it actually works depends on the specific LLM provider, and the docs don’t clearly confirm this. So, if you’re thinking of using this parameter, it’s a good idea to double-check that your chosen LLM provider supports and makes good use of it. Sources: livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/stt.py | common/arg.cpp