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

Function _daily_note_classification_payload

agents/reading-agent/main.py:2441–2461  ·  view source on GitHub ↗
(
    blocks: List[Dict[str, str]],
    user_profile: Optional[Dict[str, Any]] = None,
)

Source from the content-addressed store, hash-verified

2439
2440def _daily_note_classification_payload(
2441 blocks: List[Dict[str, str]],
2442 user_profile: Optional[Dict[str, Any]] = None,
2443) -> str:
2444 papers = [
2445 {
2446 "marker": block["marker"],
2447 "title": block["title"],
2448 "current_category": block["category"],
2449 "summary": block["summary"][:700],
2450 }
2451 for block in blocks
2452 ]
2453 return json.dumps(
2454 {
2455 "allowed_categories": DAILY_NOTE_CATEGORY_OPTIONS,
2456 "user_profile": _daily_note_profile_payload(user_profile),
2457 "papers": papers,
2458 },
2459 ensure_ascii=False,
2460 )
2461
2462
2463def _parse_daily_note_classification_response(text: str, markers: set[str]) -> Dict[str, str]:
2464 content = str(text or "").strip()

Callers 1

Calls 1

Tested by

no test coverage detected