From 1048bc145cd0341fcbdd269f3275079bc40ede70 Mon Sep 17 00:00:00 2001 From: batsumaru <> Date: Fri, 11 Sep 2026 13:56:07 +0900 Subject: Added llm logic and config --- context.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 context.py (limited to 'context.py') 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}" + ) -- cgit v1.3