Skip to content

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

Open

Description

@Murtuza-Chawala

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.

Activity

  1. pgalko commented on Sep 12, 2023

    @pgalko
    Owner

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions