跳到主要内容

Mastra.setStorage()

.setStorage() 方法用于设置 Mastra 实例的 Storage 实例。此方法接受一个 MastraCompositeStore 参数。

使用示例
使用示例的直接链接

mastra.setStorage(
new LibSQLStore({
id: 'mastra-storage',
url: ':memory:',
}),
)

参数
参数的直接链接

storage:

MastraCompositeStore
要为 Mastra 实例设置的 Storage 实例。

返回值
返回值的直接链接

此方法没有返回值。