Skip to Content
Anuma SDKReactInternalInterfacesLlmDecayClassifierOptions

LlmDecayClassifierOptions

Defined in: src/lib/memory/decayClassifier.ts:30 

Auth + wiring for createLlmDecayClassifier. Auth is the dual pattern — one of apiKey / getToken is required at runtime (see PortalLlmAuth).

Extends

Properties

apiKey?

optional apiKey: string

Defined in: src/lib/memory/portalLlm.ts:72 

Direct API key — sent as x-api-key (server-side / CLI usage). Wins when both are provided.

Inherited from

PortalLlmAuth.apiKey


backoffMs()?

optional backoffMs: (attempt: number) => number

Defined in: src/lib/memory/decayClassifier.ts:40 

Backoff before each retry (ms). Tests pass () => 0.

Parameters

ParameterType

attempt

number

Returns

number


baseUrl?

optional baseUrl: string

Defined in: src/lib/memory/decayClassifier.ts:31 


fetchFn()?

optional fetchFn: {(input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | Request | URL, init?: RequestInit): Promise<Response>; }

Defined in: src/lib/memory/decayClassifier.ts:34 

Override fetch (tests).

Call Signature

(input: RequestInfo | URL, init?: RequestInit): Promise<Response>

MDN Reference 

Parameters

ParameterType

input

RequestInfo | URL

init?

RequestInit

Returns

Promise<Response>

Call Signature

(input: string | Request | URL, init?: RequestInit): Promise<Response>

MDN Reference 

Parameters

ParameterType

input

string | Request | URL

init?

RequestInit

Returns

Promise<Response>


getContent()

getContent: (id: string) => Promise<string | null>

Defined in: src/lib/memory/decayClassifier.ts:55 

Resolve a memory’s DECRYPTED content by id. The caller supplies this and MUST gate it on wallet-key availability — return null when no key is loaded so the classifier degrades to the rule verdict (zero-knowledge). A throw is treated the same as null (fail to the rule verdict).

Parameters

ParameterType

id

string

Returns

Promise<string | null>


getToken()?

optional getToken: () => Promise<string | null>

Defined in: src/lib/memory/portalLlm.ts:74 

Function to get an auth token (e.g., Privy’s getIdentityToken). Token is sent as Authorization: Bearer.

Returns

Promise<string | null>

Inherited from

PortalLlmAuth.getToken


maxAttempts?

optional maxAttempts: number

Defined in: src/lib/memory/decayClassifier.ts:36 

Max portal attempts on a TRANSIENT failure. Default 2.


model?

optional model: string

Defined in: src/lib/memory/decayClassifier.ts:32 


piiRedaction?

optional piiRedaction: boolean | PiiRedactor

Defined in: src/lib/memory/decayClassifier.ts:48 

PII redaction for the outbound content. OPT-OUT: defaults to ON (a fresh per-call redactor) when omitted, so decrypted content is never egressed raw by accident. Pass a shared PiiRedactor to keep placeholder numbering consistent with other calls, or false to deliberately disable redaction. The verdict returned is a bare enum — nothing to de-anonymize.


totalTimeoutMs?

optional totalTimeoutMs: number

Defined in: src/lib/memory/decayClassifier.ts:38 

Absolute wall-clock budget across attempts. Default 12s.

Last updated on