AIAnytime / Chat-with-PDF-Chatbot

This Chatbot is an interactive app developed to assist users to interact with their PDF. It is built using Open Source Stack. No OpenAI is required.
MIT License
152 stars 114 forks source link

pydantic error #11

Open registerme1963 opened 1 year ago

registerme1963 commented 1 year ago

%USERPROFILE%\AppData\Local\Programs\Python\Python310\lib\site-packages\bitsandbytes\cextension.py:34: UserWarning: The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable. warn("The installed version of bitsandbytes was compiled without GPU support. " 'NoneType' object has no attribute 'cadam32bit_grad_fp32' Creating embeddings. May take some minutes... Traceback (most recent call last): File "D:\chatpdf\Chat-with-PDF-Chatbot\ingest.py", line 32, in main() File "D:\chatpdf\Chat-with-PDF-Chatbot\ingest.py", line 25, in main db = Chroma.from_documents(texts, embeddings, persist_directory=persist_directory, client_settings=CHROMA_SETTINGS) File "%USERPROFILE%\AppData\Local\Programs\Python\Python310\lib\site-packages\langchain\vectorstores\chroma.py", line 613, in from_documents return cls.from_texts( File "%USERPROFILE%\AppData\Local\Programs\Python\Python310\lib\site-packages\langchain\vectorstores\chroma.py", line 568, in from_texts chroma_collection = cls( File "%USERPROFILE%\AppData\Local\Programs\Python\Python310\lib\site-packages\langchain\vectorstores\chroma.py", line 126, in init self._collection = self._client.get_or_create_collection( File "%USERPROFILE%\AppData\Local\Programs\Python\Python310\lib\site-packages\chromadb\api\local.py", line 141, in get_or_create_collection return self.create_collection( File "%USERPROFILE%\AppData\Local\Programs\Python\Python310\lib\site-packages\chromadb\api\local.py", line 111, in create_collection return Collection( File "%USERPROFILE%\AppData\Local\Programs\Python\Python310\lib\site-packages\chromadb\api\models\Collection.py", line 52, in init self._client = client File "%USERPROFILE%\AppData\Local\Programs\Python\Python310\lib\site-packages\pydantic\main.py", line 768, in setattr if self.pydantic_private is None or name not in self.private_attributes: File "%USERPROFILE%\AppData\Local\Programs\Python\Python310\lib\site-packages\pydantic\main.py", line 756, in getattr return super().getattribute(item) # Raises AttributeError if appropriate AttributeError: 'Collection' object has no attribute 'pydantic_private'. Did you mean: 'pydantic_complete'?

Yash-Kavaiya commented 10 months ago

Just downgrade Pydantic V2 to Pydantic V1

pip install "pydantic==1.*"

akj2784 commented 9 months ago

were u able to resolve this error? I am still getting the same error even after downgrading pydantic to 1.10