Repository navigation
Pr/5 OpenAI compatible summarizers - #20
bryangruneberg wants to merge 3 commits into
Conversation
A response cut off at its output-token limit was parsed as if complete. With a reasoning model the whole budget can go on thinking, so the visible text is empty and the note reads "No overview generated"; with a long meeting the summary stops mid-sentence and loses its action items. Either way the note looks finished and nothing reports a problem. - Anthropic: max_tokens 2000 -> 16000 (billed only as used; stays under the SDK's non-streaming time guard). - All providers: raise SummaryTruncated on stop_reason "max_tokens" / finish_reason "length". NoteMaker already turns summarizer exceptions into its ai_error path, so the user is told and the fallback summary is used. Truncation is not retried: the same request truncates the same way. Found with Claude Sonnet 5 through an OpenAI-compatible endpoint: at 2000 tokens a 34-minute meeting came back with finish_reason=length and an empty message; it needed ~5,400 output tokens for ~1,100 tokens of summary. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…tional extra Adds a second transcription backend next to local Whisper, selected with `transcriber: whisper | assemblyai` (default unchanged: whisper). AssemblyAITranscriber has the same interface as WhisperTranscriber and adds: - speaker diarisation: segments carry a speaker, the transcript renders as **[mm:ss] Speaker A:** ..., and the summariser is given "Speaker A: ..." lines (summary_input) so action items can name an owner; - upload as 16 kHz mono FLAC via ffmpeg. The recorder's 48 kHz WAV is ~11 MB/min, and a 34-minute meeting (377 MB) had its upload cut off mid-TLS; FLAC is lossless for what the model hears and ~10x smaller; - upload retries on a dropped connection; - submit()/wait() split so a caller can keep the transcript id and resume polling instead of re-uploading; AssemblyAIError carries status_code / transient / remote_failed for callers deciding whether to retry; - a missing API key is reported at transcription time, so the app still opens and records without one. build_transcriber(config) replaces the two duplicated construction blocks in app.py (startup and settings-saved). Settings gains a transcription picker. Packaging: openai-whisper moves from core dependencies to a `whisper` extra (torch is several GB and not always available for the newest Python). `all` still includes it, so setup.sh's `pip install -e .[all]` installs exactly what it did before; a new `assemblyai` extra is the cloud-only set. CI installs requests and runs tests/test_assemblyai.py. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…way and DeepInfra OpenAICompatibleSummarizer runs the shared prompt and parser against any OpenAI chat-completions endpoint: a subclass sets BASE_URL, ENV_VAR, LABEL and a tier -> model-id table. Two providers use it, both serving Claude with ai_model haiku | sonnet | opus: - assemblyai: AssemblyAI's LLM Gateway, authenticated with the same key as AssemblyAI transcription, so one key covers the whole pipeline. - deepinfra: DeepInfra's OpenAI-compatible API. Choices that matter for current models: - no temperature: Claude 5 models on the gateway reject it; - MAX_TOKENS = 16000: reasoning models spend output tokens before writing text (a 34-minute meeting needed ~5,400 for ~1,100 visible); - finish_reason "length" raises SummaryTruncated rather than parsing a partial response. The same base would also cover other OpenAI-compatible services, e.g. the Copilot request in jamespember#2 / jamespember#10. Config validation, provider_api_key(), Settings (shared Claude tier buttons, key inputs) and NoteMaker are wired for both; tests use fake clients only. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Continuing to be impressed with the design here @bryangruneberg. The Rebased on top of #18 and #19 which just merged — the two "already-applied" commits got skipped cleanly, leaving one commit and a much smaller diff (~360 lines vs the original 1,626). Local tests: 159 passed, ruff clean. Design notes I want to call out:
Test coverage:
Merging locally (same |
|
Merged as commit fcdd9be on |
|
Nice one 🎉 |
No description provided.