> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ko/llms.txt # 벡터 벡터 저장소 생성자는 이제`id`속성 및 벡터 저장소 메서드의 이름이 일관된 명명 규칙을 따르도록 변경되었습니다. ## 변경됨 ### 벡터 스토어 인스턴스에 필요한 `id` 속성 이제 벡터 스토어 인스턴스에는 `id` 속성이 필요합니다. 이 고유 식별자는 Mastra 내에서 벡터 스토어 인스턴스를 추적하고 관리하는 데 사용됩니다. `id`에는 애플리케이션의 각 벡터 스토어를 나타내는 설명적이고 고유한 문자열을 지정해야 합니다. 마이그레이션하려면 벡터 스토어 생성자에 `id` 필드를 추가하세요. ```diff const vectorStore = new PgVector({ + id: 'main-vector-store', connectionString: process.env.POSTGRES_CONNECTION_STRING, }); const chromaStore = new ChromaVector({ + id: 'chroma-embeddings', url: process.env.CHROMA_URL, }); const pineconeStore = new PineconeVector({ + id: 'pinecone-production', apiKey: process.env.PINECONE_API_KEY, }); ``` ### `getVectors`에게`listVectors` `getVectors()` 메서드의 이름이 `listVectors()`로 변경되었습니다. 이 변경은 여러 항목을 가져오는 getter 메서드에 `list` 접두사를 사용하는 API 전반의 명명 규칙과 일치합니다. 마이그레이션하려면 모든 `getVectors()` 호출을 `listVectors()`로 바꾸세요. ```diff const vectorStore = new VectorStore({ ... }); - const vectors = await vectorStore.getVectors({ ... }); + const vectors = await vectorStore.listVectors({ ... }); ``` ### `LibSQLVector`: `connectionUrl`에서 `url`로 `@libsql/client` API에 맞추고 LibSQLStorage와 일관성을 유지하기 위해 `connectionUrl` 매개변수의 이름이 `url`로 변경되었습니다. ```diff const vectorStore = new LibSQLVector({ id: 'my-vector', - connectionUrl: 'file:./db.sqlite', + url: 'file:./db.sqlite', }); ``` ### `OpenSearchVector`: `url`에서 `node`로 OpenSearch `ClientOptions` API와 일치하도록 `url` 매개변수의 이름이 `node`로 변경되었습니다. 이제 생성자는 인증, SSL, 압축을 비롯한 모든 OpenSearch 클라이언트 옵션을 허용합니다. ```diff const vectorStore = new OpenSearchVector({ id: 'my-vector', - url: 'http://localhost:9200', + node: 'http://localhost:9200', }); ``` ### `PineconeVector`: `environment` removed `environment` 매개변수가 제거되었습니다. 사용자 지정 컨트롤러 호스트를 지정해야 한다면 `controllerHostUrl`을 대신 사용하세요. 이제 생성자는 모든 Pinecone 구성 옵션을 허용합니다. ```diff const vectorStore = new PineconeVector({ id: 'my-vector', apiKey: process.env.PINECONE_API_KEY, - environment: process.env.PINECONE_ENVIRONMENT, }); ``` 맞춤형 컨트롤러 호스트가 필요한 경우: ```ts const vectorStore = new PineconeVector({ id: 'my-vector', apiKey: process.env.PINECONE_API_KEY, controllerHostUrl: 'https://api.pinecone.io', }) ```