CatoG commited on
Commit ·
92d41c5
1
Parent(s): 3da1016
buxfixing
Browse files
app.py
CHANGED
|
@@ -1228,7 +1228,7 @@ def _step_qa(
|
|
| 1228 |
if influence_issues:
|
| 1229 |
for issue_msg in influence_issues:
|
| 1230 |
qa_result.issues.append(QAIssue(
|
| 1231 |
-
|
| 1232 |
message=issue_msg,
|
| 1233 |
owner="synthesizer",
|
| 1234 |
))
|
|
@@ -1703,6 +1703,12 @@ def _step_synthesize(
|
|
| 1703 |
|
| 1704 |
# Parse used_contributions traceability from synthesizer output
|
| 1705 |
used = parse_used_contributions(text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1706 |
state["used_contributions"] = used
|
| 1707 |
|
| 1708 |
# Strip the USED_CONTRIBUTIONS JSON block from the draft (user shouldn't see it)
|
|
|
|
| 1228 |
if influence_issues:
|
| 1229 |
for issue_msg in influence_issues:
|
| 1230 |
qa_result.issues.append(QAIssue(
|
| 1231 |
+
type="expert_influence",
|
| 1232 |
message=issue_msg,
|
| 1233 |
owner="synthesizer",
|
| 1234 |
))
|
|
|
|
| 1703 |
|
| 1704 |
# Parse used_contributions traceability from synthesizer output
|
| 1705 |
used = parse_used_contributions(text)
|
| 1706 |
+
|
| 1707 |
+
# Normalize keys: LLMs write display names ("Technical Expert") but we need
|
| 1708 |
+
# role keys ("technical") to match the structured_contributions dict.
|
| 1709 |
+
label_to_key = {v: k for k, v in AGENT_ROLES.items()}
|
| 1710 |
+
used = {label_to_key.get(k, k): v for k, v in used.items()}
|
| 1711 |
+
|
| 1712 |
state["used_contributions"] = used
|
| 1713 |
|
| 1714 |
# Strip the USED_CONTRIBUTIONS JSON block from the draft (user shouldn't see it)
|