Optional
map: Map<string, T>Retrieves data from the cache using a prompt and an LLM key. If the data is not found, it returns null.
The prompt used to find the data.
The LLM key used to find the data.
The data corresponding to the prompt and LLM key, or null if not found.
Static
globalReturns a global instance of InMemoryCache using a predefined global map as the initial cache.
A global instance of InMemoryCache.
Generated using TypeDoc
A cache for storing LLM generations that stores data in memory.