Stabilize Whisper transcription requests
Some checks failed
CI / test (push) Failing after 9s
Build and Deploy / build-and-deploy (push) Successful in 21s

This commit is contained in:
Grendgi
2026-06-11 10:16:34 +03:00
parent bc71caa762
commit b536877181
2 changed files with 8 additions and 1 deletions

View File

@@ -245,6 +245,9 @@ func (c *Client) doOpenAIAudioTranscription(ctx context.Context, provider Provid
if err := mw.WriteField("response_format", responseFormat); err != nil {
return nil, 0, fmt.Errorf("audio transcription response_format field: %w", err)
}
if err := mw.WriteField("temperature", "0"); err != nil {
return nil, 0, fmt.Errorf("audio transcription temperature field: %w", err)
}
if responseFormat == "verbose_json" {
if err := mw.WriteField("timestamp_granularities[]", "segment"); err != nil {
return nil, 0, fmt.Errorf("audio transcription timestamp field: %w", err)