josh-ashkinaze / plurals

0 stars 1 forks source link

Let's try to refactor to use inheritance better #9

Closed josh-ashkinaze closed 1 week ago

josh-ashkinaze commented 1 week ago

EDIT: I just did this now and tested locally, appears to work. But let's add to unit tests to be 100%, @narenedara and update your examples @efry0. I will add `Network' at a later date....it's just a list of chains anyway.

Since we likely want multiple deliberation structures that are all somewhat similar to Chain, I think instead of subclassing Chain we should have a BaseClass of which other deliberation structures are derived. So for example, other structures:

  1. Ensemble: A group of agents whose responses are summarized at end. This is basically `Chain' but previous_responses always empty

  2. Network: This is just a list of chains where one processes and then output is fed to another

  3. Chain: What we currently have.

This is not as urgent as what we are currently working on. But we would want to think through what are the BASIC functionalities that will be common to every deliberation structure. I am thinking:

https://github.com/josh-ashkinaze/plurals/blob/main/plurals/deliberation.py