Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in having a Conversation. (Conversational Memory not enabled) #4

Open
Murtuza-Chawala opened this issue Sep 11, 2023 · 1 comment

Comments

@Murtuza-Chawala
Copy link
Contributor

Murtuza-Chawala commented Sep 11, 2023

Hi @pgalko,

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.

@pgalko
Copy link
Owner

pgalko commented 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:

from bambooai import BambooAI

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)

bamboo.pd_agent_converse()

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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants