garystafford / ollama-streamlit-langchain-chat-app

Streamlit app for chatting with Meta Llama 3.2 using Ollama and LangChain
MIT License
6 stars 5 forks source link

Adding retrieval to chatbot #1

Open BELANIDP opened 4 weeks ago

BELANIDP commented 4 weeks ago

Hi Gary, Thanks for building such a concise and clean code for llm chat. I am new to LLMs and learning how to build RAG apps using langchain. I have used your code to build an app and modified it to include a retrieval to give a context to the LLM. I am running into an issue of not being able to send the messages list to the chain_with_history. I have studied the RunnableWithMessageHistory constructor but I am still not clear why I am not able to pass the Streamlit message list to the lambda. I am writing to you to seek your help to understand the error and the resolution. I have attached the modified code and the error. NOTE: 1] Lines added in code is commented with ## --> 2] Lines not used in code is commented with ## <--

Appreciate your time and help!! error.txt chatbot.txt

P.S. I did not find any other way to raise adding a retrieval to your current app as a suggestion/idea hence raising it here.

BELANIDP commented 4 weeks ago

Resolved !