feat(whisper): register set_abort symbol in the purego loader

Adds the Go-side binding for the new C export so the next commit can
call CppSetAbort(1) from a watcher goroutine on ctx.Done().

Assisted-by: Claude:claude-haiku-4-5
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2026-05-07 16:40:52 +00:00
parent 55c9294a29
commit da4a35bb97
2 changed files with 2 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ var (
CppNTokens func(i int) int
CppGetTokenID func(i int, j int) int
CppGetSegmentSpeakerTurnNext func(i int) bool
CppSetAbort func(v int)
)
type Whisper struct {

View File

@@ -41,6 +41,7 @@ func main() {
{&CppNTokens, "n_tokens"},
{&CppGetTokenID, "get_token_id"},
{&CppGetSegmentSpeakerTurnNext, "get_segment_speaker_turn_next"},
{&CppSetAbort, "set_abort"},
}
for _, lf := range libFuncs {