summaryrefslogtreecommitdiff
path: root/identity.py
diff options
context:
space:
mode:
authorbatsumaru <>2026-09-11 13:56:07 +0900
committerbatsumaru <>2026-09-11 13:56:07 +0900
commit1048bc145cd0341fcbdd269f3275079bc40ede70 (patch)
tree54616ee011a4914a28e8f360237fbdc9492715c7 /identity.py
parent9b51fae7d02669f3d7b43703b5e0b6731d2f32ce (diff)
Added llm logic and config
Diffstat (limited to 'identity.py')
-rw-r--r--identity.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/identity.py b/identity.py
new file mode 100644
index 0000000..9b4faa0
--- /dev/null
+++ b/identity.py
@@ -0,0 +1,34 @@
+from dataclasses import dataclass
+import tomllib
+
+@dataclass
+class AgentIdentity:
+ name: str
+ personality: dict[str, str]
+ values: dict[str, bool]
+ quirks: dict[str, str]
+
+@dataclass
+class UserProfile:
+ name: str
+ preferences: dict[str, str]
+
+def load_agent_identity(path: str) -> AgentIdentity:
+ with open(path, "rb") as file:
+ data = tomllib.load(file)
+
+ return AgentIdentity(
+ name=data["name"],
+ personality=data["personality"],
+ values=data["values"],
+ quirks=data["quirks"],
+ )
+
+def load_user_profile(path: str) -> UserProfile:
+ with open(path, "rb") as file:
+ data = tomllib.load(file)
+
+ return UserProfile(
+ name=data["name"],
+ preferences=data["preferences"],
+ )