| 7 | |
| 8 | |
| 9 | def _print_results(title: str, result: dict) -> None: |
| 10 | print(f"\n[SQLITE] RETRIEVED - {title}") |
| 11 | print(" Categories:") |
| 12 | for cat in result.get("categories", [])[:3]: |
| 13 | print(f" - {cat.get('name')}: {(cat.get('summary') or cat.get('description', ''))[:80]}...") |
| 14 | print(" Items:") |
| 15 | for item in result.get("items", [])[:3]: |
| 16 | print(f" - [{item.get('memory_type')}] {item.get('summary', '')[:100]}...") |
| 17 | if result.get("resources"): |
| 18 | print(" Resources:") |
| 19 | for res in result.get("resources", [])[:3]: |
| 20 | print(f" - [{res.get('modality')}] {res.get('url', '')[:80]}...") |
| 21 | |
| 22 | |
| 23 | async def main(): |