Skip to Content
Anuma SDKReactInternalInterfacesInjectionClassifierOptions

InjectionClassifierOptions

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

Auth + tuning for the optional LLM injection classifier. Auth is the dual pattern — one of apiKey / getToken is required at runtime (see PortalLlmAuth). The mere PRESENCE of this options object in extractAndRetain is the opt-in switch; omit it for the default-off, deterministic-only screen.

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/injectionClassifier.ts:50 

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

Parameters

ParameterType

attempt

number

Returns

number


baseUrl?

optional baseUrl: string

Defined in: src/lib/memory/injectionClassifier.ts:41 


fetchFn()?

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

Defined in: src/lib/memory/injectionClassifier.ts:44 

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>


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/injectionClassifier.ts:46 

Max portal attempts on a TRANSIENT failure. Default 2.


maxCandidates?

optional maxCandidates: number

Defined in: src/lib/memory/injectionClassifier.ts:59 

Max candidates classified per call. Default 20.


model?

optional model: string

Defined in: src/lib/memory/injectionClassifier.ts:42 


piiRedaction?

optional piiRedaction: boolean | PiiRedactor

Defined in: src/lib/memory/injectionClassifier.ts:57 

PII redaction for the outbound content, same switch as the extractor. extractAndRetain inherits the extraction setting so enabling redaction there also protects this call. true = fresh per-call redactor; pass a shared PiiRedactor to keep placeholder numbering consistent.


totalTimeoutMs?

optional totalTimeoutMs: number

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

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

Last updated on