I have a question.
Let’s say we have different projects. Different projects have different input prompts.
For the best practice, should we use different API keys for different projects regarding caching inputs and boosting caching efficiency? Or does it not matter? Any idea?
Hi!
Using specific API keys is not a requirement for prompt caching.
OpenAI routes API requests to servers that recently processed the same prompt
I’m sure you have seen it already, but here is the link to the relevant docs.
Echoing what @vb shared, it’s not required to use use the same API key for hitting caches because they are enforced at organization level.
I’m not asking for requirement. I’m asking for efficiency. The link you sent me says that “put the stable prompts first, and dynamic prompts that changes in each API request at the end”
My question is, if I work on 2 different projects using same API, that means 2 different bulk of prompts. If this projects work at the same time, my requests will always have 2 different prompt set which will cause inefficiency in respect of caching.
So, would using 2 different API key solve this problem? Or should I use 2 different Open AI API account for each and every project to take the adventage of caching?
I hope I was able to make it clearer. I’m sorry if my question is still too complicated
I think you are overthinking this.
In short: you can have several prompts cached until they expire.
You can always run a simple test with two prompts using the same API key. Just make sure to meet the minimum requirements for caching.