chat_partner_builder
Provides a set of functions and data structures for generating synthetic chat partners via heuristics.
This module allows you to generate synthetic chat partners based on various characteristics such as age range, cognitive style, communication style, tech savviness, social media usage, political leaning, religious beliefs, interpersonal skills, hobbies, and dietary preferences. It provides a flexible framework for creating diverse chat partners for testing, research, or other purposes.
Example
Attributes
AgeRangeType
module-attribute
AgeRangeType = Literal[
"Newborn",
"Toddler",
"Preschooler",
"Early Childhood",
"Middle Childhood",
"Preteen",
"Teenager",
"Young Adult",
"Adult",
"Middle-Aged Adult",
"Senior Adult",
"Elderly",
]
COGNITIVE_STYLE_DESC
module-attribute
COGNITIVE_STYLE_DESC = "The manner in which an individual processes information, thinks, and approaches problem-solving. It encompasses their unique approach to reasoning, creativity, organization, and adaptability, reflecting their thought processes and intellectual preferences. Cognitive styles may evolve with age, influencing how individuals perceive and engage with the world around them"
COMMUNICATION_STYLE_DESC
module-attribute
COMMUNICATION_STYLE_DESC = "The manner in which an individual communicates, conveying their unique approach to expressing thoughts and emotions."
CognitiveStyleType
module-attribute
CommunicationStyleType
module-attribute
CommunicationStyleType = Literal[
"simple",
"assertive",
"emotive",
"informal",
"formal",
"verbose",
"rude",
"abusive",
"none",
]
DIETARY_PREFERENCES_DESC
module-attribute
DIETARY_PREFERENCES_DESC = "The dietary preferences of an individual, encompassing their dietary restrictions and preferences."
DietaryPreferencesType
module-attribute
EducationLevelType
module-attribute
EducationLevelType = Literal[
"none",
"currently in public school",
"currently in private school",
"did not finish high school",
"completed GED",
"completed high school",
"completed trade school",
"completed bachelors degree",
"completed masters degree",
"completed PhD",
]
FAMILY_DESC
module-attribute
FAMILY_DESC = "The fitness routine of an individual, encompassing their exercise habits and preferences."
FITNESS_ROUTINE_DESC
module-attribute
FITNESS_ROUTINE_DESC = "The fitness routine of an individual, encompassing their exercise habits and preferences."
FamilyType
module-attribute
FamilyType = Literal[
"living with both parents",
"living in single-parent situation",
"living in foster care",
"single no kids",
"single parent",
"married no kids",
"married parent",
"divorced no kids",
"divorced parent",
"separated no kids",
"separated parent",
]
HOBBIES_DESC
module-attribute
HOBBIES_DESC = "The hobbies and interests of an individual, encompassing their recreational activities and pursuits."
HobbiesType
module-attribute
HobbiesType = Literal[
"3d printing",
"aerobics",
"animation",
"archery",
"astronomy",
"baking",
"baking",
"beatboxing",
"biking",
"bird watching",
"blogging",
"board games",
"book clubs",
"boxing",
"calligraphy",
"candle making",
"canoeing",
"chess",
"collecting (stamps, coins, etc.)",
"community service",
"cooking",
"crafting",
"creative writing",
"crocheting",
"cross-country skiing",
"dance (various styles)",
"dance",
"darts",
"digital art",
"digital music production",
"drawing",
"drone racing",
"electronic sports (esports)",
"environmental activism",
"escape rooms",
"fencing",
"fishing",
"foraging",
"game development",
"gardening",
"genealogy",
"geocaching",
"glassblowing",
"golf",
"graphic design",
"hackathons",
"hang gliding",
"hiking",
"historical reenactment",
"home brewing",
"home decoration",
"horseback riding",
"ice climbing",
"ice fishing",
"ice skating",
"jewelry making",
"kayaking",
"kite flying",
"knitting",
"language learning",
"larping (live action role playing)",
"leather working",
"light woodworking",
"listening to music",
"magic and illusion",
"magic tricks",
"marathon training",
"martial arts",
"meditation",
"metal detecting",
"model building",
"model railroading",
"mountain biking",
"nature walks",
"origami",
"painting",
"paragliding",
"parkour",
"photography editing",
"photography",
"pilates",
"play-dough",
"playing a musical instrument",
"podcasting",
"poetry writing",
"pottery",
"programming",
"puzzles",
"quilting",
"radio hosting",
"rc vehicles (cars, boats, planes)",
"reading",
"restoring furniture",
"robotics",
"rock climbing",
"rock collecting",
"rollerblading",
"running",
"sailing",
"scrapbooking",
"scuba diving",
"sewing",
"simple baking",
"simple board games",
"simple crafting",
"simple gardening",
"simple model building",
"simple painting",
"simple robotics",
"singing",
"skateboarding",
"skiing",
"skydiving",
"snorkeling",
"snowboarding",
"snowshoeing",
"soap making",
"stand-up comedy",
"star gazing",
"sudoku",
"surfing",
"swimming",
"tabletop role-playing games",
"tai chi",
"tea tasting",
"theater (acting, directing)",
"theater appreciation",
"traveling",
"triathlon training",
"urban exploration",
"urban gardening",
"video gaming",
"video production",
"volunteering",
"walking",
"watching movies",
"website development",
"whittling",
"wildlife photography",
"wine making",
"woodworking",
"writing",
"yacht racing",
"yo-yo",
"yoga",
"zumba",
"none",
]
INTERPERSONAL_SKILLS_DESC
module-attribute
INTERPERSONAL_SKILLS_DESC = "The manner in which an individual interacts with others, encompassing their ability to communicate, collaborate, and resolve conflict."
InterpersonalSkillsType
module-attribute
InterpersonalSkillsType = Literal[
"active-listener",
"aloof",
"assertive",
"attentive",
"charismatic",
"collaborative",
"compassionate",
"confrontational",
"curious",
"dependable",
"diplomatic",
"discouraging",
"disrespectful",
"empathetic",
"encouraging",
"flexible",
"honest",
"impatient",
"insensitive",
"intransigence",
"judgmental",
"manipulative",
"motivating",
"negotiative",
"open-minded",
"patient",
"persuasive",
"provocative",
"respectful",
"rigid",
"stubborn",
"tactful",
"uncooperative",
"understanding",
"none",
]
POLITICAL_LEANING_DESC
module-attribute
POLITICAL_LEANING_DESC = "The political alignment or ideology of an individual, representing their beliefs and views on political issues."
PoliticalLeaningType
module-attribute
RELIGIOUS_BELIEFS_DESC
module-attribute
RELIGIOUS_BELIEFS_DESC = "The religious beliefs or faith system of an individual, encompassing their adherence to specific religious traditions or their lack of religious belief."
ReligiousBeliefsType
module-attribute
ReligiousBeliefsType = Literal[
"christianity",
"islam",
"judaism",
"buddhism",
"hinduism",
"atheist",
"none",
]
SOCIAL_MEDIA_DESC
module-attribute
SOCIAL_MEDIA_DESC = "The extent to which an individual engages with and utilizes social media platforms and online networking."
SocialMediaUsageType
module-attribute
TECH_SAVVINESS_DESC
module-attribute
TECH_SAVVINESS_DESC = "The level of technological proficiency and familiarity exhibited by an individual, encompassing their comfort and competence with digital technologies."
VicesType
module-attribute
VicesType = Literal[
"aggressiveness",
"cynicism",
"dishonesty",
"envy",
"excessive drinking",
"excessive gaming",
"excessive use of social media",
"gambling",
"gluttony (excessive indulgence)",
"gossiping",
"hoarding",
"hypocrisy",
"impatience",
"impulsiveness",
"indifference",
"ingratitude",
"insensitivity",
"intolerance",
"irresponsibility",
"jealousy",
"lack of empathy",
"laziness",
"materialism",
"narcissism",
"neglecting health",
"obsessiveness",
"overeating",
"overspending",
"overworking",
"perfectionism",
"pessimism",
"prejudice",
"procrastination",
"recklessness",
"sarcasm",
"selfishness",
"sloth (extreme laziness)",
"smoking",
"stubbornness",
"vanity",
"none",
]
Classes
ChatPartnerBuilder
Bases: BaseModel
Heuristics-based fake chat partner
Attributes
Functions
generate
classmethod
generate(
num_hobbies=3, num_vices=2, age_min=5, age_max=85
) -> ChatPartnerBuilder
Generate a fake chat partner
Functions
get_age_range
get_age_range(age: int) -> AgeRangeType
Returns the age range based on the given age.
Parameters:
-
age
(int
) –The age to determine the age range for.
Returns:
-
AgeRangeType
(AgeRangeType
) –The age range corresponding to the given age.
Raises:
-
ValueError
–If the given age is invalid.
meets_age_requirements
meets_age_requirements(
age: int,
min_age_range: AgeRangeType,
max_age_range: AgeRangeType = "Elderly",
) -> bool
Check if the given age meets the specified age requirements.
Parameters:
-
age
(int
) –The age to be checked.
-
min_age_range
(AgeRangeType
) –The minimum age range to be considered.
-
max_age_range
(AgeRangeType
, default:'Elderly'
) –The maximum age range to be considered. Defaults to “Elderly”.
Returns:
-
bool
(bool
) –True if the age meets the requirements, False otherwise.