diff --git a/app.py b/app.py index b359a38..c5bc3c9 100644 --- a/app.py +++ b/app.py @@ -31,7 +31,7 @@ from typing import Optional import httpx import psutil from fastapi import FastAPI, Request, HTTPException -from fastapi.responses import HTMLResponse, StreamingResponse, JSONResponse +from fastapi.responses import HTMLResponse, StreamingResponse from fastapi.staticfiles import StaticFiles from fastapi.templating import Jinja2Templates @@ -826,14 +826,6 @@ async def explicit_search(request: Request): summary = "".join(full_response) - # Build raw results markdown - raw_lines = [] - for i, r in enumerate(results, 1): - raw_lines.append(f"{i}. [{r['title']}]({r['url']})") - if r['content']: - raw_lines.append(f" {r['content']}") - raw_results_md = "\n".join(raw_lines) - saved_msg = f"{summary}\n\n---\n*🔍 Web search results*" db2 = get_db() diff --git a/readme.md b/readme.md index ed922a8..f086473 100644 --- a/readme.md +++ b/readme.md @@ -11,6 +11,7 @@ Built with FastAPI + SQLite + Jinja2. Runs on Python 3.13. No Docker required. - **Explicit Web Search Button** — 🔍 button next to SEND forces a web search, bypassing model uncertainty detection - **Orange Search Styling** — Search results, WEB badge, and search button share consistent orange color scheme - **Expanded Refusal Patterns** — Added "As an AI model", "based on my training data", "I don't have the capability" +- **Code cleanup** — Removed unused `JSONResponse` import and dead `raw_results_md` variable ## What's New in v1.4.0