mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 19:37:47 +01:00
feat: SAFE_MODE
This commit is contained in:
@@ -221,6 +221,19 @@ class FunctionsTable:
|
||||
except:
|
||||
return None
|
||||
|
||||
def deactivate_all_functions(self) -> Optional[bool]:
|
||||
try:
|
||||
query = Function.update(
|
||||
**{"is_active": False},
|
||||
updated_at=int(time.time()),
|
||||
)
|
||||
|
||||
query.execute()
|
||||
|
||||
return True
|
||||
except:
|
||||
return None
|
||||
|
||||
def delete_function_by_id(self, id: str) -> bool:
|
||||
try:
|
||||
query = Function.delete().where((Function.id == id))
|
||||
|
||||
Reference in New Issue
Block a user