SEMOSS / Semoss

Apache License 2.0
28 stars 5 forks source link

Chroma filter changes #179

Open Pragya7011 opened 3 weeks ago

Pragya7011 commented 3 weeks ago

Code changes done for adding filters and metafilters parameters in chroma vector db . Below search command is tested and working fine :

1.No Filter -> VectorDatabaseQuery ( engine = "41766dd6-cfc0-4425-ac7c-e0e1715bbfab" , command = "What is somatosensory" , limit = 5 ) ;

2.Single source filename in filter -> VectorDatabaseQuery ( engine = "41766dd6-cfc0-4425-ac7c-e0e1715bbfab" , command = "What is somatosensory" , limit = 5 , filters = [ Filter ( Source == "somatosensory.pdf" ) ] ) ;

3.Only Metafilters : VectorDatabaseQuery ( engine = "41766dd6-cfc0-4425-ac7c-e0e1715bbfab" , command = "What is somatosensory" , limit = 5 , metaFilters = [ Filter ( Source == "somatosensory.pdf" ) ] ) ;

4.To check filters and metaFilters -> VectorDatabaseQuery ( engine = "41766dd6-cfc0-4425-ac7c-e0e1715bbfab" , command = "What is somatosensory" , limit = 5 , filters = [ Filter ( Source == "somatosensory.pdf" ) ] , metaFilters = [ Filter ( Modality == "text" ) ] ) ;

5.AND filter -> VectorDatabaseQuery ( engine = "41766dd6-cfc0-4425-ac7c-e0e1715bbfab" , command = "What is somatosensory" , limit = 5 , filters = [ Filter ( Source == "somatosensory.pdf" AND Modality == "text" AND Divider == "4" AND Part == "0" )] ) ;

6.OR filter -> VectorDatabaseQuery ( engine = "41766dd6-cfc0-4425-ac7c-e0e1715bbfab" , command = "What is somatosensory" , limit = 5 , filters = [ Filter ( Source == "somatosensory.pdf" OR Modality == "text" )] ) ;