- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.6k
Enhancing RolePlaying with custom ChatAgent support #3199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the  You can disable this status message by setting the  ✨ Finishing touches🧪 Generate unit tests (beta)
 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment  | 
| This closes issue #3198 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @ChenziqiAdam
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
I left some feedback, let me know what you think!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @ChenziqiAdam 's contribution! Left some comments below, also there's some pre-commit issue need to be fixed: https://github.com/camel-ai/camel/actions/runs/18129766609/job/51593349791?pr=3199
| # Do not regenerate sys_msg when using custom agents | ||
| if self.assistant_agent is not None and self.user_agent is not None: | ||
| ( | ||
| init_assistant_sys_msg, | ||
| init_user_sys_msg, | ||
| sys_msg_meta_dicts, | ||
| ) = self._get_sys_message_info( | ||
| assistant_role_name, | ||
| user_role_name, | ||
| sys_msg_generator, | ||
| extend_sys_msg_meta_dicts=extend_sys_msg_meta_dicts, | ||
| ) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems self.assistant_agent and self.user_agent have not yet been assigned, which will lead to an AttributeError?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, Both self.assistant_agent and self.user_agent have not yet been initialized with ChatAgent objects at this point.
| init_assistant_sys_msg = assistant_agent.system_message | ||
| init_user_sys_msg = user_agent.system_message | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assistant_agent.system_message and user_agent.system_message could be None here, also lead to AttributeError
| Hi @ChenziqiAdam , Hope you're doing well! Just wanted to check in on this PR. It looks like there's some feedback that needs to be addressed, along with some failing in pre-commit checks. Please let us know if you have any questions or need a hand with anything. We're looking forward to getting this merged! Cheers | 
| Apologies for the delay — I’ve been a bit busy recently. I’ll work on this PR early next month. Thank you for your patience and attention. | 
| No worries at all, @ChenziqiAdam , and thanks for the heads-up! | 
Description
Describe your changes in detail (optional if the linked issue already contains a detailed description of the changes).
Checklist
Go over all the following points, and put an
xin all the boxes that apply.Fixes #issue-numberin the PR description (required)pyproject.tomlanduv lockIf you are unsure about any of these, don't hesitate to ask. We are here to help!