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)
This commit is contained in:
parent
f60dfffb4b
commit
66c54e75f3
1 changed files with 2 additions and 1 deletions
|
|
@ -39,7 +39,8 @@ def factories():
|
||||||
mdl_types[m.fid] = set([])
|
mdl_types[m.fid] = set([])
|
||||||
mdl_types[m.fid].add(m.model_type)
|
mdl_types[m.fid].add(m.model_type)
|
||||||
for f in fac:
|
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)
|
return get_json_result(data=fac)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return server_error_response(e)
|
return server_error_response(e)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue