createMemory
Create a Memory instance
Either initial messages or options
Memory configuration options (when first param is messages)
Call Signature
Section titled “Call Signature”createMemory<
TMessageOptions
>():Memory
<Record
<string
,never
>,TMessageOptions
>
Defined in: .build/typescript/packages/core/src/memory/factories.ts:22
Create a Memory instance with default options
Type Parameters
Section titled “Type Parameters”TMessageOptions
Section titled “TMessageOptions”TMessageOptions
extends object
= object
Returns
Section titled “Returns”Memory
<Record
<string
, never
>, TMessageOptions
>
A new Memory instance with default configuration
Call Signature
Section titled “Call Signature”createMemory<
TMessageOptions
>(options
):Memory
<Record
<string
,never
>,TMessageOptions
>
Defined in: .build/typescript/packages/core/src/memory/factories.ts:32
Create a Memory instance with options only
Type Parameters
Section titled “Type Parameters”TMessageOptions
Section titled “TMessageOptions”TMessageOptions
extends object
= object
Parameters
Section titled “Parameters”options
Section titled “options”MemoryOptions
<TMessageOptions
>
Memory configuration options
Returns
Section titled “Returns”Memory
<Record
<string
, never
>, TMessageOptions
>
A new Memory instance
Call Signature
Section titled “Call Signature”createMemory<
TMessageOptions
>(messages
,options?
):Memory
<Record
<string
,never
>,TMessageOptions
>
Defined in: .build/typescript/packages/core/src/memory/factories.ts:42
Create a Memory instance with ChatMessage array (IDs will be generated)
Type Parameters
Section titled “Type Parameters”TMessageOptions
Section titled “TMessageOptions”TMessageOptions
extends object
= object
Parameters
Section titled “Parameters”messages
Section titled “messages”ChatMessage
<TMessageOptions
>[]
Initial ChatMessage array for the memory
options?
Section titled “options?”MemoryOptions
<TMessageOptions
>
Memory configuration options
Returns
Section titled “Returns”Memory
<Record
<string
, never
>, TMessageOptions
>
A new Memory instance
Call Signature
Section titled “Call Signature”createMemory<
TMessageOptions
>(messages
,options
):Memory
<Record
<string
,never
>,TMessageOptions
>
Defined in: .build/typescript/packages/core/src/memory/factories.ts:53
Create a Memory instance with MemoryMessage array and options
Type Parameters
Section titled “Type Parameters”TMessageOptions
Section titled “TMessageOptions”TMessageOptions
extends object
= object
Parameters
Section titled “Parameters”messages
Section titled “messages”MemoryMessage
<TMessageOptions
>[]
Initial MemoryMessage array for the memory
options
Section titled “options”MemoryOptions
<TMessageOptions
>
Memory configuration options
Returns
Section titled “Returns”Memory
<Record
<string
, never
>, TMessageOptions
>
A new Memory instance