camel icon indicating copy to clipboard operation
camel copied to clipboard

[Feature Request] Add and bind termination reason or criteria to `RolePlaying`

Open zechengz opened this issue 1 year ago • 3 comments

Required prerequisites

  • [X] I have searched the Issue Tracker and Discussions that this hasn't already been reported. (+1 or comment there if it has.)
  • [ ] Consider asking first in a Discussion.

Motivation

One main step for RolePlaying is the termination. But currently the termination reason and criteria are defined outside RolePlaying and a little bit messy. For example, followings are what we have in the ai_society example, which takes about 50 lines of code

https://github.com/camel-ai/camel/blob/e92705ff927e4d7b7a39fe1d90439c0b5a066435/examples/ai_society/role_playing_multiprocess.py#L99-L152

Solution

Add and bind termination reason or criteria to RolePlaying. Also, allow user to create their own ones by inheriting some classes etc.

Alternatives

No response

Additional context

No response

zechengz avatar Jul 01 '23 09:07 zechengz

Thanks, @zechengz. Sure, this is a great suggestion which is also something I had in mind!

lightaime avatar Jul 01 '23 22:07 lightaime

@zechengz Thanks for highlighting this issue, it is indeed messy. It will be gone after the PolePlaying API rework, see here: https://github.com/orgs/camel-ai/discussions/207 Please leave your opinion in the discussion #207.

Obs01ete avatar Jul 06 '23 09:07 Obs01ete

@Obs01ete Sure, I will wait until the rework.

zechengz avatar Jul 08 '23 22:07 zechengz