Make it so that AIService is the exclusive "syncer" of model name to metrics.
The only (rare) exception—where a service directly still needs to directly call `self._sync_model_name_to_metrics()`—is when the model name need to be "pulled" from another field (or nested field) in settings up to settings.model on a settings update. This only occurs in Deepgram services, where we use the voice as the model name. This change has the side-effect of bringing model name to metrics for a number of services that were accidentally omitting it before.
This commit is contained in:
@@ -221,6 +221,11 @@ class OpenAIRealtimeSTTService(WebsocketSTTService):
|
||||
|
||||
super().__init__(
|
||||
ttfs_p99_latency=ttfs_p99_latency,
|
||||
settings=OpenAIRealtimeSTTSettings(
|
||||
model=model,
|
||||
language=language,
|
||||
prompt=prompt,
|
||||
),
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@@ -232,13 +237,6 @@ class OpenAIRealtimeSTTService(WebsocketSTTService):
|
||||
self._noise_reduction = noise_reduction
|
||||
self._should_interrupt = should_interrupt
|
||||
|
||||
self._settings = OpenAIRealtimeSTTSettings(
|
||||
model=model,
|
||||
language=language,
|
||||
prompt=prompt,
|
||||
)
|
||||
self._sync_model_name_to_metrics()
|
||||
|
||||
self._receive_task = None
|
||||
self._session_ready = False
|
||||
self._resampler = create_stream_resampler()
|
||||
|
||||
Reference in New Issue
Block a user