From 66c54e75f3542c198677493aca0fa5fa331091de Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Tue, 10 Sep 2024 11:39:44 +0800 Subject: [PATCH] add default model types (#2342) ### What problem does this PR solve? ### Type of change - [ ] Bug Fix (non-breaking change which fixes an issue) - [x] New Feature (non-breaking change which adds functionality) --- api/apps/llm_app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/apps/llm_app.py b/api/apps/llm_app.py index 03ecf31f6..544024992 100644 --- a/api/apps/llm_app.py +++ b/api/apps/llm_app.py @@ -39,7 +39,8 @@ def factories(): mdl_types[m.fid] = set([]) mdl_types[m.fid].add(m.model_type) for f in fac: - f["model_types"] = list(mdl_types.get(f["name"], [])) + f["model_types"] = list(mdl_types.get(f["name"], [LLMType.CHAT, LLMType.EMBEDDING, LLMType.RERANK, + LLMType.IMAGE2TEXT, LLMType.SPEECH2TEXT, LLMType.TTS])) return get_json_result(data=fac) except Exception as e: return server_error_response(e)