BrowserGym icon indicating copy to clipboard operation
BrowserGym copied to clipboard

Chat API improvement

Open gasse opened this issue 1 year ago • 0 comments

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 AbstractChat class with abstract methods add_message(), wait_for_user_message() and close() (could be refactored as well)
  • the current chat would be renamed PlaywrightChat or something, and inherit from the AbstractChat class
  • the way the chat is exposed to cheat functions has to be adapted as well (see #78 )

gasse avatar Jul 19 '24 15:07 gasse