Remove unused imports and dead code; update readme

- Drop unused JSONResponse import from fastapi.responses
- Remove never-used raw_results_md variable in explicit_search stream
- Note cleanup in v1.5.0 changelog

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-29 15:53:48 -07:00
parent 6988997144
commit 7a151b7d50
2 changed files with 2 additions and 9 deletions

10
app.py
View File

@@ -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()

View File

@@ -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