Relative Content

Tag Archive for pythonpy-langchainollama

How to add chat history to RAG using langchain

I have created a python app where I am storing some documents (pdf, url ) using langchain chroma db. I then retrieve this data and start ask questions and get response from a locally stored AI.
I was able to add chat history when using ChatPromptTemplate.from_messages. On the below however I do not know where to add the chat history when using ChatPromptTemplate.from_template.