Groove-GPT / database.py
LordFarquaad42's picture
adding stablity patch
e4e56af
raw
history blame
504 Bytes
import chromadb
from chromadb.utils import embedding_functions
def get_client():
client = chromadb.PersistentClient(path="./chromadb_linux/")
MODEL_NAME: str = "mixedbread-ai/mxbai-embed-large-v1" # ~ 0.5 gb
COLLECTION_NAME: str = "scheme"
EMBEDDING_FUNC = embedding_functions.SentenceTransformerEmbeddingFunction(
model_name=MODEL_NAME
)
schemer = client.get_collection(
name=COLLECTION_NAME,
embedding_function=EMBEDDING_FUNC,
)
return schemer