Relative Content

Tag Archive for pythonlangchain

Doesn’t include the summery of chat history in the chat memory by langchain ConversationSummaryBufferMemory

I’m using a chatbot which is created by python langchain. In that I’m sending requests to the several LLM models (OPENAI , Claude, GEMINI). When I send requests to llm, first I summarize my previous chat. For summarize it I send my previous chats with a prompt mentioning to summarize this chat. It is done by ConversationSummaryBufferMemory using llm = ChatOpenAI(temperature=0, model_name=GPT3_MODEL) . By then I got that summary of the chat history and I stored it in a variable. After when I send my query to the LLM, I send it with the prompt , query and the summery of chat history that I have stored in a variable. But in the verbose I can see whole the chat history in the prompt instead of the summery of the previous chat.