Skip to Content
Anuma SDKReactInternalInterfacesSynthesizeProfileOptions

SynthesizeProfileOptions

Defined in: src/lib/memory/synthesizeProfile.ts:267 

Options for synthesizeProfile. Auth is the dual PortalLlmAuth pattern — one of apiKey / getToken is required at runtime.

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


baseUrl?

optional baseUrl: string

Defined in: src/lib/memory/synthesizeProfile.ts:275 

LLM endpoint override.


facets?

optional facets: ProfileFacet[]

Defined in: src/lib/memory/synthesizeProfile.ts:269 

Facets to synthesize. Defaults to DEFAULT_PROFILE_FACETS.


factTypeWeights?

optional factTypeWeights: Partial<Record<"other" | "identity" | "preference" | "relationship" | "plan" | "ongoing_context" | "constraint" | "instruction", number>>

Defined in: src/lib/memory/synthesizeProfile.ts:292 

Per-FactType score multipliers for facet recall. Default: DEFAULT_PROFILE_FACT_TYPE_WEIGHTS (durable types boosted). Does not change global chat recall() defaults.


fetchFn()?

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

Defined in: src/lib/memory/synthesizeProfile.ts:281 

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


limit?

optional limit: number

Defined in: src/lib/memory/synthesizeProfile.ts:279 

Facts recalled per facet before synthesis. Default: 20.


llmModel?

optional llmModel: string

Defined in: src/lib/memory/synthesizeProfile.ts:273 

Synthesis model. Default: open-weights ling-2.6-flash.


previous?

optional previous: ProfileDoc

Defined in: src/lib/memory/synthesizeProfile.ts:271 

Prior doc for delta refresh. Unchanged sections are reused verbatim.


proofCountAlpha?

optional proofCountAlpha: number

Defined in: src/lib/memory/synthesizeProfile.ts:297 

Proof-count α for facet recall. Default: DEFAULT_PROFILE_PROOF_ALPHA (0.2). Chat recall stays at 0.1.


redactor?

optional redactor: PiiRedactor

Defined in: src/lib/memory/synthesizeProfile.ts:286 

Pre-publish PII gate. When supplied, each section’s text is run through PiiRedactor.redactTextAsync (regex + NER) before it’s returned. Omit only when the caller redacts downstream — nearby also moderates server-side, but the client should never publish un-gated text.


reviewedMemoryIds?

optional reviewedMemoryIds: readonly string[]

Defined in: src/lib/memory/synthesizeProfile.ts:314 

Publish-review gate: when SUPPLIED, each facet’s recalled evidence is intersected with this id set before the LLM runs, so synthesis can only draw on memories the user approved for publication. Empty intersection → empty section (legitimate no-evidence), not a stale fallback.

Pass the user’s published set (e.g. getAllVaultMemoriesOp(ctx, { levels: ["matching", "profile"] })) to keep a published profile derivable only from published memories — People Nearby’s two-tier model treats private memories as never leaving the device, and a summary derived from them is a derivative that does.

[] means “nothing approved” and gates everything OUT (no recall, no LLM call, empty sections). Omitting the field is the only way to run ungated — that asymmetry is deliberate, so a caller computing a published set can never accidentally disable the gate by finding it empty.


scopes?

optional scopes: string[]

Defined in: src/lib/memory/synthesizeProfile.ts:277 

Scopes to draw facts from. Default: [“private”].


store?

optional store: Pick<MemoryStore, "list" | "listProjections" | "factSource">

Defined in: src/lib/memory/synthesizeProfile.ts:320 

Read facts and recall through this store instead of ctx.vaultCtx and ctx.vaultCache, so a remote store works. Only ctx.embeddingOptions is then read from ctx.

Last updated on