MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / build_empty_profile

Function build_empty_profile

agents/coldstart-agent/main.py:125–148  ·  view source on GitHub ↗

Create an empty profile payload with the full schema.

(user_id: str)

Source from the content-addressed store, hash-verified

123
124
125def build_empty_profile(user_id: str) -> Dict[str, Any]:
126 """Create an empty profile payload with the full schema."""
127 now = datetime.now().isoformat()
128 return {
129 "user_id": user_id,
130 "version": "0.1",
131 "created_at": now,
132 "updated_at": now,
133 "core_directions": {},
134 "methodology_preferences": {},
135 "must_read": {
136 "authors": [],
137 "institutions": [],
138 "keywords": [],
139 },
140 "topic_weights": {},
141 "author_heat": {},
142 "institution_heat": {},
143 "interest_vector": [],
144 "taste_profile": {},
145 "reading_history": [],
146 "behavior_logs": [],
147 "drift_state": build_default_drift_state(now),
148 }
149
150
151def ensure_profile_shape(profile: Optional[Dict[str, Any]], user_id: str) -> Dict[str, Any]:

Callers 3

ensure_profile_shapeFunction · 0.70
cold_startFunction · 0.70

Calls 2

nowMethod · 0.80

Tested by

no test coverage detected