@@ -210,7 +210,8 @@ async def get_engine_instances():
210
210
211
211
@main_router .get ("/health" )
212
212
async def health () -> Response :
213
- """Endpoint to check the health status of various components.
213
+ """
214
+ Endpoint to check the health status of various components.
214
215
215
216
This function verifies the health of the service discovery module and
216
217
the engine stats scraper. If either component is down, it returns a
@@ -247,7 +248,7 @@ async def health() -> Response:
247
248
248
249
@main_router .post ("/v1/audio/transcriptions" )
249
250
async def audio_transcriptions (
250
- file : UploadFile = File (... ),
251
+ file : UploadFile | None = File (None ),
251
252
model : str = Form (...),
252
253
prompt : str | None = Form (None ),
253
254
response_format : str | None = Form ("json" ),
@@ -276,7 +277,6 @@ async def audio_transcriptions(
276
277
# logger.debug("=========files=========")
277
278
278
279
data = {
279
- "model" : model ,
280
280
"language" : language ,
281
281
}
282
282
@@ -300,20 +300,12 @@ async def audio_transcriptions(
300
300
logger .debug (endpoints )
301
301
logger .debug ("==== Total endpoints ====" )
302
302
303
- # TODO: right now is skipping label check in code for local testing
304
- endpoints = [
305
- ep
306
- for ep in endpoints
307
- if model in ep .model_names # that actually serve your model
303
+ # filter the endpoints url by model name for transcriptions
304
+ transcription_endpoints = [
305
+ ep for ep in endpoints
306
+ if model == ep .model_name and ep .model_label == "transcription"
308
307
]
309
308
310
- logger .debug ("==== Discovered endpoints after filtering ====" )
311
- logger .debug (endpoints )
312
- logger .debug ("==== Discovered endpoints after filtering ====" )
313
-
314
- # filter the endpoints url for transcriptions
315
- transcription_endpoints = [ep for ep in endpoints if model in ep .model_names ]
316
-
317
309
logger .debug ("====List of transcription endpoints====" )
318
310
logger .debug (transcription_endpoints )
319
311
logger .debug ("====List of transcription endpoints====" )
0 commit comments