@@ -225,6 +225,7 @@ def add_repo_chunks(self, chunks: List[Dict[str, Any]], document_id: str):
225
225
226
226
def query_pdf_collection (self , query : str , n_results : int = 3 ) -> List [Dict [str , Any ]]:
227
227
"""Query the PDF documents collection"""
228
+ print ("🔍 [Oracle DB] Querying PDF Collection" )
228
229
# Generate Embeddings
229
230
embeddings = self .encoder .encode (query , batch_size = 32 , show_progress_bar = True )
230
231
new_vector = array .array ("f" , embeddings )
@@ -250,10 +251,12 @@ def query_pdf_collection(self, query: str, n_results: int = 3) -> List[Dict[str,
250
251
}
251
252
formatted_results .append (result )
252
253
254
+ print (f"🔍 [Oracle DB] Retrieved { len (formatted_results )} chunks from PDF Collection" )
253
255
return formatted_results
254
256
255
257
def query_web_collection (self , query : str , n_results : int = 3 ) -> List [Dict [str , Any ]]:
256
258
"""Query the web documents collection"""
259
+ print ("🔍 [Oracle DB] Querying Web Collection" )
257
260
# Generate Embeddings
258
261
embeddings = self .encoder .encode (query , batch_size = 32 , show_progress_bar = True )
259
262
new_vector = array .array ("f" , embeddings )
@@ -279,10 +282,12 @@ def query_web_collection(self, query: str, n_results: int = 3) -> List[Dict[str,
279
282
}
280
283
formatted_results .append (result )
281
284
285
+ print (f"🔍 [Oracle DB] Retrieved { len (formatted_results )} chunks from Web Collection" )
282
286
return formatted_results
283
287
284
288
def query_general_collection (self , query : str , n_results : int = 3 ) -> List [Dict [str , Any ]]:
285
289
"""Query the general knowledge collection"""
290
+ print ("🔍 [Oracle DB] Querying General Knowledge Collection" )
286
291
# Generate Embeddings
287
292
embeddings = self .encoder .encode (query , batch_size = 32 , show_progress_bar = True )
288
293
new_vector = array .array ("f" , embeddings )
@@ -308,10 +313,12 @@ def query_general_collection(self, query: str, n_results: int = 3) -> List[Dict[
308
313
}
309
314
formatted_results .append (result )
310
315
316
+ print (f"🔍 [Oracle DB] Retrieved { len (formatted_results )} chunks from General Knowledge Collection" )
311
317
return formatted_results
312
318
313
319
def query_repo_collection (self , query : str , n_results : int = 3 ) -> List [Dict [str , Any ]]:
314
320
"""Query the repository documents collection"""
321
+ print ("🔍 [Oracle DB] Querying Repository Collection" )
315
322
# Generate Embeddings
316
323
embeddings = self .encoder .encode (query , batch_size = 32 , show_progress_bar = True )
317
324
new_vector = array .array ("f" , embeddings )
@@ -337,6 +344,7 @@ def query_repo_collection(self, query: str, n_results: int = 3) -> List[Dict[str
337
344
}
338
345
formatted_results .append (result )
339
346
347
+ print (f"🔍 [Oracle DB] Retrieved { len (formatted_results )} chunks from Repository Collection" )
340
348
return formatted_results
341
349
342
350
def get_collection_count (self , collection_name : str ) -> int :
0 commit comments