Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

add an API of delete llm supplier (#2556)

Kevin Hu7b3099b1a1b5
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)
[email protected]('/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():