Support both "voice" and "speaker" params in chat completions (#3248)
Signed-off-by: Mike_Qiu <qiudayu.qdy@antgroup.com> Co-authored-by: Mike_Qiu <qiudayu.qdy@antgroup.com> Co-authored-by: Yueqian Lin <70319226+linyueqian@users.noreply.github.com>
This commit is contained in:
1 file changed
+1
-1
@@ -560,7 +560,7 @@ class OmniOpenAIServingChat(OpenAIServingChat, AudioMixin):
|
||||
if hasattr(request, "cache_salt") and request.cache_salt is not None:
|
||||
engine_prompt["cache_salt"] = request.cache_salt
|
||||
|
||||
speaker = getattr(request, "speaker", None)
|
||||
speaker = getattr(request, "voice", None) or getattr(request, "speaker", None)
|
||||
normalized = validate_requested_speaker(speaker, self._get_supported_speakers())
|
||||
if normalized is not None:
|
||||
if "additional_information" not in engine_prompt or engine_prompt["additional_information"] is None:
|
||||
|
||||
Reference in new issue
Block a user