Conversational_memory for a pandas_dataframe_agent in a Streamlit app #10686
Replies: 4 comments
-
🤖 Sure, I can help you with that. Could you please provide more details about what you are trying to achieve with the 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.
-
I am simply trying to get Open AI LLM remember the previous message I sent. Right now when I ask it, what was the last thing I asked you it always responds with, "You asked for the result of print(df.head()), which is the first 5 rows of the dataframe df.". I am guessing this is the initial prompt it receives from the system. |
Beta Was this translation helpful? Give feedback.
-
Hi may I ask have you figure out with the problem? I am tring to do the same thing and facing the same problem/(ㄒoㄒ)/~~ |
Beta Was this translation helpful? Give feedback.
-
Is this the memory issue with pandas_dataframe_agent? If so, I made a work
around where I added my previous queries to the prompt as the conversation
went.
The pandas_dataframe_agent doesn't allow adding actual memory to it. So
that was the only option I found...
…On Tue, Sep 26, 2023, 3:33 AM xixiaoguai727 ***@***.***> wrote:
Hi may I ask have you figure out with the problem? I am tring to do the
same thing and facing the same problem/(ㄒoㄒ)/~~
—
Reply to this email directly, view it on GitHub
<#10686 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4D533B4Q3YIEFRZ4MZLRT3X4KAMZANCNFSM6AAAAAA43DSSVE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have been trying for 6 hours straight to add any memory to the pandas_dataframe_agent in my Streamlit app. I have tried conversational_memory and st.session_state['chat_history'] methods. I have worked with Bing Chat, Bard, and Claude with no success. Below is my code, and thank you very much in advance for any guidance.
New Chat Functionality
def chat(temperature, model_name,openai_api_key=st.secrets["OPENAI_API_KEY"]):
st.write("# Talk to your data")
Add functionality for Page 1
Create a ConversationBufferMemory instance
)
Create agent
Beta Was this translation helpful? Give feedback.
All reactions