| import yaml | |
| from pathlib import Path | |
| class RAGConfig: | |
| def __init__(self, config_path="config.yaml"): | |
| with open(config_path, 'r') as f: | |
| self.data = yaml.safe_load(f) | |
| def project(self): return self.data['project'] | |
| def processing(self): return self.data['processing'] | |
| def db(self): return self.data['vector_db'] | |
| def retrieval(self): return self.data['retrieval'] | |
| def gen(self): return self.data['generation'] | |
| def model_list(self): return self.data['models'] | |
| cfg = RAGConfig() |