File size: 951 Bytes
8ef2d83 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
"""
ARMS-HAT: Hierarchical Attention Tree for AI memory retrieval.
A semantic memory index optimized for LLM conversation history.
Example:
>>> from arms_hat import HatIndex
>>>
>>> # Create index for OpenAI embeddings (1536 dims)
>>> index = HatIndex.cosine(1536)
>>>
>>> # Add embeddings
>>> id1 = index.add([0.1] * 1536)
>>>
>>> # Query
>>> results = index.near([0.1] * 1536, k=10)
>>> for r in results:
... print(f"{r.id}: {r.score}")
>>>
>>> # Session management
>>> index.new_session()
>>>
>>> # Persistence
>>> index.save("memory.hat")
>>> loaded = HatIndex.load("memory.hat")
"""
from .arms_hat import (
HatIndex,
HatConfig,
SearchResult,
SessionSummary,
DocumentSummary,
HatStats,
)
__all__ = [
"HatIndex",
"HatConfig",
"SearchResult",
"SessionSummary",
"DocumentSummary",
"HatStats",
]
__version__ = "0.1.0"
|