21 lines
512 B
Python
21 lines
512 B
Python
from pydantic import BaseModel
|
|
|
|
|
|
class MemoryDecision(BaseModel):
|
|
should_store: bool
|
|
memory_type: str
|
|
summary: str
|
|
importance: float
|
|
metadata: dict[str, str] = {}
|
|
|
|
|
|
class MemoryPolicy:
|
|
async def classify(self, summary: str, task_id: str) -> MemoryDecision:
|
|
return MemoryDecision(
|
|
should_store=False,
|
|
memory_type="event",
|
|
summary=summary,
|
|
importance=0.0,
|
|
metadata={"task_id": task_id, "source": "stub_policy"},
|
|
)
|