unified-llm-client
Preparing search index...
InMemorySessionStore
Class InMemorySessionStore<TSnapshot>
Simple in-process store intended for tests and single-process development.
Type Parameters
TSnapshot
extends
{
messages
:
unknown
[]
;
totalCostUSD
:
number
}
Implements
SessionStore
<
TSnapshot
>
Index
Constructors
constructor
Methods
delete
get
list
set
Constructors
constructor
new
InMemorySessionStore
<
TSnapshot
extends
{
messages
:
unknown
[]
;
totalCostUSD
:
number
}
,
>
(
options
?:
{
now
?:
()
=>
Date
}
,
)
:
InMemorySessionStore
<
TSnapshot
>
Type Parameters
TSnapshot
extends
{
messages
:
unknown
[]
;
totalCostUSD
:
number
}
Parameters
options
:
{
now
?:
()
=>
Date
}
= {}
Returns
InMemorySessionStore
<
TSnapshot
>
Methods
delete
delete
(
sessionId
:
string
,
tenantId
?:
string
)
:
Promise
<
void
>
Parameters
sessionId
:
string
Optional
tenantId
:
string
Returns
Promise
<
void
>
get
get
(
sessionId
:
string
,
tenantId
?:
string
,
)
:
Promise
<
SessionRecord
<
TSnapshot
>
|
null
>
Parameters
sessionId
:
string
Optional
tenantId
:
string
Returns
Promise
<
SessionRecord
<
TSnapshot
>
|
null
>
list
list
(
options
?:
SessionStoreListOptions
)
:
Promise
<
SessionMeta
[]
>
Parameters
options
:
SessionStoreListOptions
= {}
Returns
Promise
<
SessionMeta
[]
>
set
set
(
sessionId
:
string
,
snapshot
:
TSnapshot
,
options
?:
SessionStoreSetOptions
,
)
:
Promise
<
SessionRecord
<
TSnapshot
>
>
Parameters
sessionId
:
string
snapshot
:
TSnapshot
options
:
SessionStoreSetOptions
= {}
Returns
Promise
<
SessionRecord
<
TSnapshot
>
>
Settings
Member Visibility
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Methods
delete
get
list
set
unified-llm-client
Loading...
Simple in-process store intended for tests and single-process development.