mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 17:43:03 +03:00
d2b4ef4aff
* ✨ get all knowledge utils * ✨ add remove knowledge and update router * ✨ new knowledge provider * 🚨 remove eslint -disable * ✨ new useKnowledgeApi * ✨ set up KnowledgeItem * ✨ add KnowledgeTable component in knowledge tab * 🔥 remove DocumentData replaced by KnowledgeItem * 🐛 fix weird characters instead of '/' * 💄 truncate knowledge name * ✨ add DownloadUploadedKnowledge component * ⚰️ unused code * 🏷️ introduce UploadedKnowledge and CrawledKnowledge types * 💄 remove thread * 💄 bin for delete knowledge * 🌐 update wording for knowledge tab * 🔇 remove logs and comments
17 lines
371 B
Python
17 lines
371 B
Python
from uuid import UUID
|
|
|
|
from logger import get_logger
|
|
from models.settings import get_supabase_db
|
|
|
|
logger = get_logger(__name__)
|
|
|
|
|
|
def remove_knowledge(knowledge_id: UUID):
|
|
supabase_db = get_supabase_db()
|
|
|
|
message = supabase_db.remove_knowledge_by_id(knowledge_id)
|
|
|
|
logger.info(f"Knowledge { knowledge_id} removed successfully from table")
|
|
|
|
return message
|