@manta-eu/client/shared/memory-decay
Reference for @manta-eu/client/shared/memory-decay as it is on main.
Type Aliases
MemoryDecayCandidate
MemoryDecayCandidate =
object
Properties
memoryCiteCount?
optionalmemoryCiteCount?:number|null
memoryLastUsedAt?
optionalmemoryLastUsedAt?:Date|string|null
memoryUseCount?
optionalmemoryUseCount?:number|null
scope?
optionalscope?:string|null
UseWeights
UseWeights =
object
Properties
cited?
optionalcited?:number
preloaded?
optionalpreloaded?:number
Variables
citedUseWeight
constcitedUseWeight:0=0
decayDemotionThreshold
constdecayDemotionThreshold:0.5=0.5
decayHalfLifeDays
constdecayHalfLifeDays:7=7
decayHoldOutDays
constdecayHoldOutDays:30=30
decayUseCountCap
constdecayUseCountCap:20=20
personalMemoryScope
constpersonalMemoryScope:"user"="user"
preloadedUseWeight
constpreloadedUseWeight:1=1
Functions
coldOnsetDays()
coldOnsetDays(
useCount):number
Parameters
useCount
number
Returns
number
shouldDemoteOnUsage()
shouldDemoteOnUsage(
memory,now?,weights?):boolean
Parameters
memory
now?
Date = ...
weights?
Returns
boolean
usageWeight()
usageWeight(
useCount,lastUsedAt,now?):number
Parameters
useCount
number | null | undefined
lastUsedAt
string | Date | null | undefined
now?
Date = ...
Returns
number
weightedUseCount()
weightedUseCount(
memory,weights?):number
Parameters
memory
weights?
Returns
number