mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-24 03:41:56 +03:00
feat: Add logging for brain vector creation
This commit is contained in:
parent
3ed0ea15bb
commit
f723f8d729
@ -1,11 +1,14 @@
|
||||
import time
|
||||
|
||||
from logger import get_logger
|
||||
from models import File
|
||||
from models.settings import get_supabase_db
|
||||
from modules.brain.service.brain_vector_service import BrainVectorService
|
||||
from packages.embeddings.vectors import Neurons
|
||||
from repository.files.upload_file import DocumentSerializable
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
|
||||
async def process_file(
|
||||
file: File,
|
||||
@ -39,9 +42,10 @@ async def process_file(
|
||||
|
||||
brain_vector_service = BrainVectorService(brain_id)
|
||||
for created_vector_id in created_vector:
|
||||
brain_vector_service.create_brain_vector(
|
||||
result = brain_vector_service.create_brain_vector(
|
||||
created_vector_id, metadata["file_sha1"]
|
||||
)
|
||||
logger.debug(f"Brain vector created: {result}")
|
||||
|
||||
database.set_file_sha_from_metadata(metadata["file_sha1"])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user