跳至主要內容

Mastra.setStorage()

.setStorage() 方法用於為 Mastra 實例設定儲存空間實例。此方法接受單一 MastraCompositeStore 參數。

使用範例
使用範例 的直接連結

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

參數
參數 的直接連結

storage:

MastraCompositeStore
要為 Mastra 實例設定的儲存空間實例。

傳回值
傳回值 的直接連結

此方法不會傳回值。