MemoryScope 类
构造函数
MemoryScope(name: str, include_in_snapshot: bool = True)
参数
| 名称 | 说明 |
|---|---|
|
name
必需
|
|
|
include_in_snapshot
|
默认值: True
|
方法
| delete | |
| get_memory | |
| load | |
| save_changes | |
| set_memory |
delete
async delete(dialog_context: DialogContext)
参数
| 名称 | 说明 |
|---|---|
|
dialog_context
必需
|
|
get_memory
abstract get_memory(dialog_context: DialogContext) -> object
参数
| 名称 | 说明 |
|---|---|
|
dialog_context
必需
|
|
load
async load(dialog_context: DialogContext, force: bool = False)
参数
| 名称 | 说明 |
|---|---|
|
dialog_context
必需
|
|
|
force
|
默认值: False
|
save_changes
async save_changes(dialog_context: DialogContext, force: bool = False)
参数
| 名称 | 说明 |
|---|---|
|
dialog_context
必需
|
|
|
force
|
默认值: False
|
set_memory
abstract set_memory(dialog_context: DialogContext, memory: object)
参数
| 名称 | 说明 |
|---|---|
|
dialog_context
必需
|
|
|
memory
必需
|
|