ParlAI icon indicating copy to clipboard operation
ParlAI copied to clipboard

How to access information stored in [memories] which are printed in messages when using command : -verbose

Open Beidaidai0713 opened this issue 3 years ago • 2 comments

I saw that when using command --v to print all messages, the [memories] feature seem to record the information that the chatbot gained from the ongoing conversation. I wonder if there's any way to access the data stored in [memories]? It is described in the paper that the chat bot has long term memory and it will stored them separately when talking to different people. How does it achieve that? Can I put things into the chat bot's memory by changing source code?

Beidaidai0713 avatar Aug 30 '22 05:08 Beidaidai0713

When interacting with the bot (like any other ParlAI agent) there is a cycle of observe and act. The act function returns a Message (dictionary) that has multiple fields. If you are using BlenderBot 2 or 3, memory must one of the fields. Check the world.parley in the interactive code for more clarification on how this works and how to modify it for your own code. About changing the code and having new memory, I know it works with BlenderBot 3 for sure. But you have to respect its memory entries format. Looking at MemoryUtils helps you figure that out.

mojtaba-komeili avatar Aug 30 '22 13:08 mojtaba-komeili

When interacting with the bot (like any other ParlAI agent) there is a cycle of observe and act. The act function returns a Message (dictionary) that has multiple fields. If you are using BlenderBot 2 or 3, memory must one of the fields. Check the world.parley in the interactive code for more clarification on how this works and how to modify it for your own code. About changing the code and having new memory, I know it works with BlenderBot 3 for sure. But you have to respect its memory entries format. Looking at MemoryUtils helps you figure that out.

Thanks so much for your reply. It's really helpful.

Beidaidai0713 avatar Aug 30 '22 13:08 Beidaidai0713

This issue has not had activity in 30 days. Please feel free to reopen if you have more issues. You may apply the "never-stale" tag to prevent this from happening.

github-actions[bot] avatar Sep 30 '22 00:09 github-actions[bot]