MemoryScope 類別

建構函式

MemoryScope(name: str, include_in_snapshot: bool = True)

參數

名稱 Description
name
必要
include_in_snapshot
預設值: True

方法

delete
get_memory
load
save_changes
set_memory

delete

async delete(dialog_context: DialogContext)

參數

名稱 Description
dialog_context
必要

get_memory

abstract get_memory(dialog_context: DialogContext) -> object

參數

名稱 Description
dialog_context
必要

load

async load(dialog_context: DialogContext, force: bool = False)

參數

名稱 Description
dialog_context
必要
force
預設值: False

save_changes

async save_changes(dialog_context: DialogContext, force: bool = False)

參數

名稱 Description
dialog_context
必要
force
預設值: False

set_memory

abstract set_memory(dialog_context: DialogContext, memory: object)

參數

名稱 Description
dialog_context
必要
memory
必要