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