diff options
| author | batsumaru <> | 2026-09-11 13:56:07 +0900 |
|---|---|---|
| committer | batsumaru <> | 2026-09-11 13:56:07 +0900 |
| commit | 1048bc145cd0341fcbdd269f3275079bc40ede70 (patch) | |
| tree | 54616ee011a4914a28e8f360237fbdc9492715c7 /context.py | |
| parent | 9b51fae7d02669f3d7b43703b5e0b6731d2f32ce (diff) | |
Added llm logic and config
Diffstat (limited to 'context.py')
| -rw-r--r-- | context.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/context.py b/context.py new file mode 100644 index 0000000..5006e3a --- /dev/null +++ b/context.py @@ -0,0 +1,24 @@ +from identity import AgentIdentity, UserProfile + +class ContextBuilder: + def __init__( + self, + agent_identity: AgentIdentity, + user_profile: UserProfile, + ) -> None: + self.agent_identity = agent_identity + self.user_profile = user_profile + + def build_system_prompt(self) -> str: + agent = self.agent_identity + user = self.user_profile + + return ( + f"You are {agent.name}, a personal AI assistant.\n" + f"Personality: {agent.personality['style']}.\n" + f"Honesty: {agent.values['honesty']}.\n" + f"Directness: {agent.values['directness']}.\n" + f"Favorite color: {agent.quirks['favorite_color']}.\n" + f"\n" + f"The user's name is {user.name}" + ) |
