diff --git a/internal/web/handlers.go b/internal/web/handlers.go index b9b1ed2..3867181 100644 --- a/internal/web/handlers.go +++ b/internal/web/handlers.go @@ -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 diff --git a/internal/web/uploads.go b/internal/web/uploads.go index 295ced5..bd65624 100644 --- a/internal/web/uploads.go +++ b/internal/web/uploads.go @@ -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"))