[Model] Add Kimi K3 support: Python frontend [2/2] (#50093)
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
This commit is contained in:
@@ -2024,13 +2024,19 @@ def get_history_tool_calls_cnt(conversation: list[ConversationMessage]):
|
||||
return idx
|
||||
|
||||
|
||||
_KIMI_MODEL_TYPES = ("kimi_k2", "kimi_k25")
|
||||
_KIMI_MODEL_TYPES = ("kimi_k2", "kimi_k25", "kimi_k3")
|
||||
|
||||
|
||||
def get_tool_call_id_type(model_config: ModelConfig) -> str:
|
||||
"""Return the tool-call ID type for a given model configuration."""
|
||||
hf_overrides = getattr(model_config, "hf_overrides", None)
|
||||
if model_config.hf_text_config.model_type in _KIMI_MODEL_TYPES or (
|
||||
hf_config = getattr(model_config, "hf_config", None)
|
||||
hf_text_config = getattr(model_config, "hf_text_config", None)
|
||||
model_types = (
|
||||
getattr(hf_config, "model_type", None),
|
||||
getattr(hf_text_config, "model_type", None),
|
||||
)
|
||||
if any(model_type in _KIMI_MODEL_TYPES for model_type in model_types) or (
|
||||
isinstance(hf_overrides, dict)
|
||||
and hf_overrides.get("model_type") in _KIMI_MODEL_TYPES
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user