feat(config): measured chat budget (90,000) and upload chat model (gemma4-26b)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -33,9 +33,15 @@ type UploadConfig struct {
|
||||
FFprobeBin string
|
||||
// MaxUploadedTranscriptChars bounds the transcript sent to a chat model for an
|
||||
// UPLOADED recording. The 18,000-char default for captions is ~22 minutes of
|
||||
// speech; an hour of meeting is ~50,000 chars. A guess until measured against
|
||||
// the models chat offers.
|
||||
// speech; an hour of meeting is ~50,000 chars. MEASURED 2026-10-01 against the
|
||||
// real models: iguana/gemma4-26b answers correctly to 90,000 chars but silently
|
||||
// drops the head of a 120,000-char transcript, so 90,000 is the ceiling of the
|
||||
// best model, not a round number.
|
||||
MaxUploadedTranscriptChars int
|
||||
// UploadChatModel is the model chat over an uploaded recording opens with. It is
|
||||
// NOT the summarizer default: koala/phi4-mini has an 8,192-token context and
|
||||
// returns HTTP 400 on an hour of speech (~13,000 tokens).
|
||||
UploadChatModel string
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -44,7 +50,8 @@ const (
|
||||
defaultTranscribeModel = "iguana/kb-whisper"
|
||||
defaultTranscribeFallbackModel = "berget/kb-whisper"
|
||||
defaultTranscribeTimeout = 30 * time.Minute
|
||||
defaultMaxUploadedChars = 120000
|
||||
defaultMaxUploadedChars = 90000
|
||||
defaultUploadChatModel = "iguana/gemma4-26b"
|
||||
)
|
||||
|
||||
func loadUploadConfig() (UploadConfig, error) {
|
||||
@@ -54,6 +61,7 @@ func loadUploadConfig() (UploadConfig, error) {
|
||||
UploadTmpDir: envOr("TAPIR_UPLOAD_TMP_DIR", os.TempDir()),
|
||||
FFmpegBin: envOr("TAPIR_FFMPEG_BIN", "ffmpeg"),
|
||||
FFprobeBin: envOr("TAPIR_FFPROBE_BIN", "ffprobe"),
|
||||
UploadChatModel: envOr("TAPIR_UPLOAD_CHAT_MODEL", defaultUploadChatModel),
|
||||
}
|
||||
|
||||
if v := os.Getenv("TAPIR_UPLOADS_ENABLED"); v != "" {
|
||||
|
||||
Reference in New Issue
Block a user