You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issue in having a Conversation. (Conversational Memory not enabled) #4
Whenever I ask another question it seems to not take in the context of the previous question and answer and gives me a fresh new response.
I'd like to have memory enabled so that I can have a conversation with it.
Note - I am running the Bamboo AI Agent in a for-loop to enable memory
And also have set max_conversations=2.
This is my configuration
bamboo = BambooAI(df,llm='gpt-3.5-turbo-0613',max_conversations=2, debug=False, vector_db=False, exploratory=False, llm_switch=False, search_tool=False)
for _ in range(0,2):
user_input = input("Dear User Please Enter your query: ")
#How many rows are present from the dataset
bamboo.pd_agent_converse(user_input)
I am sure you have some solution, am I missing something?
Thank you.
The bamboo ai can run in a while loop with memory enabled natively, you should not need to enclose it in a for loop.
Basically, if you run it with prompt like this bamboo.pd_agent_converse("How many rows are present from the dataset ?") it will do a single execution and stop (no memory).
But if you run it without prompt bamboo.pd_agent_converse() it will start a while loop and prompt you to type in your questions. The loop is broken when you type "exit".
So, to run it in the loop with memory enabled all you need to do is this:
Activity
pgalko commentedon Sep 12, 2023
The bamboo ai can run in a while loop with memory enabled natively, you should not need to enclose it in a for loop.
Basically, if you run it with prompt like this
bamboo.pd_agent_converse("How many rows are present from the dataset ?")it will do a single execution and stop (no memory).But if you run it without prompt
bamboo.pd_agent_converse()it will start a while loop and prompt you to type in your questions. The loop is broken when you type "exit".So, to run it in the loop with memory enabled all you need to do is this:
The output would look similar to the below:
Enter your question or type 'exit' to quit:
What is the average age of female survivors ?
<<Response 1>>
Enter your question or type 'exit' to quit:
And male ?
<<Response 2>>
I hope it helps :-)