Create an empty profile payload with the full schema.
(user_id: str)
| 123 | COLD_START_MUST_READ_NOTE = "说明:普通“冷启动”会保留这份必读清单;只有“重新冷启动”才会重置。" |
| 124 | CLEAR_READING_LIST_HINT = ' "清空精读列表"' |
| 125 | |
| 126 | |
| 127 | def build_empty_profile(user_id: str) -> Dict[str, Any]: |
| 128 | """Create an empty profile payload with the full schema.""" |
| 129 | now = datetime.now().isoformat() |
| 130 | return { |
| 131 | "user_id": user_id, |
| 132 | "version": "0.1", |
| 133 | "created_at": now, |
| 134 | "updated_at": now, |
| 135 | "core_directions": {}, |
| 136 | "methodology_preferences": {}, |
| 137 | "must_read": { |
| 138 | "authors": [], |
| 139 | "institutions": [], |
| 140 | "keywords": [], |
| 141 | }, |
| 142 | "topic_weights": {}, |
| 143 | "author_heat": {}, |
| 144 | "institution_heat": {}, |
| 145 | "interest_vector": [], |
| 146 | "taste_profile": {}, |
| 147 | "reading_history": [], |
| 148 | "behavior_logs": [], |
| 149 | "drift_state": build_default_drift_state(now), |
| 150 | } |
| 151 |
no test coverage detected