Skip to content

Using Agent #1393

Answered by dosubot bot
pgvetrivel asked this question in Q&A
Oct 14, 2024 · 1 comment
Discussion options

You must be logged in to vote

To make the Agent remember earlier questions in your chatbot, you need to set the memory_size parameter when initializing the Agent. This allows the agent to retain conversation history. Here's how you can modify your code:

  1. Set the memory_size Parameter:

    When creating the Agent instance, specify the memory_size to a value greater than 1. This will enable the agent to remember previous interactions.

    agent = Agent(sales_by_country, memory_size=10)
  2. Ensure Memory is Utilized:

    The memory_size parameter controls how many past interactions the agent can remember. Adjust this value based on how much history you want the agent to retain.

By making these changes, your chatbot should be able …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pgvetrivel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant