跳到主要内容
非官方简体中文翻译,内容版权归 Mastra 所有,遵循 Apache-2.0 许可。

Mastra.getVector()

The .getVector() method is used to retrieve a vector store by its name. The method accepts a single string parameter for the vector store's name.

Usage example
Usage example的直接链接

mastra.getVector('testVectorStore')

Parameters
Parameters的直接链接

name:

TVectorName extends keyof TVectors
The name of the vector store to retrieve. Must be a valid vector store name that exists in the Mastra configuration.

Returns
Returns的直接链接

vector:

TVectors[TVectorName]
The vector store instance with the specified name. Throws an error if the vector store is not found.
On this page