feat: add memory document model and parsing functionality for markdown handling

This commit is contained in:
Anish Sarkar 2026-05-20 13:20:05 +05:30
parent fe07de3f9c
commit a0ff86e0e8
5 changed files with 241 additions and 37 deletions

View file

@ -13,6 +13,7 @@ from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession
from app.db import SearchSpace, User
from app.services.memory.document import parse_memory_document, render_memory_document
from app.services.memory.prompts import (
TEAM_MEMORY_EXTRACT_PROMPT,
USER_MEMORY_EXTRACT_PROMPT,
@ -184,6 +185,8 @@ async def save_memory(
warnings=warnings,
)
next_content = render_memory_document(parse_memory_document(next_content))
try:
_set_memory(target, normalized, next_content)
session.add(target)