Closed tyler-suard-parker closed 10 months ago
@tyler-suard-parker ,
Yes, you can update the history of agents.
agent.send(message, receiver, request_reply=False)
. This adds the particular message to the agent history without triggering a reply. clear_history=False
... initiate_chat(clear_history=False)
Some pseudo code below
user_proxy = autogen.UserProxyAgent ..
assistant = autogen.AssistantAgent ...
for message in history:
user_proxy.send(message, assistant, request_reply=False)
# you can also send from assistant to user_proxy depending on your use case
user_proxy.initiate_chat(assistant, message=message, clear_history=False)
@victordibia Dr. Dibia, this is SO helpful, thank you!
how about groupchat? how to handle the chat history?
how about groupchat? how to handle the chat history?
Try this: https://clintgoodman27.medium.com/a-practical-guide-for-using-autogen-in-software-applications-8799185d27ee but with one change : await user_proxy.a_initiate_chat(manager, message=message, clear_history=False) ensure clear_history is set to False I have tried, it works for me
Hello. My frontend returns the last 4 exchanges with a chatbot. I was wondering if there is a way to initialize an agent using that prior history.