工作流步骤

内内内

type: "memory"

阅读、写或删除账户的长期注释之一, 以便链条能记住运行之间的东西。

free3 actionsread by default
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

actionstringread

read · write · delete.

namestring

所需 write 和 delete.

contentstring

所需 write.

descriptionstring

一行,在索引中显示。

// Remember where the last run got to
{ id: "mark", type: "memory", config: {
    action: "write", name: "last-digest",
    description: "The date of the last digest sent",
    content: "{{input.week}}" } }

// Read it at the start of the next run
{ id: "since", type: "memory", config: { action: "read", name: "last-digest" } }
# Remember where the last run got to
{"id": "mark", "type": "memory", "config": {
    "action": "write", "name": "last-digest",
    "description": "The date of the last digest sent",
    "content": "{{input.week}}"}}

# Read it at the start of the next run
{"id": "since", "type": "memory", "config": {"action": "read", "name": "last-digest"}}

输出

行动行动输出输出输出
read 使用名称注 注
read 没有memories - 指数
write以及它是否被创建
delete名称,以及是否删除

连锁链就是这样维持状态的

运行开始时一无所有

每一个都是独立的。 排行榜上的链条,不得重复自己—— 自上次摘要以来的一小节—— 结尾写了一张注,开头读了。 运行之间没有其它状态。

记号是账户的

同样的,一个代理读写, 同样的 api.memory 管理一个写一个的工作流程,改变该账户每个代理商所知道的情况——这是有益的,值得考虑。