Spaces:
Runtime error
Runtime error
File size: 512 Bytes
abb6f94 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from langchain_chroma import Chroma
import logging
logger = logging.getLogger(__name__)
def get_chroma_client(collection_name, embedding_function, persist_directory):
try:
logging.info(f"Setting up chroma client")
return Chroma(collection_name=collection_name,
embedding_function=embedding_function,
persist_directory=persist_directory)
except Exception as e:
logging.error(f"Failed to initialize Chroma client: {e}")
raise |