
    ACiJ              
       @   d dl Z d dlmZ d dlmZ d dlmZmZ d dlZe G d d             Z	 ee
      j                  Zedz  Zedz  Zed	z  Zed
z  Zedz  Zedz  Zedz  Zedz  Zedz  ZeeeeeeeefD ]  Zej/                  dd        dZdZdZdZdZdZddddddddddddddddddddd dddddddddd!Zd"Zd#Z d Z!d$Z"g d%Z#i d&g d'd(g d)d*g d+d,g d-d.g d/d0g d1d2d0gd3g d4d5g d6d7d5d8gd9g d:d;g d<d=g d>d?g d@dAg dBdCg dDdEg dFi dGdHdIgdJdKdLgdMg dNdOg dPdQg dRdSdOdTgdUg dVdWg dXdYg dZd[g d\d]g d^d_g d`dag dbdcg dddeg dfdgg dhdig djg dkg dlg dmg dng dog dpg dqg drdsZ$g dtZ%duZ&dvZ'dwZ(d#Z)dxZ*dyZ+dzZ,dzZ-d{Z.d|Z/dZ0d}Z1d~Z2dZ3dZ4 ee      dz  dz  Z5 ee      dz  dz  Z6e jn                  jq                  dd      Z9 e:e jn                  jq                  dd            Z;edz  Z<edz  Z=dZ>dZ?d~Z@y)    N)Path)	dataclass)LiteralOptionalc                       e Zd ZU dZeed<   dZeed<   dZeed<   dZ	e
d   ed<   dZe
d   ed	<   d
Zeed<   dZeed<   dZeed<   dZeed<   dZeed<   dZeed<   dZeed<   dZeed<   dZeed<   d Zy)ProcessingConfigautodeviceTuse_gpuuse_quantization)onnxopenvinopytorchbackend)fp32fp16int8	precision@   
batch_size   max_workersIVF_FLATfaiss_index_typePQfaiss_quantization
   n_probed   n_listuse_async_iouse_parquetcompressionc                 2   | j                   dk(  r3t        j                  j                         r| j                  rdnd| _         | j
                  dk(  r| j                   dk(  rdnd| _        | j                  dk(  r| j                   dk(  rd| _        y d| _        y y )Nr	   cudacpur   r   r   r   )r
   torchr%   is_availabler   r   r   )selfs    */var/www/html/leadgen/airagagent/config.py__post_init__zProcessingConfig.__post_init__   sx    ;;& $)JJ$;$;$=$,,&TYDK>>V#'+{{f'<V&DN<<6!{{f$(%	 "    N)__name__
__module____qualname__r
   str__annotations__r   boolr   r   r   r   r   intr   r   r   r   r    r!   r"   r#   r+    r,   r*   r   r      s     FCGT!d! 7=GW23<17Iw-.7JK 'c&""GSFC L$KK&r,   r   pdf_directory	processed
embeddings	documentsmetadatanotesdigestscapsulesmemoryT)parentsexist_oki     i  i@        i   i     )
chunk_sizechunk_min_sizechunk_max_sizesentence_overlapmin_sentencesi  i  i  ix  i  )	technicalresearchlegalmanualdefaultzBAAI/bge-small-en-v1.5Fg(\?(  phzph levelzph.zph-zph:zph scaleacidity
alkalinityacidicalkalinetemperaturetempcelsius
fahrenheitu   °cu   °fdegreeswarmcoolheathumidityrhzrelative humiditymoisturedrywetppmzparts per millioneczelectrical conductivitytdsztotal dissolved solidsnutrient
fertilizernpknitrogen
phosphorus	potassiummacronutrientmicronutrientmeasurementrangelevelamountconcentrationquantitylightlumensparppfdwattsledhpsmhspectrumphotoperiodsoilmedium	substratecocoperlitevermiculitepeatcompostwatering
irrigationdrainagerunoffflooddripspray
hydroponichydroponicshydrosoillesszdeep water culturedwcnft	aeroponiczebb and flowgrowingcultivation	cultivategrowplantcropharvestseedseedlingclonecuttingpropagationgermination
vegetativeveg	floweringflowerbudtrichomepistilstamencuringdryingtrimmingpruningtoppingfimminglsthstpestdiseasemoldmildewzspider miteaphidfungusbacteriaventilationairflowfanexhaustintakezcarbon filterindooroutdoor
greenhousez	grow roomz	grow tentcannabis	marijuanahempweedpotganjar   r   straincultivarvarietygenetics	phenotypegenotypeindicasativahybrid	ruderalis
autoflowerr	   thccbdcbgcbncbcthcacbdacannabinoidcannabinoidsterpeneterpenesterpmyrcenelimonenepinenelinaloolcaryophyllenezcannabinoid profilezterpene profilezthc contentzcbd contentpotency
extractionextractconcentrate
distillateisolatezfull spectrumzbroad spectrumrosinhashkiefzbubble hashzdry siftz
live resinshatterwaxbudderzco2 extractionzsolvent extractionbutanepropaneethanolhydrocarbonedibletincturetopicalcapsulevape	cartridgedabdabbingsmokingvaping	ingestion
sublingualtransdermalhealthhealthywellness	wellbeingtherapeuticztherapeutic dosemedical	medicinalmedicine	treatmenttherapyztherapeutic usezmedical usezmedicinal usedosagedosedosingmg	milligram	microgrammcgml
millilitergramgzmg/kgbioavailabilityz	half-life
metabolism
metabolitepharmacokineticspainzpain relief	analgesiczchronic painzneuropathic painanxietyzanxiety reliefstresszstress relief
relaxationcalminflammationzanti-inflammatoryinflammatoryswellingseizureepilepsy	epilepticanticonvulsantdravetzlennox-gastautnauseavomitingappetitezappetite stimulantcachexiasleepinsomniaz	sleep aidsedativezsleep quality
depressionmoodmood disorderbipolarptsdtraumacancertumorchemotherapyzcancer treatmentoncologyglaucomazeye pressurezintraocular pressurezmultiple sclerosisms
spasticityzmuscle spasm	parkinsontremorzmovement disorder	alzheimerdementia	cognitiver=   autismautism spectrumasdadhdattention deficithyperactivity	addictionsubstance abuse
withdrawal
dependencezside effectzadverse effectcontraindicationinteractionzdrug interactionsafetysafetoxicitytoxicoverdosezlethal doseclinical trialstudyrJ   peer-reviewedevidenceefficacy	effectivepatientsymptom	conditionr   disordersyndromedoctor	physicianzmedical professionalprescriptionrecommendationlawrK   illegallegalitylegalization	legalizeddecriminalizationdecriminalized
regulation	regulated
regulatory
compliance	compliantlicense	licensingpermit
permissionauthorizationjurisdictionz	state lawzfederal lawz	local law	municipalzcity ordinancestatefederal	federally
governmentgovtdeazdrug enforcement administrationfdazfood and drug administrationatfz"bureau of alcohol tobacco firearms
possessionpossession limitrx  carry	transportgramsouncespoundsozlbkgkilogramcriminalcrimecriminalizemisdemeanorfelony
infractionpenaltyfinesentencejailprisonincarcerationlegislationbillactstatute	ordinancer\  ruleprohibition
prohibitedbanbannedrestriction
restrictedtaxtaxationtaxedz
excise taxz	sales tax
dispensaryretailretailerstoreshopr   zcultivation licensezgrow licensezgrowing permitdistributiondistributor	wholesale
wholesalertestingzlab testing
laboratoryzquality controlqc	packaginglabelinglabelwarningzchild-resistantbusinesszbusiness ownerentrepreneurentrepreneurshipstartupcompanycorporationrevenueprofitmarginzprofit marginearningsincomecostpricepricingzwholesale pricezretail pricezmarket pricemarketzmarket sizezmarket sharezmarket analysiszmarket research	valuationvalueworth
investmentinvestinvestorroizreturn on investmentsalesr  cagrzgrowth rategrowth	expanding	expansionsupplydemandzsupply and demandzprice elasticityzsupply chainr  zbusiness modelzrevenue modelzpricing strategyzmarket entryzentry strategycompetitioncompetitive
competitorzmarket segmentztarget marketniche	financialfinancefundingcapitalequitydebtloancreditpartnershippartnerzjoint venturemergeracquisition	franchisefranchising
franchisee
franchisor	marketingadvertising	promotionbrandbrandingcustomerclientconsumeruserrS  science
scientificrJ   
researcherr  rN  studiesrM  trialrO  zpeer reviewjournalpublicationmethodologymethod	procedureprotocol
experimentexperimentaldatadatasetresultsfindings
conclusion
hypothesistheorycompoundmoleculechemical	chemistrybiochemistryr   distillationchromatographypurification
refinementro   
percentage%ratio
proportionr  analysisanalyze
analyticalrk   quantifyqualifyquantitativequalitativestatistical
statisticsstatisticallysignificantsignificancezp-valuecorrelationr  labr  testassaysamplespecimenrP  zevidence-based	empiricalempiricallyprovenproofbiology
biologicalbotany	botanicalzplant sciencehorticulturehorticulturalr   geneticgenomednarnagenezgenetic modificationgmpharmacologypharmacologicalpharmacokineticpharmacodynamicneuroscienceneurologicalbrainneuralneuronneurotransmitterendocannabinoidzendocannabinoid systemecsreceptorcb1cb2
psychologypsychologicalpsychologistzmental healthzmental illnessr*  
depressive	depressedr+  r,  r-  manicr  anxiouspaniczpanic attackphobiazsocial anxietyr.  zpost-traumatic stressr/  	traumaticr  stressedr?  r@  rA  hyperactivefocusro   r<  autisticr=  r>  aspergerrB  	addictiverC  rE  	dependentrD  r;  	cognitionr=   recalllearningzbrain functionbehavior
behavioralzbehavioral therapycbtzcognitive behavioral therapyr  	therapist
counseling	counselorpsychotherapyr   r   zmental wellness	emotionalemotionmindfulness
meditationr  r  peacefuloptimaloptimumidealbestrecommended	suggestedrR  rQ  	efficient
efficiencyrI  rH  riskrisky	dangerousharmfulbenefit
beneficial	advantageadvantageousqualityzhigh qualitypremiumgradezgrade aorganicorganicallynatural	naturally	synthetic
artificialr   )r   r   r   r   r   r   )r   r   r   r   r   r   )r   r   r   r   r   )r   farmingplantingr   )r   rr  rs  r   )r   r   r   r   r   lighting)lightslampsrv   rw   	nutrients)rd   foodfeedingrd   rx  r{   )r|   dirtr}   earthr  )r  r   r   rK   )r\  r  rc  r\  )rK   r  r  r  )industryr  
commercialyield)r   
productionoutputr   )r   oilr   r   r   r   psychoactiver   cannabidiolznon-psychoactivegolf)golfinglinkscoursegreenputting)puttputtsputterr  zon the greenr  )r  zplaying golfr  r  r  
techniques)methodstips
strategies
approacheswaysbeginner)novicestarternewcomeramateurancient)oldantiquearchaicprehistoricearly
historicalsettlers)	colonists
colonizerspioneers
immigrantsinhabitantsamerica)americasz	new worldzunited statesusaznorth americacolumbus)zchristopher columbuscolomboexplorer
discoverer	discovery)explorationfindingzfinding out
uncoveringhistory)r  past	chroniclerecordtimeliner  )r  r  r  r  artificial intelligence)aimachine learningr  neural networksr  )r  zmachine intelligencezcognitive computing)r  smartr;  	reasoning)r  r  zdeep learningr  )explaindescribeztell me aboutzinformation about)r  wayprocess	technique)reasoncauseexplanationpurpose)timedateperiodera)locationplacesitearea)personpeople
individualfigure)intelligencer  whathowwhywhenwherewho)u5   ph\s*[:\-]?\s*(\d+\.?\d*)\s*[-–—to]\s*(\d+\.?\d*)u,   (\d+\.?\d*)\s*[-–—to]\s*(\d+\.?\d*)\s*phz(\d+\.?\d*)\s*ppmu   (\d+\.?\d*)\s*°[cf]z(\d+\.?\d*)\s*percentz(\d+\.?\d*)\s*%z(\d+\.?\d*)\s*mgz(\d+\.?\d*)\s*milligramz(\d+\.?\d*)\s*mcgz(\d+\.?\d*)\s*mlz(\d+\.?\d*)\s*mg/kgu1   (\d+\.?\d*)\s*mg\s*[-–—to]\s*(\d+\.?\d*)\s*mgz(\d+\.?\d*)\s*gramsz(\d+\.?\d*)\s*ouncesz(\d+\.?\d*)\s*poundsz0\$(\d+[,\d]*\.?\d*)\s*(million|billion|thousand)z&(\d+\.?\d*)\s*%?\s*(roi|margin|growth)z&(\d+\.?\d*)\s*percent\s*(market|share)z)deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B   g?i?B r   g      ?g?g      ?gffffff?      zenrichment_status.jsonzenrichment_log.jsonlRAG_HOSTz	127.0.0.1RAG_PORTi  zmemory_index.indexzmemory_metadata.jsonr   )Aospathlibr   dataclassesr   typingr   r   r'   r   __file__parentBASE_DIRPDF_DIRPROCESSED_DIREMBEDDINGS_DIRDOCUMENTS_DIRMETADATA_DIR	NOTES_DIRDIGESTS_DIRCAPSULES_DIR
MEMORY_DIRdir_pathmkdir
CHUNK_SIZECHUNK_OVERLAPCHUNK_MIN_SIZECHUNK_MAX_SIZESENTENCE_OVERLAPMIN_SENTENCES_PER_CHUNKDOCUMENT_TYPE_CONFIGSEMBEDDING_MODELSEMANTIC_CHUNKING_ENABLEDSEMANTIC_MAX_CHARSSEMANTIC_SIMILARITY_THRESHOLDTECHNICAL_TERMSSYNONYMSMEASUREMENT_PATTERNSLANGUAGE_MODELMAX_NEW_TOKENSTEMPERATURE	DO_SAMPLEKNOWLEDGE_CARD_LLM_BUDGETHYBRID_SEARCH_OVERSAMPLEHYBRID_VECTOR_WEIGHTHYBRID_KEYWORD_WEIGHTHYBRID_MIN_KEYWORD_SCOREHYBRID_BM25_WEIGHTMAX_CHUNKS_PER_SOURCEMIN_CHUNK_SCOREDEFAULT_RETRIEVAL_KENRICHMENT_DEFAULT_THREADSENRICHMENT_MAX_THREADSENRICHMENT_STATUS_PATHENRICHMENT_LOG_PATHenvirongetWEB_HOSTr3   WEB_PORTMEMORY_INDEX_PATHMEMORY_METADATA_PATHCONVERSATION_BUFFER_SIZEMEMORY_SUMMARY_INTERVALMEMORY_RETENTION_DAYSr4   r,   r*   <module>r     s}   	  ! $ 
"& "& "&J >  
_
$;&-+z)G#	i'z)X%
 .-yR]_kmwx 0HNN4$N/0 
  
     ;$ L + "   $ FR4=4 =4 4	4
 54 54 64 m_4 14 24 ;'4 44 54 14 
.4  4!4" 0#4$ 7%4& 
I~&'4( 
M-.)4. 3/40 C142 1344 Y!546 I748 <94> R?4@ TA4B QC4D ME4F HG4H HI4J 7K4P RQ4R 	
TS4T >H J48-27g4n : =	 #             m,z9<TT =)J69OO  ::>>*k2rzz~~j$/0 !55 !$::    r,   