Great question — answering as the UphillTech team:
The chains module is now bundled in the langchain-classic library since langchain version 1.x . The langchain-classic library is only supported until Dec 2026 Change your imports to: from langchain_community.document_loaders import PyPDFLoader from langchain_chroma import Chroma from langchain_openai import ChatOpenAI, OpenAIEmbeddings from langchain_text_splitters import RecursiveCharacterTextSplitter from langchain_classic.chains import create_retrieval_chain from langchain_classic.chains.combine_documents import create_stuff_documents_chain from langchain_core.prompts import ChatPromptTemplate You can align your library versions with the following reference: langchain==1.2.10...
Full answer by Oluwafemi Sule: https://stackoverflow.stackexchange.com/a/79887270 (CC BY-SA 4.0).
Need it done for your business? UphillTech.