跳至主要內容

Mastra.setStorage()

.setStorage() 方法用於設定 Mastra 執行個體的 Storage 執行個體。此方法接受一個 MastraCompositeStore 參數。

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

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

參數
「參數」的直接連結

storage:

MastraCompositeStore
要為 Mastra 執行個體設定的 Storage 執行個體。

傳回值
「傳回值」的直接連結

此方法沒有傳回值。