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:
10
app.py
10
app.py
@@ -31,7 +31,7 @@ from typing import Optional
|
|||||||
import httpx
|
import httpx
|
||||||
import psutil
|
import psutil
|
||||||
from fastapi import FastAPI, Request, HTTPException
|
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.staticfiles import StaticFiles
|
||||||
from fastapi.templating import Jinja2Templates
|
from fastapi.templating import Jinja2Templates
|
||||||
|
|
||||||
@@ -826,14 +826,6 @@ async def explicit_search(request: Request):
|
|||||||
|
|
||||||
summary = "".join(full_response)
|
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*"
|
saved_msg = f"{summary}\n\n---\n*🔍 Web search results*"
|
||||||
|
|
||||||
db2 = get_db()
|
db2 = get_db()
|
||||||
|
|||||||
@@ -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
|
- **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
|
- **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"
|
- **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
|
## What's New in v1.4.0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user