BrowserGym
BrowserGym copied to clipboard
Chat API improvement
What we want
The current chat API is not super modular. Ideally we would like to be able to switch between different chat implementations, which can be parameterized via an argument in BrowserEnv's __init__().
- the current chat implementation, a dynamic chat webpage handled in a Playwright context
- a hidden chat, it can receive messages from the task and the agent but there is no display
- a chat implemented via a Chrome extension?
- any chat that users can implement, following a pre-defined API
How
Several things need to be done
- a new
AbstractChatclass with abstract methodsadd_message(),wait_for_user_message()andclose()(could be refactored as well) - the current chat would be renamed
PlaywrightChator something, and inherit from theAbstractChatclass - the way the chat is exposed to cheat functions has to be adapted as well (see #78 )