Files
Orchestrator/privat/NoteGraph/ingestion/enrichment/models.py
ankn a5f8fb49ab Migrate all repos into monorepo context folders
Bahn: aisupport, Analyse-O2C-C2S, awesome-bahn-mcp-servers, beam-mcp,
      Confluence_Bot, db-planet-mcp-server, O2C-Harness, project-audit,
      Projekt-KIQ-HP, teamlandkarte-mcp
Dhive: Jury-Voting
Privat: CV, NoteGraph (NOTE: NoteGraph needs complete redo after consolidation)
Shared: AI-Orchestrator, OrgMyLife, power_skills_and_more
Shared/references: symphony (read-only)

Bahn repos remain available as independent remotes - this monorepo
pulls them in via subtree, the originals are untouched.
2026-06-30 20:39:52 +02:00

38 lines
1.1 KiB
Python

"""Pydantic models for LLM enrichment responses.
Defines the structured output format expected from the enrichment agent:
entities, action items, and the overall enrichment result.
"""
from typing import Literal
from pydantic import BaseModel, Field
class Entity(BaseModel):
"""A detected entity in the document text."""
type: Literal["person", "project", "date", "action_item"]
value: str
confidence: float = Field(ge=0.0, le=1.0)
position: int | None = None # character offset in source text
class ActionItem(BaseModel):
"""An extracted action item / task."""
description: str
assignee: str | None = None
deadline: str | None = None # ISO 8601 date string
class EnrichmentResult(BaseModel):
"""Complete enrichment output from the LLM."""
title: str
category: Literal["meeting", "project", "decision", "inbox"]
tags: list[str] = Field(default_factory=list)
entities: list[Entity] = Field(default_factory=list)
action_items: list[ActionItem] = Field(default_factory=list)
summary: str | None = None