feat: add random note text length to user generator

This commit is contained in:
Victor Westerlund 2024-11-14 14:22:41 +01:00
parent 3dc25ee994
commit a0f542cb21

View file

@ -17,6 +17,10 @@ USER_TEMPLATE_FILE = Path.cwd() / "data" / "users_template.json"
CONFIG_POST_MIN_COOLDOWN = 300 # 10 minutes CONFIG_POST_MIN_COOLDOWN = 300 # 10 minutes
CONFIG_POST_MAX_COOLDOWN = 259200 # 48 hours CONFIG_POST_MAX_COOLDOWN = 259200 # 48 hours
CONFIG_TEXT_LENGTH_AVERAGE_MIN = 7
CONFIG_TEXT_LENGTH_AVERAGE_MAX = 30
CONFIG_TEXT_LENGTH_AVERAGE_FLUX = 10
# Available preferred reactions # Available preferred reactions
REACTIONS = [ REACTIONS = [
"", "",
@ -91,6 +95,10 @@ class GenerateUser():
for relationship in RelationshipType: for relationship in RelationshipType:
self.config["actions"]["reacts"]["prefrerred_reaction"][relationship.value] = random.choice(REACTIONS) self.config["actions"]["reacts"]["prefrerred_reaction"][relationship.value] = random.choice(REACTIONS)
# Generate random note text length averages
self.config["note"]["text_length"]["flux"] = random.randint(0, CONFIG_TEXT_LENGTH_AVERAGE_FLUX)
self.config["note"]["text_length"]["average"] = random.randint(CONFIG_TEXT_LENGTH_AVERAGE_MIN, CONFIG_TEXT_LENGTH_AVERAGE_MAX)
# Set random personality tone # Set random personality tone
for x in NoteTones: for x in NoteTones:
self.config["personality"]["tone"]["probability"][x.value] = random.randint(0, 100) self.config["personality"]["tone"]["probability"][x.value] = random.randint(0, 100)