I solved this. It involved reinstalling the following using pip:
langchain openai langchain-openai langchain-community and Langchainhub