Kevin Hu
commited on
Commit
·
bdf4215
1
Parent(s):
c739a3d
add an API of delete llm supplier (#2556)
Browse files### 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 -0
api/apps/llm_app.py
CHANGED
|
@@ -284,6 +284,16 @@ def delete_llm():
|
|
| 284 |
return get_json_result(data=True)
|
| 285 |
|
| 286 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 287 |
@manager.route('/my_llms', methods=['GET'])
|
| 288 |
@login_required
|
| 289 |
def my_llms():
|
|
|
|
| 284 |
return get_json_result(data=True)
|
| 285 |
|
| 286 |
|
| 287 |
+
@manager.route('/delete_factory', methods=['POST'])
|
| 288 |
+
@login_required
|
| 289 |
+
@validate_request("llm_factory")
|
| 290 |
+
def delete_llm():
|
| 291 |
+
req = request.json
|
| 292 |
+
TenantLLMService.filter_delete(
|
| 293 |
+
[TenantLLM.tenant_id == current_user.id, TenantLLM.llm_factory == req["llm_factory"]])
|
| 294 |
+
return get_json_result(data=True)
|
| 295 |
+
|
| 296 |
+
|
| 297 |
@manager.route('/my_llms', methods=['GET'])
|
| 298 |
@login_required
|
| 299 |
def my_llms():
|