-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Reset Feature #3896
Comments
Perhaps check the initiate_chat() function at Line 989 in conversable_agent.py. The parameter 'clear_history' is by default to beTrue to clear the chat history with the peer agent. |
Dear @Kunjal1999 Please see @qgzhang's comment. Thanks, |
Hello, I want an implementation such that when user inputs "RESET", the agent forgets all history.
|
It does not get cleared, i.e. the LLM still remembers context. I want a functionality such that on pressing RESET the LLM forgets context. |
I don't think Autogen maintain a context beyond the conversation history,
unless... you are talking about the cache?
…On Thu, 24 Oct 2024, 07:15 Kunjal1999, ***@***.***> wrote:
Perhaps check the initiate_chat() function at Line 989 in
conversable_agent.py. The parameter 'clear_history' is by default to beTrue
to clear the chat history with the peer agent.
It does not get cleared, i.e. the LLM still remembers context. I want a
functionality such that on pressing RESET the LLM forgets context.
—
Reply to this email directly, view it on GitHub
<#3896 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHCGIBK7XL4H2QMTFZ7ZIDLZ5AGWDAVCNFSM6AAAAABQNT2OQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZTGQ3TMOJXGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
My current application is something like this:
Now, whenever a user enters RESET, the LLM should forget everything except for the sys_msg and the init_msg, i.e. it should forget everything that the user sent and it remembered. |
In v0.2, you want to use the register_reply method to add a custom handler that watches out for the See: https://microsoft.github.io/autogen/0.2/docs/reference/agentchat/conversable_agent#register_reply Inside the registered reply function, you want to clear the list |
Hello, I tried implementing the register_reply function with self._oai_messages[sender] but it didn't work out. Kindly help. |
You need to register it to the other (assistant) agent not the user proxy. |
Hello, |
Can you update the trigger field to the actual instance not the string? Your code is almost there. |
Hello, |
Also, in a user_proxy, do we have any list of pointers to all the agents the user_proxy has been so far interacting with? |
@Kunjal1999 Beyond register reply function you also use You can also use message transform feature to do the same thing, which transform the messages into an empty list if Generally, I can see v0.4 Core API might suite you better if you are looking for more control over how messages are handled. You can take a look at the two agent chat example in v0.4 Core preview: https://microsoft.github.io/autogen/dev/user-guide/core-user-guide/quickstart.html |
What happened?
Hello, while using the ChatInitiator with
If I want to reset the existing context (or in other words make the LLM forget everything that it remembers so far) if a user inputs RESET, how do I do that?
What did you expect to happen?
Reset
How can we reproduce it (as minimally and precisely as possible)?
Hello, while using the ChatInitiator with
If I want to reset the existing context (or in other words make the LLM forget everything that it remembers so far) if a user inputs RESET, how do I do that?
AutoGen version
Latest one
Which package was this bug in
Core
Model used
No response
Python version
No response
Operating system
No response
Any additional info you think would be helpful for fixing this bug
No response
The text was updated successfully, but these errors were encountered: