from modules.config.categories import ScriptureCategoryConstants from modules.google_drive.google_drive_utils import convert_drive_url_to_direct from modules.scripture_helpers.bhagavat_gita_helper import ( get_bhagavat_gita_chapters, get_chapter_order_from_bhagavat_gita, ) bhagavat_gita_config = { "name": "bhagavat_gita", "title": "Bhagavat Gita", "banner_url": convert_drive_url_to_direct( "https://drive.google.com/file/d/1HTDB5VdQ1azGvkdeAuKK6MC09Pklh9Og/view?usp=drive_link" ), "category": ScriptureCategoryConstants.VEDANTA, "output_dir": "./output/bhagavat_gita", "collection_name": "bhagavat_gita_openai", "collection_embedding_fn": "openai", "unit": "verse", "unit_field": "relative_verse_number", "chapter_order": lambda: get_chapter_order_from_bhagavat_gita(), "audio_storage": "external", "field_mapping": { "text": "sanskrit", "title": "verse_title", "unit_index": "relative_verse_number", "transliteration": "transliteration", "word_by_word_native": "word_by_word_meaning", "translation": "translation", "author": lambda doc: f"Maharishi Vedvyas Ji", # "chapter_name": "chapter_title", "relative_path": lambda doc: f"{doc.get("chapter_title","")}-{doc.get("relative_verse_number","")}", }, "metadata_fields": [ { "name": "chapter_title", "datatype": "str", "label": "Chapter Name", "description": "Name of the Chapter", "show_as_filter": True, "component": "dropdown", "lov": lambda: get_bhagavat_gita_chapters(), "is_unique": True, }, { "name": "sanskrit", "label": "Lyrics in sanskrit", "datatype": "str", "description": "The original sloka in sanskrit.", }, { "name": "translation", "label": "English Translation", "datatype": "str", "description": "The english translation.", }, { "name": "transliteration", "label": "English Transliteration", "datatype": "str", "description": "The english transliteration.", }, { "name": "relative_verse_number", "label": "Relative Verse Number", "datatype": "int", "description": "The relative verse number of the sloka inside the chapter.", "show_as_filter": True, "is_unique": True, }, ], "pdf_path": "./data/bhagavat_gita.pdf", "source": "https://cdn.vivekavani.com/bg/", "language": "san+eng", "example_labels": [ "About Arjuna", "About Karma", "About birth and death", "About the battle field", "About Krishna's form", "Krishna's Teachings", ], "examples": [ "Show some verses where Krishna advises Arjuna", "What does Krishna say about Karma", "What does Krishna say about birth and death", "describe the battle field", "How did Arjuna respond upon witnessing Krishna’s Vishwarupa?" "What teachings did Krishna share in the Gita?", ], "llm_hints": [], "credits": { "art": [ { "name": "Sri TNCN", "url": "https://www.linkedin.com/in/narashiman-chakravarthy-54326111/", "role": "Illustrator", "notes": "Original artwork used with permission", } ], "data": [ { "name": "Vivekavani", "url": "https://cdn.vivekavani.com/bg/", "role": "Data provider", "license": "CC BY-SA 4.0", } ], "audio": [ { "name": "Vivekavani", "url": "https://vivekavani.com/", "role": "Recitation audio provider", "context": [{"start": 1, "end": 699}], }, ], "video": [], }, }