mirror of
https://github.com/QuivrHQ/quivr.git
synced 2025-01-05 23:03:53 +03:00
be7acf052b
* 🌱 list files in storage & generate signed URL * ✨ add knowledge router * 🗃️ add knowledge tables * ✨ add knowledge during upload * 🚧 add knowledge a brain_knowledge models and repo * 🔥 remove brain_knowledge * ✨ add upload to knowledge table * ✨ add crawl to knowledge table * ✏️ fixes
15 lines
432 B
Python
15 lines
432 B
Python
from logger import get_logger
|
|
from models.databases.supabase.knowledge import CreateKnowledgeProperties
|
|
from models.settings import get_supabase_db
|
|
|
|
logger = get_logger(__name__)
|
|
|
|
|
|
def add_knowledge(knowledge_to_add: CreateKnowledgeProperties):
|
|
supabase_db = get_supabase_db()
|
|
|
|
knowledge = supabase_db.insert_knowledge(knowledge_to_add)
|
|
|
|
logger.info(f"Knowledge { knowledge.id} added successfully")
|
|
return knowledge
|