Rename gpt-4o-transcribe-latest to gpt-4o-transcribe in OpenAIRealtimeBetaLLMService

This commit is contained in:
Paul Kompfner
2025-03-19 21:58:46 -04:00
parent 2ae5bdd8a9
commit f0774268cc
2 changed files with 4 additions and 4 deletions

View File

@@ -130,7 +130,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added support in `OpenAIRealtimeBetaLLMService` for a slate of new features: - Added support in `OpenAIRealtimeBetaLLMService` for a slate of new features:
- The `'gpt-4o-transcribe-latest'` input audio transcription model, along - The `'gpt-4o-transcribe'` input audio transcription model, along
with new `language` and `prompt` options specific to that model. with new `language` and `prompt` options specific to that model.
- The `input_audio_noise_reduction` session property. - The `input_audio_noise_reduction` session property.

View File

@@ -14,7 +14,7 @@ from pydantic import BaseModel, Field
# #
# session properties # session properties
# #
InputAudioTranscriptionModel = Literal["whisper-1", "gpt-4o-transcribe-latest"] InputAudioTranscriptionModel = Literal["whisper-1", "gpt-4o-transcribe"]
class InputAudioTranscription(BaseModel): class InputAudioTranscription(BaseModel):
@@ -29,9 +29,9 @@ class InputAudioTranscription(BaseModel):
prompt: Optional[str] = None, prompt: Optional[str] = None,
): ):
super().__init__(model=model, language=language, prompt=prompt) super().__init__(model=model, language=language, prompt=prompt)
if self.model != "gpt-4o-transcribe-latest" and (self.language or self.prompt): if self.model != "gpt-4o-transcribe" and (self.language or self.prompt):
raise ValueError( raise ValueError(
"Fields 'language' and 'prompt' are only supported when model is 'gpt-4o-transcribe-latest'" "Fields 'language' and 'prompt' are only supported when model is 'gpt-4o-transcribe'"
) )