ValidationError: 2 validation errors for DocArrayDoc
text
Field required [type=missing, input_value={'embedding': [-0.0064034... -0.028614587546074315]}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.5/v/missing
metadata
Field required [type=missing, input_value={'embedding': [-0.0064034... -0.028614587546074315]}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.5/v/missing
I downloaded the course notebook to my local and run it
Hi, Rodrigo,
It runs in the downloaded notebook
but not in my local environment where I copy the code from downloaded notebook, and downloaded the csv file.
And you can see from the screen shot from my local notebook that the data[10] which contains the answer have name and metadata. So, it should be something with my own conda environment not working well with DocArrayDoc.
I will find the cause of this issue and update the solution here if I find anything useful
Thank you very much for your help!
Jessica
I know what is the issue.
So the longchain version I installed in my notebook was 0.0.348 (the newest version, I believe?) , your notebook is with longchain version 0.0.179 , after I downgrade my longchain version to 0.0.179, it works
Yeah, agree. so I assume some functionalities in the old version might be deprecated in the newest version. I need to rewrite some code in order to have it work with the newest version of langchain.
It looks like this behavior is related to recent Pydantic version.
To make it work, I had to downgrade Pydantic to 1.10.9 which downgrade in turn langchain to 0.0.347
I would love to see the notebook updated, it is part of programming live cycle, at least point to a github repo with the newest code, even if the video are not.
Thanks