Interface: ModelArgs<MClient, MConfig, MRun, MResponse>
Type parameters
| Parameter | 
|---|
| MClientextendsClient | 
| MConfigextendsConfig | 
| MRunextendsRun | 
| MResponseextendsResponse | 
Properties
| Property | Type | Description | Source | 
|---|---|---|---|
| cache? | CacheStorage<string,MResponse> | Enables caching for model responses. Must implement .get(key)and.set(key, value), both of which can be either sync or async.Some examples include: new Map(), quick-lru (opens in a new tab), or any keyv adaptor (opens in a new tab). | src/model/model.ts:29 (opens in a new tab) | 
| cacheKey? | CacheKey<MRun&MConfig,string> | A function that returns a cache key for the given params. A simple example would be: (params) => JSON.stringify(params)The default cacheKeyfunction uses hash-object (opens in a new tab) to create a stable sha256 hash of the params. | src/model/model.ts:23 (opens in a new tab) | 
| client | MClient | - | src/model/model.ts:30 (opens in a new tab) | 
| context? | Ctx | - | src/model/model.ts:31 (opens in a new tab) | 
| debug? | boolean | Whether or not to add default console.logevent handlers | src/model/model.ts:35 (opens in a new tab) | 
| events? | Events<MRun&MConfig,MResponse,any> | - | src/model/model.ts:33 (opens in a new tab) | 
| params | MConfig&Partial<MRun> | - | src/model/model.ts:32 (opens in a new tab) |