-
Notifications
You must be signed in to change notification settings - Fork 168
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
finegrained activities config customization #24
base: main
Are you sure you want to change the base?
Conversation
f"Write a new short tweet (under {self.max_length} chars), consistent with the above, " | ||
f"but not repeating old tweets. Avoid hashtags or repeated phrases." | ||
) | ||
num_activities_to_fetch = 10 |
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.
is this more like the default num_activities_to_fetch?
num_activities_to_fetch = 10 | ||
if "activity_constraints" in being.configs and \ | ||
"activities_config" in being.configs["activity_constraints"] and \ | ||
"PostTweetActivity" in being.configs["activity_constraints"]["activities_config"]: |
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.
nit: will this be a cleaner way to do this? being.config.get('activity_constraints', {}).get('activities_config', {}).get('PostTweetActivity')
"activities_config" in being.configs["activity_constraints"] and \ | ||
"PostTweetActivity" in being.configs["activity_constraints"]["activities_config"]: | ||
activities_config = being.configs["activity_constraints"]["activities_config"]["PostTweetActivity"] | ||
system_prompt = constraints_cfg["PostTweetActivity"].get("system_prompt", system_prompt) |
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.
I may have missed this, where is constraints_cfg
initially defined?
system_prompt = activities_config.get("system_prompt", system_prompt) | ||
num_activities_to_fetch = activities_config.get("num_activities_to_fetch", num_activities_to_fetch) | ||
self.system_prompt = system_prompt | ||
self.num_activities_to_fetch = num_activities_to_fetch |
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 like this duplicates the logic from the same function in post_tweet, and it this brought up another question of how we should cleanly manage customized config vs default config for each skill. imo we don't need to solve it here but something interesting to think about.
@yoheinakajima what do 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.
looks like https://github.com/pippinlovesyou/pippin/pull/29/files addressed some of this
Description
Was looking into why Twitter posts all sound the same, and the causes were:
Please craft a short tweet (under 280 chars) that references these memories, reflects the personality and objectives, and ensures it's not repetitive or dull. Keep it interesting, cohesive, and mindful of the overall tone.', can do
Please craft a short tweet (under 140 chars) that references these memories, reflects the personality and objectives, and ensures it's not repetitive or dull. Keep it interesting, cohesive, and mindful of the overall tone. No emojis. Do NOT ask questions, just make statements.`Instead of hardcoding, I looked into customizing these attributes via the config, at the moment it looks like the activity_constraints.json is the best place for it, but let me know if there are better places to configure this.
Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
system_prompt
ornum_activities_to_fetch
attribute from https://github.com/peanutcocktail/pippin/blob/main/my_digital_being/config_sample/activity_constraints.json#L68-L72 or https://github.com/peanutcocktail/pippin/blob/main/my_digital_being/config_sample/activity_constraints.json#L73-L77Checklist: