This is a medical bot built using Llama2 and Sentence Transformers. The bot is powered by Langchain and Chainlit. The bot runs on a decent CPU machine with a minimum of 16GB of RAM.
MIT License
296
stars
218
forks
source link
extra fields not permitted (type=value_error.extra) when running the model code #1
File "/venv/lib/python3.11/site-packages/langchain/load/serializable.py", line 74, in __init__ super().__init__(**kwargs) File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for RetrievalQA return_source_document extra fields not permitted (type=value_error.extra)
Im using langchain-0.0.240 and pedantic-1.10.11
Seems to be related to the return_source_document = True in RetrievalQA.from_chain_type. When I comment this argument it works without issue.
Hi,
Thanks for sharing!
When running the code, I get the following error:
File "/venv/lib/python3.11/site-packages/langchain/load/serializable.py", line 74, in __init__ super().__init__(**kwargs) File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for RetrievalQA return_source_document extra fields not permitted (type=value_error.extra)
Im using langchain-0.0.240 and pedantic-1.10.11
Seems to be related to the return_source_document = True in RetrievalQA.from_chain_type. When I comment this argument it works without issue.