feat(web): chat over an upload opens with App.UploadChatModel

The Chatter's own default is the summarizer's (koala/phi4-mini, 8,192-token
context), which answers HTTP 400 on an hour of speech. Empty keeps the old
behaviour.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 17:07:33 +02:00
co-authored by Claude Sonnet 5.5
parent 4b6ac2a213
commit 6c39ab86cf
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -117,6 +117,11 @@ type App struct {
// recording. The caption default (18,000 chars, ~22 minutes of speech) would
// keep only the first third of an hour-long meeting.
UploadChatMaxChars int
// UploadChatModel is the model chat over an uploaded recording opens with. Empty
// means the Chatter's own default. It exists because that default is the
// summarizer's (koala/phi4-mini, 8,192-token context) and cannot hold an hour of
// speech.
UploadChatModel string
// Processing tracks in-flight immediate summarizations so the status endpoint
// shows the animation until the summary lands. The zero value is ready to use.
Processing ProcessingSet
+2 -2
View File
@@ -206,7 +206,7 @@ func (a *App) handleUploadChat(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/uploads/"+u.ID, http.StatusSeeOther)
return
}
a.render(w, r, UploadChatPage(*u, a.uploadChatView(*u, a.Chat.DefaultModel(""), nil, false, "")))
a.render(w, r, UploadChatPage(*u, a.uploadChatView(*u, a.Chat.DefaultModel(a.UploadChatModel), nil, false, "")))
}
// handleUploadChatMessage answers one question against the owner's uploaded
@@ -226,7 +226,7 @@ func (a *App) handleUploadChatMessage(w http.ResponseWriter, r *http.Request) {
http.Error(w, "bad form", http.StatusBadRequest)
return
}
model := a.resolveModel(r.FormValue("model"), "")
model := a.resolveModel(r.FormValue("model"), a.UploadChatModel)
history := parseHistory(r.Form["hq"], r.Form["ha"])
question := strings.TrimSpace(r.FormValue("question"))