Browse Source

fix self deployed llm lost (#2510)

### What problem does this PR solve?

#2509 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.12.0
Kevin Hu 1 year ago
parent
commit
a44f1f735d
No account linked to committer's email address
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      api/apps/llm_app.py

+ 2
- 1
api/apps/llm_app.py View File

@@ -305,6 +305,7 @@ def my_llms():
@manager.route('/list', methods=['GET'])
@login_required
def list_app():
self_deploied = ["Youdao","FastEmbed", "BAAI", "Ollama", "Xinference", "LocalAI", "LM-Studio"]
model_type = request.args.get("model_type")
try:
objs = TenantLLMService.query(tenant_id=current_user.id)
@@ -313,7 +314,7 @@ def list_app():
llms = [m.to_dict()
for m in llms if m.status == StatusEnum.VALID.value]
for m in llms:
m["available"] = m["fid"] in facts or m["llm_name"].lower() == "flag-embedding" or m["fid"] in ["Youdao","FastEmbed", "BAAI"]
m["available"] = m["fid"] in facts or m["llm_name"].lower() == "flag-embedding" or m["fid"] in self_deploied

llm_set = set([m["llm_name"] for m in llms])
for o in objs:

Loading…
Cancel
Save