Metadata-Version: 2.4
Name: huri-module-rag
Version: 0.1.0
Summary: HuRI module: Retrieval-augmented answers with long-term memory (Qdrant + an OpenAI-compatible LLM), and the question aggregator
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: huri-core[server]<0.5,>=0.4
Requires-Dist: huri-events<0.2,>=0.1
Provides-Extra: rag
Requires-Dist: numpy<2,>=1.26; extra == "rag"
Requires-Dist: httpx<0.28,>=0.27.2; extra == "rag"
Requires-Dist: qdrant-client<1.19,>=1.18; extra == "rag"
Requires-Dist: sentence-transformers<3.3,>=3.2.1; extra == "rag"
Requires-Dist: pypdf<5.2,>=5.1; extra == "rag"
Requires-Dist: semantic_chunker==0.2.0; extra == "rag"
Requires-Dist: pydantic>=2; extra == "rag"

# huri-module-rag

Retrieval-augmented answers with long-term memory (Qdrant + an OpenAI-compatible LLM), and the question aggregator.

| Module | Topics | What it does |
|---|---|---|
| `rag` | `huri.question` → `huri.token` | Answers questions from memory with an LLM, streaming tokens |
| `qag` | `huri.partial_question` → `huri.question` | Joins a transcript and its emotion into a question |

```sh
pip install -e 'packages/huri-module-rag[rag]'   # from a huri-modules checkout, next to huri-core and huri-events
HURI_MODULES=rag,qag ...   # enable it on the server
```

`rag` and the ingestion and memory tools (`python -m huri_rag.ingestion`,
`memory_inspect`, `memory_maintenance`) need the `rag` extra (Qdrant client,
sentence-transformers, httpx, pypdf, semantic_chunker); `qag` only joins events
and needs none of it, so a host that runs `qag` alone installs the package
without the extra (`[tool.huri-modules.extras]` in `pyproject.toml`; `huri hub
install` and `scripts/install_local.sh` add it). Hardware pins of `rag`:
`requirements-amd.rag.txt` (install it before the package).

A distribution of
[huri-modules](https://github.com/Lucy-Robotics/huri-modules), versioned in its
`pyproject.toml` (see RELEASING.md there). It depends on `huri-core` and
`huri-events`, which are not on PyPI: without a checkout, install them from git
in the same pip command, so pip never looks them up on an index:

```sh
ref=0.1.0   # a huri-modules release tag
core=0.4.0  # HURI_CORE_REF in that release's versions.env
pip install \
  "huri-core[server] @ git+https://github.com/Lucy-Robotics/huri-core.git@$core" \
  "huri-events @ git+https://github.com/Lucy-Robotics/huri-modules.git@$ref#subdirectory=packages/huri-events" \
  "huri-module-rag[rag] @ git+https://github.com/Lucy-Robotics/huri-modules.git@$ref#subdirectory=packages/huri-module-rag"
```
