TopicExtractOptions
Defined in: src/lib/memory/topicExtract.ts:70
Options for the topic-extraction LLM call. Auth follows the portal dual
pattern — one of apiKey / getToken is required (see PortalLlmAuth).
Extends
Properties
apiKey?
optionalapiKey: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
backoffMs()?
optionalbackoffMs: (attempt:number) =>number
Defined in: src/lib/memory/topicExtract.ts:92
Parameters
| Parameter | Type |
|---|---|
|
|
|
Returns
number
baseUrl?
optionalbaseUrl:string
Defined in: src/lib/memory/topicExtract.ts:72
endpointOverride?
optionalendpointOverride:string
Defined in: src/lib/memory/topicExtract.ts:83
Optional per-call request path override, forwarded to
callPortalJsonCompletion. When set, topic extraction POSTs to
baseUrl + endpointOverride instead of the default
/api/v1/chat/completions. The body follows the transport, not the path: a
model that needs the Responses API is moved from a .../chat/completions
override to its sibling .../responses with a Responses-shaped body. Lets callers route
this internal-utility pass to a dedicated endpoint. Invalid values throw at
call time (see validateEndpointOverride).
existingEntityNames?
optionalexistingEntityNames: readonlystring[]
Defined in: src/lib/memory/topicExtract.ts:100
The user’s existing entity vocabulary (canonical names). Included in the prompt so independent batches reuse canonical names instead of fragmenting (“ZetaChain” / “Zetachain” / “zeta chain” as three graph nodes). Truncated to the first MAX_VOCABULARY_NAMES names — pass the most-linked names first.
fetchFn()?
optionalfetchFn: {(input:RequestInfo|URL,init?:RequestInit):Promise<Response>; (input:string|Request|URL,init?:RequestInit):Promise<Response>; }
Defined in: src/lib/memory/topicExtract.ts:88
Override the global fetch implementation (useful for tests).
Call Signature
(
input:RequestInfo|URL,init?:RequestInit):Promise<Response>
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Promise<Response>
Call Signature
(
input:string|Request|URL,init?:RequestInit):Promise<Response>
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Promise<Response>
getToken()?
optionalgetToken: () =>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
maxAttempts?
optionalmaxAttempts:number
Defined in: src/lib/memory/topicExtract.ts:89
model?
optionalmodel:string
Defined in: src/lib/memory/topicExtract.ts:86
Defaults to DEFAULT_EXTRACTION_MODEL — the sanctioned extraction model. Don’t point this at a second model without an eval.
onBatch()?
optionalonBatch: (diagnostics:TopicExtractionBatchDiagnostics) =>void
Defined in: src/lib/memory/topicExtract.ts:71
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
void
piiRedaction?
optionalpiiRedaction:boolean|PiiRedactor
Defined in: src/lib/memory/topicExtract.ts:108
When set, PII in memory contents is replaced with tagged placeholders
before the LLM call and returned entity names are de-anonymized (entities
whose placeholders can’t be restored are dropped) — mirrors
ExtractFactsOptions.piiRedaction. Vault contents hold REAL values, so
callers that redact the conversation pipeline must redact this pass too.
timeoutMs?
optionaltimeoutMs:number
Defined in: src/lib/memory/topicExtract.ts:90
totalTimeoutMs?
optionaltotalTimeoutMs:number
Defined in: src/lib/memory/topicExtract.ts:91