Description
I am running the sample code of PgvectorDocumentStore, as follows:
The above is an example of the PgvectorDocumentStore section of the document. I executed it intact and encountered the following error:
File "F:\AWorks\work_python\ragkb\test\PythonTest.py", line 407, in
document_store.write_documents([
File "F:\AWorks\work_python\ragkb.venv\lib\site-packages\haystack_integrations\document_stores\pgvector\document_store.py", line 432, in write_documents
db_documents = self._from_haystack_to_pg_documents(documents)
File "F:\AWorks\work_python\ragkb.venv\lib\site-packages\haystack_integrations\document_stores\pgvector\document_store.py", line 486, in _from_haystack_to_pg_documents
db_document["dataframe"] = Jsonb(db_document["dataframe"]) if db_document["dataframe"] else None
KeyError: 'dataframe'
By locating the source code, I found that when document is converted into a dictionary, the old field dataframe is still needed. However, I am using version 2.13.1 and found that the dataframe field is ignored when it is converted into a dictionary. How can I solve this problem?
use haystack-ai 2.13.1