From adda47ab04b4eaea43b2d3656d78aec1c85f15d4 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Tue, 12 Aug 2025 22:06:10 +0200 Subject: [PATCH] move import --- backend/open_webui/routers/prune.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/open_webui/routers/prune.py b/backend/open_webui/routers/prune.py index da08037046..05318f9be9 100644 --- a/backend/open_webui/routers/prune.py +++ b/backend/open_webui/routers/prune.py @@ -4,6 +4,7 @@ import os import shutil import json import re +import sqlite3 from typing import Optional, Set from pathlib import Path @@ -320,7 +321,6 @@ def cleanup_orphaned_vector_collections( uuid_to_collection = {} try: - import sqlite3 with sqlite3.connect(str(chroma_db_path)) as conn: collection_id_to_name = {} @@ -660,7 +660,6 @@ async def prune_data(form_data: PruneDataForm, user=Depends(get_admin_user)): chroma_db_path = Path(CACHE_DIR).parent / "vector_db" / "chroma.sqlite3" if chroma_db_path.exists(): try: - import sqlite3 with sqlite3.connect(str(chroma_db_path)) as conn: conn.execute("VACUUM")