localGPT
localGPT copied to clipboard
'Collection' object has no attribute '__pydantic_private__',how to solve it?
2023-12-05 19:26:23,146 - INFO - run_localgpt.py:241 - Running on: cpu
2023-12-05 19:26:23,146 - INFO - run_localgpt.py:242 - Display Source Documents set to: False
2023-12-05 19:26:23,146 - INFO - run_localgpt.py:243 - Use history set to: False
2023-12-05 19:26:23,553 - INFO - SentenceTransformer.py:66 - Load pretrained SentenceTransformer: hkunlp/instructor-large
load INSTRUCTOR_Transformer
max_seq_length 512
Traceback (most recent call last):
File "C:\Users\shigf\localGPT\run_localgpt.py", line 282, in
I had a similar issue, triggered by this line
assert workflow_db.project == project_db
I had no problem with Pydantic v1, but upgrading to v2 I had to change the assertion like this
assert workflow_db.project.model_dump() == project_db.model_dump()
@ychiucco which file/path are you referring to here ?
The problem is that Collection.__init__
doesn't call super().__init__
soon enough. The Pydantic attributes don't exist until that call happens.