From 7c4e37c5cdc926a52b694c683c1ab89b2c280ce6 Mon Sep 17 00:00:00 2001
From: Emanuel Ferreira <contatoferreirads@gmail.com>
Date: Mon, 22 Jan 2024 00:36:11 -0300
Subject: [PATCH] fix(getCollection): getOrCreateCollection (#413)

---
 packages/core/src/storage/vectorStore/ChromaVectorStore.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/core/src/storage/vectorStore/ChromaVectorStore.ts b/packages/core/src/storage/vectorStore/ChromaVectorStore.ts
index d6d8d52de..8ad38e720 100644
--- a/packages/core/src/storage/vectorStore/ChromaVectorStore.ts
+++ b/packages/core/src/storage/vectorStore/ChromaVectorStore.ts
@@ -52,7 +52,7 @@ export class ChromaVectorStore implements VectorStore {
 
   async getCollection(): Promise<Collection> {
     if (!this.collection) {
-      const coll = await this.chromaClient.createCollection({
+      const coll = await this.chromaClient.getOrCreateCollection({
         name: this.collectionName,
       });
       this.collection = coll;
-- 
GitLab