LLMIFY THIS MOFO
CI / Test (push) Successful in 44s

This commit is contained in:
2026-09-01 01:49:40 -04:00
parent dad09d1109
commit 4426af63cb
19 changed files with 388 additions and 56 deletions
+5 -1
View File
@@ -317,6 +317,7 @@ func (p *pipeline) handleInjectAction(ctx context.Context, recorder recording.Re
RemoveFillerWords: llmCfg.RemoveFillerWords,
CustomPrompt: llmCfg.CustomPrompt,
Keywords: llmCfg.Keywords,
BaseURL: llmCfg.BaseURL,
})
if err != nil {
log.Printf("Pipeline: Failed to create LLM adapter: %v, using raw transcription", err)
@@ -343,7 +344,10 @@ func (p *pipeline) handleInjectAction(ctx context.Context, recorder recording.Re
}
return r
}, textToInject)
// Speech APIs occasionally include leading or trailing whitespace (for
// example Whisper commonly returns a leading space). It is transport
// formatting rather than dictated content, so never inject it.
textToInject = strings.TrimSpace(textToInject)
injector := p.injectorFactory(p.config.ToInjectionConfig())
if err := injector.Inject(ctx, textToInject); err != nil {