feat(rag): hybrid FTS+vector retrieval and multi-format ingestion — name-your-tool questions find the right document
This commit is contained in:
+10
-2
@@ -1,14 +1,22 @@
|
||||
"""Shared fixtures for unit + integration tests."""
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from collections.abc import Iterator
|
||||
|
||||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from app.db import SessionLocal, db_available
|
||||
from app.main import app as fastapi_app
|
||||
# In-process integration/E2E tests drive the app with *mock* embeddings
|
||||
# (bag-of-words, cosine ~0.1–0.8), not the live aipi model — so the honesty
|
||||
# gate is calibrated to the mock's distribution, mirroring tests/e2e/
|
||||
# conftest.py. Must be set before ``app.main`` (below) caches settings.
|
||||
# The production default stays 0.62 (app/config.py, A8 revised).
|
||||
os.environ.setdefault("BOR_RELEVANCE_THRESHOLD", "0.30")
|
||||
|
||||
from app.db import SessionLocal, db_available # noqa: E402
|
||||
from app.main import app as fastapi_app # noqa: E402
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
|
||||
Reference in New Issue
Block a user