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

@ -28,7 +28,11 @@ from rag.utils import num_tokens_from_string
class Base(ABC):
def __init__(self, key, model_name):
def __init__(self, key, model_name, **kwargs):
"""
Abstract base class constructor.
Parameters are not stored; initialization is left to subclasses.
"""
pass
def transcription(self, audio, **kwargs):