from modules.config.categories import ScriptureCategoryConstants from modules.google_drive.google_drive_utils import convert_drive_url_to_direct chandogya_upanishad_config = { "name": "chandogya_upanishad", "title": "Chāndogya Upaniṣad", "banner_url": convert_drive_url_to_direct( "https://drive.google.com/file/d/1JsD1k976QNaXRTMB1QtX1ASSbFSo_HoZ/view?usp=drive_link" ), "category": ScriptureCategoryConstants.VEDAM, "output_dir": "./outputs/chandogya_upanishad", "collection_name": "chandogya_upanishad", "collection_embedding_fn": "openai", # ---- units ---- "unit": "sloka", "unit_field": "_global_index", # ---- how documents are interpreted ---- "field_mapping": { "text": "lyrics_sa", "unit_index": "_global_index", # Human-readable reference "relative_path": lambda doc: ( f"{doc['chapter']}.{doc['section']}.{doc['verse']}" ), "author": lambda doc: "Vedic tradition (Sāmaveda)", "translation" : lambda doc: ( f"Simple meaning: \n{doc['simple_meaning_en']}\n" f"Commentary: \n {doc['commentary_en']}" ), "word_by_word_native" : "word_by_word_en", }, # ---- metadata exposed to UI / filters ---- "metadata_fields": [ { "name": "chapter", "datatype": "int", "label": "Chapter", "description": "Chapter (Adhyāya) number", "show_as_filter": True, }, { "name": "section", "datatype": "int", "label": "Section", "description": "Section (Khanda) number within chapter", "show_as_filter": True, }, { "name": "verse", "datatype": "int", "label": "Verse", "description": "Verse number within section", "show_as_filter": True, }, { "name": "_global_index", "datatype": "int", "label": "Global Index", "description": "Absolute verse index across the entire Upanishad", "show_as_filter": True, "is_unique": True, }, { "name": "lyrics_sa", "datatype": "str", "label": "Sanskrit Text", "description": "Original Sanskrit verse", "show_as_filter": True, }, { "name": "lyrics_en", "datatype": "str", "label": "IAST Transliteration", "description": "Roman transliteration of Sanskrit", "show_as_filter": True, }, { "name": "simple_meaning_en", "datatype": "str", "label": "Simple Meaning", "description": "Prose English explanation", "show_as_filter": False, }, { "name": "word_by_word_en", "datatype": "str", "label": "Word-by-word Meaning", "description": "Gloss-based translation", "show_as_filter": False, }, { "name": "commentary_en", "datatype": "str", "label": "Commentary", "description": "Traditional explanatory commentary", "show_as_filter": False, }, ], # ---- source & attribution ---- "pdf_path": None, "source": "wisdomlib.org", "language": "san", "example_labels": [], "examples": [], "llm_hints": [], "credits": { "data": [ { "name": "Wisdom Library", "url": "https://www.wisdomlib.org/hinduism/book/chandogya-upanishad-english", "role": "Data Provider", "photo_url" : "https://www.wisdomlib.org/images/logo.gif", } ], "art": [], "audio": [], "video": [], }, "audio_modes": {}, }