fix chromadb ut

This commit is contained in:
betterwang 2024-03-07 13:54:09 +08:00
parent 2c2aa2959c
commit 2ffa9e12b9
2 changed files with 5 additions and 5 deletions

View file

@ -11,9 +11,9 @@ import chromadb
class ChromaStore:
"""If inherited from BaseStore, or importing other modules from metagpt, a Python exception occurs, which is strange."""
def __init__(self, name):
def __init__(self, name, get_or_create: bool = True):
client = chromadb.Client()
collection = client.create_collection(name)
collection = client.create_collection(name, get_or_create=get_or_create)
self.client = client
self.collection = collection