From bce19dac0216423d53d8c888901c8e87c7f647b8 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Tue, 24 Sep 2024 15:24:15 +0800 Subject: [PATCH] add an API of delete llm supplier (#2556) ### What problem does this PR solve? #1853 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- api/apps/llm_app.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/api/apps/llm_app.py b/api/apps/llm_app.py index 30a6a297d5..4b229f4c5a 100644 --- a/api/apps/llm_app.py +++ b/api/apps/llm_app.py @@ -284,6 +284,16 @@ def delete_llm(): return get_json_result(data=True) +@manager.route('/delete_factory', methods=['POST']) +@login_required +@validate_request("llm_factory") +def delete_llm(): + req = request.json + TenantLLMService.filter_delete( + [TenantLLM.tenant_id == current_user.id, TenantLLM.llm_factory == req["llm_factory"]]) + return get_json_result(data=True) + + @manager.route('/my_llms', methods=['GET']) @login_required def my_llms():