refactor(ebook-search): simplify search and phrase matching

This commit is contained in:
2026-07-16 13:09:34 -04:00
parent ed1ea4546a
commit 0d347e20a7
16 changed files with 490 additions and 557 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ from python.ebook_search.api.dependencies import ( # noqa: TC001 FastAPI resolv
AppEngine,
AppHttpClient,
)
from python.ebook_search.api.web import templates
from python.ebook_search.api.web import error_response, templates
from python.ebook_search.guardrails import (
CitationReport,
is_confident,
@@ -95,7 +95,7 @@ async def search(
)
except Exception as error:
logger.exception("ebook_search_request_failed")
return templates.TemplateResponse(request, "partials/error.html", {"message": str(error)}, status_code=500)
return error_response(request, error)
answer_start = perf_counter()
answer, low_confidence, citation_report = await build_answer(client, query, response, config)