The error msg is : self._conn.executemany(
195 f"“”
196 INSERT INTO embeddings ({insert_string}) VALUES (?,?,?,?,?,?)“”",
RuntimeError: Unable to cast Python instance to C++ type (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)
Code is exactly the same as shown
from langchain.document_loaders import PyPDFLoader
Load PDF
loaders = [
# Duplicate documents on purpose - messy data
PyPDFLoader(“/content/W1.pdf”)
]
docs =
for loader in loaders:
docs.extend(loader.load())
Split
from langchain.text_splitter import RecursiveCharacterTextSplitter
text_splitter = RecursiveCharacterTextSplitter(
chunk_size = 1500,
chunk_overlap = 150
)
splits = text_splitter.split_documents(docs)
len(splits)
vectordb = Chroma.from_documents(
documents=splits,
embedding=embedding,
persist_directory=persist_directory
)
Did anybody get this or fix this please ?