fix: restore missing policy_md definition in format_obs
Browse files- server/app.py +5 -0
server/app.py
CHANGED
|
@@ -148,6 +148,11 @@ def build_custom_ui():
|
|
| 148 |
})
|
| 149 |
df_corpus = pd.DataFrame(corpus_data) if corpus_data else pd.DataFrame(columns=["ID", "Content", "System Action"])
|
| 150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
# 3. Simple Stats & Reward History
|
| 152 |
history = obs.get("info", {}).get("rewards_history", [])
|
| 153 |
df_reward = pd.DataFrame({
|
|
|
|
| 148 |
})
|
| 149 |
df_corpus = pd.DataFrame(corpus_data) if corpus_data else pd.DataFrame(columns=["ID", "Content", "System Action"])
|
| 150 |
|
| 151 |
+
# 2. Policy List (Markdown)
|
| 152 |
+
policy_md = "### 📜 Active Governance Framework\n"
|
| 153 |
+
for p in obs.get("current_policies", []):
|
| 154 |
+
policy_md += f"- **{p.get('id')}**: {p.get('text')}\n"
|
| 155 |
+
|
| 156 |
# 3. Simple Stats & Reward History
|
| 157 |
history = obs.get("info", {}).get("rewards_history", [])
|
| 158 |
df_reward = pd.DataFrame({
|