dtyago commited on
Commit
8561cf1
1 Parent(s): 9146dbe

Bug fix on collection name

Browse files
Files changed (1) hide show
  1. app/utils/doc_ingest.py +3 -5
app/utils/doc_ingest.py CHANGED
@@ -1,16 +1,14 @@
1
  # utils/doc_ingest.py
2
  from .chat_rag import pdf_to_vec
3
 
4
- def ingest_document(file_location: str, user_id: str):
5
  """
6
  Process and ingest a document into a user-specific vector database.
7
 
8
  :param file_location: The location of the uploaded file on the server.
9
- :param user_id: The ID of the user uploading the document.
10
  """
11
- # Construct a unique collection name based on user_id
12
- collection_name = f"user_{user_id}_collection"
13
-
14
  try:
15
  vectordb = pdf_to_vec(file_location, collection_name)
16
  print("Document processed and ingested successfully into user-specific collection.")
 
1
  # utils/doc_ingest.py
2
  from .chat_rag import pdf_to_vec
3
 
4
+ def ingest_document(file_location: str, collection_name: str):
5
  """
6
  Process and ingest a document into a user-specific vector database.
7
 
8
  :param file_location: The location of the uploaded file on the server.
9
+ :param collection_name: The collection name unique for each user uploading the document.
10
  """
11
+
 
 
12
  try:
13
  vectordb = pdf_to_vec(file_location, collection_name)
14
  print("Document processed and ingested successfully into user-specific collection.")