40 lines
1.3 KiB
Python
40 lines
1.3 KiB
Python
|
|
"""Compression report structures for LLMCompress."""
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from dataclasses import dataclass, field
|
||
|
|
from typing import Any, Dict, List, Optional
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass
|
||
|
|
class CompressionReport:
|
||
|
|
"""Symbolic compression report for a single LLM interaction or session."""
|
||
|
|
|
||
|
|
# Raw interaction(s)
|
||
|
|
interactions: List[Dict[str, Any]] = field(default_factory=list)
|
||
|
|
|
||
|
|
# Symbolic outputs from LAIN / GlyphOS
|
||
|
|
fused_symbol: Optional[Dict[str, Any]] = None
|
||
|
|
diagnostics: Optional[Dict[str, Any]] = None
|
||
|
|
cognition_trace: Optional[List[Dict[str, Any]]] = None
|
||
|
|
|
||
|
|
# Glyph-related summaries
|
||
|
|
glyph_ids: List[str] = field(default_factory=list)
|
||
|
|
glyph_resonance: Optional[Dict[str, Any]] = None
|
||
|
|
|
||
|
|
# Free-form notes / tags
|
||
|
|
tags: List[str] = field(default_factory=list)
|
||
|
|
metadata: Dict[str, Any] = field(default_factory=dict)
|
||
|
|
|
||
|
|
def to_dict(self) -> Dict[str, Any]:
|
||
|
|
return {
|
||
|
|
"interactions": self.interactions,
|
||
|
|
"fused_symbol": self.fused_symbol,
|
||
|
|
"diagnostics": self.diagnostics,
|
||
|
|
"cognition_trace": self.cognition_trace,
|
||
|
|
"glyph_ids": self.glyph_ids,
|
||
|
|
"glyph_resonance": self.glyph_resonance,
|
||
|
|
"tags": self.tags,
|
||
|
|
"metadata": self.metadata,
|
||
|
|
}
|