Open KOMPALALOKESH opened 9 months ago
After correcting this issue, I ran python ingest.py
. Then I got below error,
PS D:\Practising\2024-01-02\Chat-with-PDF-Chatbot> python ingest.py splitting into chunks Loading sentence transformers model D:\Python39\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:\Practising\2024-01-02\Chat-with-PDF-Chatbot\ingest.py", line 42, in <module> main() File "D:\Practising\2024-01-02\Chat-with-PDF-Chatbot\ingest.py", line 32, in main db = Chroma.from_documents( File "D:\Python39\lib\site-packages\langchain\vectorstores\chroma.py", line 613, in from_documents return cls.from_texts( File "D:\Python39\lib\site-packages\langchain\vectorstores\chroma.py", line 577, in from_texts chroma_collection.add_texts(texts=texts, metadatas=metadatas, ids=ids) File "D:\Python39\lib\site-packages\langchain\vectorstores\chroma.py", line 236, in add_texts self._collection.upsert( File "D:\Python39\lib\site-packages\chromadb\api\models\Collection.py", line 295, in upsert ids, embeddings, metadatas, documents = self._validate_embedding_set( File "D:\Python39\lib\site-packages\chromadb\api\models\Collection.py", line 347, in _validate_embedding_set ids = validate_ids(maybe_cast_one_to_many(ids)) File "D:\Python39\lib\site-packages\chromadb\api\types.py", line 97, in maybe_cast_one_to_many if isinstance(target[0], (int, float)): IndexError: list index out of range
Can anyone tell me about this error ?
@KOMPALALOKESH I used this to resolve the error,
pip install pydantic==1.10.11
Traceback (most recent call last): File "/content/Chat-with-PDF-Chatbot/ingest.py", line 32, in
main()
File "/content/Chat-with-PDF-Chatbot/ingest.py", line 16, in main
documents = loader.load()
UnboundLocalError: local variable 'loader' referenced before assignment