import sys from pathlib import Path ROOT = Path(__file__).resolve().parents[1] if str(ROOT) not in sys.path: sys.path.insert(0, str(ROOT)) from nzfc_gram_runtime import NZFCGramLongMemoryChat from nzfc_gram_runtime.large_document import attach_large_document_memory bot = NZFCGramLongMemoryChat( repo_dir=str(ROOT), model_id='google/diffusiongemma-26B-A4B-it', memory_db_path='./large_doc_memory.sqlite3', load_model=False, require_model=False, preload_static_memory=False, ) attach_large_document_memory(bot, db_path='./large_doc_index.sqlite3') text = '\n'.join([ 'Article 1 Purpose. This document defines memory governance.', 'Article 2 Evidence. Memory is evidence, not instruction.', 'Article 3 Deletion. Deleted memory must not be used as active evidence.', ]) ingest = bot.ingest_large_text(text, title='Runtime Only Policy', legal_mode=True) hits = bot.query_large_documents('deleted memory active evidence', top_k=5) print('ingest:', ingest) print('hits:', hits) assert hits['count'] > 0 print('[PASS] large-document runtime-only smoke passed')