from modules.config.categories import ScriptureCategoryConstants from modules.google_drive.google_drive_utils import convert_drive_url_to_direct import nalayiram_helper divya_prabandham_taniyans_config = { "name": "divya_prabandham_taniyans", "title": "Divya Prabandha Taniyans", "banner_url": convert_drive_url_to_direct( "https://drive.google.com/file/d/1jYdgIXbM3siBOIo3YnQ7JMLv087tRiqL/view?usp=drive_link" ), "category": ScriptureCategoryConstants.LITERATURE, "output_dir": "./output/divya_prabandham_taniyans", "collection_name": "divya_prabandham_taniyans", "collection_embedding_fn": "openai", "unit": "taniyan", "unit_field": "verse", "chapter_order": lambda: nalayiram_helper.get_prabandham_chapter_order_mapping(), "field_mapping": { "text": "pasuram_ta", "title": lambda doc: f"{doc.get('prabandham_name','')} Taniyan", "location": "divya_desams", "word_by_word_native": "wbw_ta", "unit_index": "verse", "transliteration": "pasuram_en", "reference_link": "html_url", "author": "author", "relative_path": lambda doc: "-".join( filter( None, [doc.get("prabandham_name", ""), "Taniyan"], ) ), }, "metadata_fields": [ { "name": "prabandham_name", "label": "Prabandham Name", "datatype": "str", "description": "contains the prabandham name. e.g. `Thiruppallandu`", "show_as_filter": True, "component": "dropdown", "lov": lambda: list( set( [ p.prabandham_name for p in nalayiram_helper.get_standardized_prabandham_names() ] ) ), "is_unique": True, }, { "name": "prabandham_code", "label": "Prabandham Code", "datatype": "str", "description": "contains the short prabandham_code. e.g. `TPL` for `Thiruppallandu`", "is_unique": True, }, { "name": "verse", "label": "Absolute Taniyan Number", "datatype": "int", "is_unique": True, "description": ( "Absolute verse number of the taniyan. Each verse has a unique number." ), }, { "name": "azhwar_name", "label": "Azhwar Name", "datatype": "str", "description": "contains the azhwar name. e.g. `Thirumangai Azhwar`", "show_as_filter": True, "component": "dropdown", "lov": lambda: [ azhwar_name for azhwar_name in nalayiram_helper.get_standardized_azhwar_names() ], }, { "name": "divya_desams", "label": "Divya Desams", "datatype": "str", "description": "comma separated list of divya desams. e.g. Thiruneermalai,Thiruvallikkeni.", "show_as_filter": True, "component": "dropdown", "lov": lambda: [ divya_desam_name for divya_desam_name in nalayiram_helper.get_standardized_divya_desam_names() ], }, { "name": "title", "label": "Taniyan Title", "datatype": "str", "description": ("Exact title of a Taniyan."), "show_as_filter": True, }, { "name": "pasuram_en", "label": "Taniyan Lyrics in English", "datatype": "str", "description": "Taniyan lyrics in English", "show_as_filter": True, }, { "name": "pasuram_ta", "label": "Taniyan Lyrics in Tamil", "datatype": "str", "description": "Taniyan lyrics in Tamil", "show_as_filter": True, }, ], "pdf_path": "./data/divya_prabandham_taniyans.pdf", "source": "https://uveda.org", "language": "tamil", "example_labels": ["Specific taniyan"], "examples": [ "Show me a Taniyan", ], "llm_hints": [ "user this collection only when the user asks about a taniyan (not a pasuram)" ], "credits": { "art": [ { "name": "Sri TNCN", "url": "https://www.linkedin.com/in/narashiman-chakravarthy-54326111/", "role": "Illustrator", "notes": "Original artwork used with permission", "photo_url": "https://drive.google.com/uc?export=download&id=1D4Vo-Mvkp1RdZR6whUkcjvNBIW1yHSUE", } ], "data": [ { "name": "UVeda", "url": "https://uveda.org", "role": "Data provider", "photo_url": "https://www.uveda.org/_next/image?url=%2Fuveda-logo.png&w=750&q=75", } ], "audio": [ { "name": "Srirangam Vikram Vasudevan", "url": "https://www.youtube.com/@onedayoneTaniyan6126", "role": "Virutham audio provider", "context": [{"start": 1, "end": 4000}], "photo_url": "https://yt3.googleusercontent.com/lA5fiJuRDVGxOLkszb6O5DaiR1N7WcRVDHtJSQjO8IxCK-Y3VfMtYZP2Wm1SP0gUx8vj87jA=s160-c-k-c0x00ffffff-no-rj", }, ], "video": [], }, }