返回文档
正在准备搜索索引...
搜索索引不可用
API 参考
API 参考
检查点
MemorySaver
类 MemorySaver
继承层次结构 (
查看完整
)
BaseCheckpointSaver
MemorySaver
索引
构造函数
constructor
属性
serde
storage
writes
方法
_get
Pending
Sends
get
get
Next
Version
get
Tuple
list
put
put
Writes
构造函数
constructor
new
Memory
Saver
(
serde
?
)
:
MemorySaver
参数
可选
serde
:
SerializerProtocol
返回值
MemorySaver
属性
serde
serde
:
SerializerProtocol
storage
storage
:
Record
<
string
,
Record
<
string
,
Record
<
string
,
[
Uint8Array
,
Uint8Array
,
undefined
|
string
]
>
>
>
writes
writes
:
Record
<
string
,
Record
<
string
,
[
string
,
string
,
Uint8Array
]
>
>
方法
_get
Pending
Sends
_get
Pending
Sends
(
threadId
,
checkpointNs
,
parentCheckpointId
?
)
:
Promise
<
SendProtocol
[]
>
参数
threadId
:
string
checkpointNs
:
string
可选
parentCheckpointId
:
string
返回值
Promise
<
SendProtocol
[]
>
get
get
(
config
)
:
Promise
<
undefined
|
Checkpoint
<
string
,
string
>
>
参数
config
:
RunnableConfig
<
Record
<
string
,
any
>
>
返回值
Promise
<
undefined
|
Checkpoint
<
string
,
string
>
>
get
Next
Version
get
Next
Version
(
current
,
_channel
)
:
number
为通道生成下一个版本 ID。
默认使用整数版本,每次递增 1。如果需要覆盖默认行为,可以使用 str/int/float 版本,只要它们是单调递增的即可。
参数
current
:
undefined
|
number
_channel
:
ChannelProtocol
<
unknown
,
unknown
,
unknown
>
返回值
number
get
Tuple
get
Tuple
(
config
)
:
Promise
<
undefined
|
CheckpointTuple
>
参数
config
:
RunnableConfig
<
Record
<
string
,
any
>
>
返回值
Promise
<
undefined
|
CheckpointTuple
>
list
list
(
config
,
options
?
)
:
AsyncGenerator
<
CheckpointTuple
,
any
,
unknown
>
参数
config
:
RunnableConfig
<
Record
<
string
,
any
>
>
可选
options
:
CheckpointListOptions
返回值
AsyncGenerator
<
CheckpointTuple
,
any
,
unknown
>
put
put
(
config
,
checkpoint
,
metadata
)
:
Promise
<
RunnableConfig
<
Record
<
string
,
any
>
>
>
参数
config
:
RunnableConfig
<
Record
<
string
,
any
>
>
checkpoint
:
Checkpoint
<
string
,
string
>
metadata
:
CheckpointMetadata
返回值
Promise
<
RunnableConfig
<
Record
<
string
,
any
>
>
>
put
Writes
put
Writes
(
config
,
writes
,
taskId
)
:
Promise
<
void
>
存储链接到检查点的中间写入。
参数
config
:
RunnableConfig
<
Record
<
string
,
any
>
>
writes
:
PendingWrite
<
string
>
[]
taskId
:
string
返回值
Promise
<
void
>
设置
成员可见性
受保护
继承的
外部的
主题
操作系统
浅色
深色
本页内容
constructor
serde
storage
writes
_get
Pending
Sends
get
get
Next
Version
get
Tuple
list
put
put
Writes
API 参考
加载中...
为通道生成下一个版本 ID。
默认使用整数版本,每次递增 1。如果需要覆盖默认行为,可以使用 str/int/float 版本,只要它们是单调递增的即可。