Switch transcription to Whisper large v3
This commit is contained in:
@@ -7,22 +7,22 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNewWithOptionsBuildsVoxtralProvider(t *testing.T) {
|
||||
func TestNewWithOptionsBuildsWhisperProvider(t *testing.T) {
|
||||
client := NewWithOptions(Options{
|
||||
VoxtralBaseURL: "http://voxtral",
|
||||
AudioBaseURL: "http://whisper",
|
||||
})
|
||||
if client == nil {
|
||||
t.Fatal("client is nil")
|
||||
}
|
||||
if client.provider.Name != ProviderVoxtral {
|
||||
t.Fatalf("provider = %q, want %q", client.provider.Name, ProviderVoxtral)
|
||||
if client.provider.Name != ProviderWhisperLargeV3 {
|
||||
t.Fatalf("provider = %q, want %q", client.provider.Name, ProviderWhisperLargeV3)
|
||||
}
|
||||
if client.provider.Model != "mistralai/Voxtral-Small-24B-2507" {
|
||||
if client.provider.Model != "openai/whisper-large-v3" {
|
||||
t.Fatalf("model = %q", client.provider.Model)
|
||||
}
|
||||
}
|
||||
|
||||
func TestVoxtralUsesAudioTranscriptionsEndpoint(t *testing.T) {
|
||||
func TestWhisperUsesAudioTranscriptionsEndpoint(t *testing.T) {
|
||||
audioSrv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
_, _ = w.Write([]byte("fake audio"))
|
||||
}))
|
||||
@@ -50,8 +50,8 @@ func TestVoxtralUsesAudioTranscriptionsEndpoint(t *testing.T) {
|
||||
defer providerSrv.Close()
|
||||
|
||||
client := NewWithOptions(Options{
|
||||
VoxtralBaseURL: providerSrv.URL,
|
||||
VoxtralModel: "mistralai/Voxtral-Small-24B-2507",
|
||||
AudioBaseURL: providerSrv.URL,
|
||||
AudioModel: "openai/whisper-large-v3",
|
||||
})
|
||||
if client == nil {
|
||||
t.Fatal("client is nil")
|
||||
@@ -63,7 +63,7 @@ func TestVoxtralUsesAudioTranscriptionsEndpoint(t *testing.T) {
|
||||
if gotPath != "/v1/audio/transcriptions" {
|
||||
t.Fatalf("path = %q, want /v1/audio/transcriptions", gotPath)
|
||||
}
|
||||
if gotModel != "mistralai/Voxtral-Small-24B-2507" {
|
||||
if gotModel != "openai/whisper-large-v3" {
|
||||
t.Fatalf("model = %q", gotModel)
|
||||
}
|
||||
if gotResponseFormat != "json" {
|
||||
|
||||
Reference in New Issue
Block a user