Replies: 2 comments 3 replies
-
🤖 Hello, From your code, it seems like you're trying to use the To use the memory_x = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
agent = create_csv_agent(OpenAI(temperature=0, openai_api_key=os.environ["OPENAI_API_KEY"]), filepath, agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True, memory=memory_x) In the above code, However, please note that the Also, you need to make sure that the I hope this helps! If you have any other questions, feel free to ask. Best, Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
@dosu-bot i want to use the Create_csv_agent with a memory of the chat being passed and also scanned to make the agent have access to this chat so the agent have access to the csv and the chat and could generate the response from both of them so how to do that |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
i have this lines to create the Langchain csv agent with the memory or a chat history added to it i want to make the agent have access to the user questions and the responses and consider them in the actions but the agent doesn't recognize the memory at all here is my code >>
memory_x = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
agent = create_csv_agent(OpenAI(temperature=0, openai_api_key=os.environ["OPENAI_API_KEY"]),filepath,agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True)
`
and here is the post function in the route that handles the the user input -----
could someone plese help me do it
i have tried al the ways for adding the memory but i can't make this correct
All what i want is to make the CSV_AGENT to have a look over the chat histroy and uses it in it's response and so
Beta Was this translation helpful? Give feedback.
All reactions