This commit is contained in:
yumoqing 2025-08-07 13:42:49 +08:00
parent 0e5fa16e2a
commit f3f20da728
11 changed files with 5 additions and 2 deletions

View File

@ -15,9 +15,11 @@ def llm_register(model_key, Klass):
model_pathMap[model_key] = Klass
def get_llm_class(model_path):
for k,klass in model_pathMap.items():
keys = [k for k in model_pathMap.keys()].sort()
keys.reverse()
for k in keys:
if len(model_path.split(k)) > 1:
return klass
return model_pathMap[k]
print(f'{model_pathMap=}')
return None

View File

@ -7,6 +7,7 @@ from llmengine.base_chat_llm import BaseChatLLM, get_llm_class
from llmengine.gemma3_it import Gemma3LLM
from llmengine.medgemma3_it import MedgemmaLLM
from llmengine.qwen3 import Qwen3LLM
from llmengine.qwen3coder import Qwen3CoderLLM
from appPublic.registerfunction import RegisterFunction
from appPublic.log import debug, exception