llama-index-hypergraph
LlamaIndex retriever and chat memory backed by the Temporal Hypergraph Engine.
pip install llama-index-hypergraph
docker run -d -p 50051:50051 ghcr.io/divyansh151005/temporal-hypergraph-server
For development from a clone: pip install -e integrations/python-client -e integrations/llamaindex.
from llama_index_hypergraph import TemporalHypergraph
memory = TemporalHypergraph(api_key="your_key") # a TemporalHypergraphChatMemory on session "default"
memory = TemporalHypergraph(api_key="your_key", session_id="user-42")
The server address comes from endpoint= or $HYPERGRAPH_ENDPOINT (default
localhost:50051).
Retriever
from llama_index.core.query_engine import RetrieverQueryEngine
from llama_index_hypergraph import TemporalHypergraphRetriever
retriever = TemporalHypergraphRetriever(
known_entities=["org:acme", "org:beta"], # default linker: label match in the query
k_hops=3,
as_of=1700000000, # facts valid at this instant (default now)
)
engine = RetrieverQueryEngine.from_args(retriever, llm=llm)
- Seeds come from
entity_linker(query)(pass your own callable for NER or fuzzy matching), plusseed_entitiesandsession:<session_id>. embed_model(a LlamaIndexBaseEmbeddingor LangChain-style embedder) re-ranks results by similarity; with no seeds the retriever falls back to global similarity search.- Each
TextNodecarriesevent_type,entities,valid_from,valid_toandhyperedge_idmetadata.
Chat memory
TemporalHypergraphChatMemory is a BaseMemory. get(input=...) returns the
recent history (history_limit=), preceded by a system message listing
relevant facts reached within k_hops of the session. It uses the same
storage scheme as langchain-hypergraph, so either framework can read a
session written by the other.
Tests
cargo build --release -p grpc-server # for the live tests; they skip otherwise
pytest integrations/llamaindex
Metadata
Release files for llama-index-hypergraph 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_index_hypergraph-2.0.0.tar.gz | 9.0 kB | Without provenance | Details for llama_index_hypergraph-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_hypergraph-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_hypergraph-2.0.0-py3-none-any.whl |
Total release size: 16.7 kB
Release files / llama_index_hypergraph-2.0.0.tar.gz
| Download URL | llama_index_hypergraph-2.0.0.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9e09b5d7bf40646109f956426df969cc46b3a3de3b04ef172a0cf382daba452
|
|
BLAKE2b-256 checksum How to use checksums |
6f2f16efce65470c15c32682e3fe50c27004716b021fdca61cb0672a65270b8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.13
|
Release files / llama_index_hypergraph-2.0.0-py3-none-any.whl
| Download URL | llama_index_hypergraph-2.0.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1413242d9c3998ec1cef68201076f83137f79c9d30ac6b5401292e3a90160d65
|
|
BLAKE2b-256 checksum How to use checksums |
78fc996bb02c46ac46e77d56b3ae6cc1003fa0bd186b62796478d0afd015cb4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.13
|
Security for llama-index-hypergraph 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.