Add **kwargs to model base class constructors (#9252)

Updated constructors for base and derived classes in chat, embedding,
rerank, sequence2txt, and tts models to accept **kwargs. This change
improves extensibility and allows passing additional parameters without
breaking existing interfaces.

- [x] Bug Fix (non-breaking change which fixes an issue)

---------

Co-authored-by: IT: Sop.Son <sop.son@feavn.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
so95
2025-08-07 08:45:37 +07:00
committed by GitHub
parent 581a54fbbb
commit 35539092d0
5 changed files with 27 additions and 10 deletions

View File

@ -63,7 +63,11 @@ class ServeTTSRequest(BaseModel):
class Base(ABC):
def __init__(self, key, model_name, base_url):
def __init__(self, key, model_name, base_url, **kwargs):
"""
Abstract base class constructor.
Parameters are not stored; subclasses should handle their own initialization.
"""
pass
def tts(self, audio):