-
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
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. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
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
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
x
in all the boxes that apply.Fixes #issue-number
in the PR description (required)pyproject.toml
anduv lock
If you are unsure about any of these, don't hesitate to ask. We are here to help!