Skip to content

Commit 121b226

Browse files
committed
types
Signed-off-by: NickLucche <nlucches@redhat.com>
1 parent ab8802f commit 121b226

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vllm/entrypoints/openai/serving_transcription.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from collections.abc import AsyncGenerator
55
import time
66
from math import ceil
7-
from typing import AsyncGenerator, Final, Optional, Union, cast
7+
from typing import AsyncGenerator, Final, Optional, Tuple, Union, cast
88

99
from fastapi import Request
1010

@@ -14,7 +14,7 @@
1414
from vllm.entrypoints.openai.protocol import (
1515
DeltaMessage, ErrorResponse, RequestResponseMetadata, TranscriptionRequest,
1616
TranscriptionResponse, TranscriptionResponseStreamChoice,
17-
TranscriptionResponseVerbose, TranscriptionStreamResponse, UsageInfo)
17+
TranscriptionStreamResponse, UsageInfo)
1818
from vllm.entrypoints.openai.serving_engine import OpenAIServing
1919
from vllm.entrypoints.openai.serving_models import OpenAIServingModels
2020
from vllm.inputs.data import PromptType
@@ -177,7 +177,7 @@ async def _preprocess_transcription(
177177
self,
178178
request: TranscriptionRequest,
179179
audio_data: bytes,
180-
) -> PromptType:
180+
) -> Tuple[PromptType, float]:
181181
# Validate request
182182
# TODO language should be optional and can be guessed.
183183
# For now we default to en. See
@@ -226,7 +226,7 @@ async def _preprocess_transcription(
226226
async def create_transcription(
227227
self, audio_data: bytes, request: TranscriptionRequest,
228228
raw_request: Request
229-
) -> Union[TranscriptionResponse, TranscriptionResponseVerbose,
229+
) -> Union[TranscriptionResponse, AsyncGenerator[str, None],
230230
ErrorResponse]:
231231
"""Transcription API similar to OpenAI's API.
232232

0 commit comments

Comments
 (0)