atrium-rag 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- atrium/__init__.py +43 -0
- atrium/adapters.py +798 -0
- atrium/bm25.py +178 -0
- atrium/cli.py +1478 -0
- atrium/config.py +570 -0
- atrium/embedder_config.py +121 -0
- atrium/errors.py +39 -0
- atrium/healthcheck.py +51 -0
- atrium/job_store.py +371 -0
- atrium/layout_adapter.py +265 -0
- atrium/local_embedder.py +149 -0
- atrium/local_store.py +394 -0
- atrium/main.py +1828 -0
- atrium/mime.py +212 -0
- atrium/models.py +75 -0
- atrium/ocr_adapter.py +305 -0
- atrium/pdf_backend.py +687 -0
- atrium/pipeline.py +269 -0
- atrium/py.typed +3 -0
- atrium/rerank_adapter.py +552 -0
- atrium/retrieval.py +629 -0
- atrium/security.py +246 -0
- atrium/setup.py +1306 -0
- atrium/smart_chunker.py +1271 -0
- atrium/tsr_adapter.py +102 -0
- atrium/ui.py +601 -0
- atrium/universal_parser.py +2314 -0
- atrium/vision_adapters.py +112 -0
- atrium/worker.py +311 -0
- atrium_rag-0.1.0.dist-info/METADATA +522 -0
- atrium_rag-0.1.0.dist-info/RECORD +35 -0
- atrium_rag-0.1.0.dist-info/WHEEL +5 -0
- atrium_rag-0.1.0.dist-info/entry_points.txt +2 -0
- atrium_rag-0.1.0.dist-info/licenses/LICENSE +21 -0
- atrium_rag-0.1.0.dist-info/top_level.txt +1 -0
atrium/__init__.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""
|
|
2
|
+
atrium — RAG ingestion engine.
|
|
3
|
+
|
|
4
|
+
A FastAPI-based document ingestion service that parses, chunks, embeds,
|
|
5
|
+
and stores PDFs, Office documents, HTML, Markdown, and more into a
|
|
6
|
+
vector database (Qdrant or pgvector). Retrieval is via a unified
|
|
7
|
+
helper that supports optional reranking, parent-child chunking, and
|
|
8
|
+
Dense retrieval.
|
|
9
|
+
|
|
10
|
+
Quickstart::
|
|
11
|
+
|
|
12
|
+
from atrium.pipeline import run_ingestion
|
|
13
|
+
from atrium.adapters import QdrantAdapter
|
|
14
|
+
from atrium.embedder_config import build_embedder
|
|
15
|
+
|
|
16
|
+
db = QdrantAdapter(host="localhost", port=6333)
|
|
17
|
+
embedder = build_embedder()
|
|
18
|
+
db.ensure_collection("documents", embedder.dimension)
|
|
19
|
+
# ... pass db and embedder into run_ingestion(...) ...
|
|
20
|
+
|
|
21
|
+
The version constant is the single source of truth — packaged in
|
|
22
|
+
pyproject.toml and exposed here for runtime introspection.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
from __future__ import annotations
|
|
26
|
+
|
|
27
|
+
__version__ = "0.1.0"
|
|
28
|
+
|
|
29
|
+
# Load `.env` into the process environment exactly once, here — before
|
|
30
|
+
# any submodule reads a setting. This is the fix for a real hole:
|
|
31
|
+
# `uvicorn atrium.main:app` used to ignore `.env` completely (there is
|
|
32
|
+
# no python-dotenv dependency), so an operator who set `API_KEY` in
|
|
33
|
+
# `.env` and booted the server with uvicorn directly got a server with
|
|
34
|
+
# no authentication on any route.
|
|
35
|
+
#
|
|
36
|
+
# Importing `atrium.config` here — rather than in each submodule —
|
|
37
|
+
# guarantees the load happens first no matter which module the
|
|
38
|
+
# operator imported.
|
|
39
|
+
from atrium.config import load_env_file as _load_env_file
|
|
40
|
+
|
|
41
|
+
_load_env_file()
|
|
42
|
+
|
|
43
|
+
__all__ = ["__version__"]
|