Class: InMemoryCache<T>
cache.InMemoryCache
Type parameters
| Name | Type | 
|---|---|
T | Generation[] | 
Hierarchy
BaseCache<T>↳
InMemoryCache
Constructors
constructor
• new InMemoryCache<T>(map?)
Type parameters
| Name | Type | 
|---|---|
T | Generation[] | 
Parameters
| Name | Type | 
|---|---|
map? | Map<string, T> | 
Overrides
Defined in
langchain/src/cache.ts:28
Methods
lookup
▸ lookup(prompt, llmKey): Promise<null | T>
Parameters
| Name | Type | 
|---|---|
prompt | string | 
llmKey | string | 
Returns
Promise<null | T>
Overrides
Defined in
langchain/src/cache.ts:33
update
▸ update(prompt, llmKey, value): Promise<void>
Parameters
| Name | Type | 
|---|---|
prompt | string | 
llmKey | string | 
value | T | 
Returns
Promise<void>
Overrides
Defined in
langchain/src/cache.ts:37
global
▸ Static global(): InMemoryCache<Generation[]>
Returns
Defined in
langchain/src/cache.ts:41