How to add memory to create_csv_agent?

Hello! I am trying to add ConversationBufferMemory to the create_csv_agent method. My code is as follows:

from langchain.memory import ConversationBufferMemory
from langchain.agents import create_csv_agent
from langchain.llms import OpenAI
csv_memory = ConversationBufferMemory()
agent = create_csv_agent(OpenAI(temperature=0), file_path, verbose=True, memory=csv_memory)

Not too sure how to proceed since the above does not seem to be working correctly, even though no error is thrown. Any help would be appreciated. Thanks

1 Like

You Got solution if you have solution please share a idea ?

1 Like