Open NeevrajKB opened 4 months ago
import os import chromadb from chromadb.config import Settings
CHROMA_SETTINGS = client = chromadb.PersistentClient(path="db") Updated the constants.py with reference to the docs due to a depreciation of certain functions
AttributeError: 'Client' object has no attribute 'chroma_api_impl' Traceback: File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 584, in _run_script exec(code, module.dict) File "C:\Users\Admin\Desktop\ragwithurb\7urb.py", line 194, in
main()
File "C:\Users\Admin\Desktop\ragwithurb\7urb.py", line 163, in main
ingested_data = data_ingestion()
^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 168, in wrapper
return cached_func(*args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 197, in call
return self._get_or_create_cached_value(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 224, in _get_or_create_cached_value
return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 280, in _handle_cache_miss
computed_value = self._info.func(func_args, **func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\Desktop\ragwithurb\7urb.py", line 71, in data_ingestion
db = Chroma.from_documents(texts, embeddings, persist_directory=persist_directory, client_settings=CHROMA_SETTINGS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain_community\vectorstores\chroma.py", line 778, in from_documents
return cls.from_texts(
^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain_community\vectorstores\chroma.py", line 714, in from_texts
chroma_collection = cls(
^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain_community\vectorstores\chroma.py", line 120, in init
self._client = chromadb.Client(_client_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\chromadb__init.py", line 274, in Client
return ClientCreator(tenant=tenant, database=database, settings=settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\chromadb\api\client.py", line 139, in init
super().init(settings=settings)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\chromadb\api\client.py", line 42, in init__
self._identifier = SharedSystemClient._get_identifier_from_settings(settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\chromadb\api\client.py", line 71, in _get_identifier_from_settings
api_impl = settings.chroma_api_impl
^^^^^^^^^^^^^^^^^^^^^^^^