Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Upload folder using huggingface_hub
Browse files- config.py +6 -1222
- data/dropbox/scriptures/divya_prabandham/video_metadata.json +96 -0
- modules/config/__init__.py +40 -0
- modules/config/bhagavat_gita.py +85 -0
- modules/config/bhagavata_purana.py +32 -0
- modules/config/chathusloki.py +44 -0
- modules/config/divya_prabandham.py +165 -0
- modules/config/kamba_ramayanam.py +50 -0
- modules/config/kamba_ramayanam_en.py +84 -0
- modules/config/katakam.py +81 -0
- modules/config/pancha_sooktham.py +57 -0
- modules/config/shanthi_panchakam.py +58 -0
- modules/config/shukla_yajur_vedam.py +37 -0
- modules/config/sri_stavam.py +59 -0
- modules/config/taitriya_brahmanam.py +93 -0
- modules/config/taitriya_samhitha.py +93 -0
- modules/config/taitriya_upanishad.py +58 -0
- modules/config/valmiki_ramayanam.py +46 -0
- modules/config/vishnu_puranam.py +42 -0
- modules/config/vishnu_sahasranamam.py +78 -0
- modules/config/yt_metadata.py +62 -0
config.py
CHANGED
|
@@ -1,1231 +1,11 @@
|
|
| 1 |
from metadata import MetadataWhereClause
|
| 2 |
from typing import List, Dict
|
| 3 |
|
| 4 |
-
from modules.
|
| 5 |
-
get_bhagavat_gita_chapters,
|
| 6 |
-
get_chapter_order_from_bhagavat_gita,
|
| 7 |
-
)
|
| 8 |
-
from modules.scripture_helpers.kamba_ramayanam_helper import (
|
| 9 |
-
get_list_of_kandams,
|
| 10 |
-
get_list_of_padalams,
|
| 11 |
-
get_list_of_padalams_in_tamil,
|
| 12 |
-
)
|
| 13 |
-
from modules.scripture_helpers.pancha_sooktham_helper import (
|
| 14 |
-
get_chapter_order_from_pancha_sooktham,
|
| 15 |
-
get_pancha_sooktham_chapters,
|
| 16 |
-
)
|
| 17 |
-
from modules.scripture_helpers.shanthi_panchakam_helper import (
|
| 18 |
-
get_chapter_order_from_shanthi_panchakam,
|
| 19 |
-
get_shanthi_panchakam_chapters,
|
| 20 |
-
)
|
| 21 |
-
from modules.scripture_helpers.taitriya_upanishad_helper import (
|
| 22 |
-
get_chapter_order_from_taitriya_upanishad,
|
| 23 |
-
get_taitriya_upanishad_chapters,
|
| 24 |
-
)
|
| 25 |
-
from modules.scripture_helpers.vishnu_sahasranamam_helper import (
|
| 26 |
-
get_chapter_order_from_sahasranamam,
|
| 27 |
-
get_chapters_from_sahasranamam,
|
| 28 |
-
)
|
| 29 |
-
import nalayiram_helper
|
| 30 |
-
|
| 31 |
|
| 32 |
class SanatanConfig:
|
| 33 |
dbStorePath: str = "./chromadb-store"
|
| 34 |
-
scriptures =
|
| 35 |
-
{
|
| 36 |
-
"name": "vishnu_puranam",
|
| 37 |
-
"title": "Sri Vishnu Puranam",
|
| 38 |
-
"output_dir": "./output/vishnu_puranam",
|
| 39 |
-
"collection_name": "vishnu_puranam_openai",
|
| 40 |
-
"collection_embedding_fn": "openai",
|
| 41 |
-
"unit": "page",
|
| 42 |
-
"metadata_fields": [
|
| 43 |
-
{
|
| 44 |
-
"name": "file",
|
| 45 |
-
"label": "File Name",
|
| 46 |
-
"datatype": "str",
|
| 47 |
-
"description": "name of the file from which the information was extracted",
|
| 48 |
-
},
|
| 49 |
-
{
|
| 50 |
-
"name": "page",
|
| 51 |
-
"datatype": "int",
|
| 52 |
-
"label": "Page Number",
|
| 53 |
-
"description": "Page number from the source",
|
| 54 |
-
"show_as_filter": True,
|
| 55 |
-
"is_unique": True,
|
| 56 |
-
},
|
| 57 |
-
],
|
| 58 |
-
"pdf_path": "./data/vishnu_puranam.pdf",
|
| 59 |
-
"source": "https://dn720005.ca.archive.org/0/items/vishnu-purana-sanskrit-english-ocr/VISHNU-PURANA-Sanskrit-English-OCR.pdf",
|
| 60 |
-
"language": "san+eng",
|
| 61 |
-
"example_labels": [
|
| 62 |
-
"Vishnu's form",
|
| 63 |
-
"About the five elements",
|
| 64 |
-
"About Garuda",
|
| 65 |
-
"Weapons of Vishnu",
|
| 66 |
-
"Vishnu's form (all scriptures)",
|
| 67 |
-
],
|
| 68 |
-
"examples": [
|
| 69 |
-
"describe Vishnu's form as defined in vishnu puranam",
|
| 70 |
-
"five elements and their significance as per vishnu puranam",
|
| 71 |
-
"What is the significance of Garuda? Show some verses from vishnu puranam that describe him.",
|
| 72 |
-
"What weapons does Vishnu hold as mentioned in vishnu puranam?",
|
| 73 |
-
"How is the form of Vishnu described across the scriptures?",
|
| 74 |
-
],
|
| 75 |
-
"llm_hints": [],
|
| 76 |
-
},
|
| 77 |
-
{
|
| 78 |
-
"name": "shukla_yajur_vedam",
|
| 79 |
-
"title": "Shukla Yajur Vedam",
|
| 80 |
-
"output_dir": "./output/shukla_yajur_vedam",
|
| 81 |
-
"collection_name": "shukla_yajur_vedam",
|
| 82 |
-
"unit": "page",
|
| 83 |
-
"metadata_fields": [
|
| 84 |
-
{
|
| 85 |
-
"name": "file",
|
| 86 |
-
"label": "File Name",
|
| 87 |
-
"datatype": "str",
|
| 88 |
-
"description": "name of the file from which the information was extracted",
|
| 89 |
-
},
|
| 90 |
-
{
|
| 91 |
-
"name": "page",
|
| 92 |
-
"datatype": "int",
|
| 93 |
-
"label": "Page Number",
|
| 94 |
-
"description": "Page number from the source",
|
| 95 |
-
"show_as_filter": True,
|
| 96 |
-
"is_unique": True,
|
| 97 |
-
},
|
| 98 |
-
],
|
| 99 |
-
"pdf_path": "./data/shukla-yajur-veda.pdf",
|
| 100 |
-
"source": "https://www.thearyasamaj.org/uploads/book/2014/04/R1sSjG_eLb_sub_406_yajurveda.pdf",
|
| 101 |
-
"language": "san+eng",
|
| 102 |
-
"example_labels": [
|
| 103 |
-
"About Vedam",
|
| 104 |
-
"About the five elements",
|
| 105 |
-
"About Brahma",
|
| 106 |
-
],
|
| 107 |
-
"examples": [
|
| 108 |
-
"Gist of Shukla Yajur Vedam. Give me some sanskrit verses.",
|
| 109 |
-
"What is the significance of fire and water. show some sanskrit verses",
|
| 110 |
-
"Brahma",
|
| 111 |
-
],
|
| 112 |
-
"llm_hints": [],
|
| 113 |
-
},
|
| 114 |
-
{
|
| 115 |
-
"name": "bhagavat_gita",
|
| 116 |
-
"title": "Bhagavat Gita",
|
| 117 |
-
"output_dir": "./output/bhagavat_gita",
|
| 118 |
-
"collection_name": "bhagavat_gita_openai",
|
| 119 |
-
"collection_embedding_fn": "openai",
|
| 120 |
-
"unit": "verse",
|
| 121 |
-
"unit_field": "relative_verse_number",
|
| 122 |
-
"chapter_order": lambda: get_chapter_order_from_bhagavat_gita(),
|
| 123 |
-
"audio_storage": "external",
|
| 124 |
-
"field_mapping": {
|
| 125 |
-
"text": "sanskrit",
|
| 126 |
-
"title": "verse_title",
|
| 127 |
-
"unit_index": "relative_verse_number",
|
| 128 |
-
"transliteration": "transliteration",
|
| 129 |
-
"word_by_word_native": "word_by_word_meaning",
|
| 130 |
-
"translation": "translation",
|
| 131 |
-
"author": lambda doc: f"Maharishi Vedvyas Ji",
|
| 132 |
-
"chapter_name": "chapter_title",
|
| 133 |
-
"relative_path": lambda doc: f"{doc.get("chapter_title","")}-{doc.get("relative_verse_number","")}",
|
| 134 |
-
},
|
| 135 |
-
"metadata_fields": [
|
| 136 |
-
{
|
| 137 |
-
"name": "chapter_title",
|
| 138 |
-
"datatype": "str",
|
| 139 |
-
"label": "Chapter Name",
|
| 140 |
-
"description": "Name of the Chapter",
|
| 141 |
-
"show_as_filter": True,
|
| 142 |
-
"component": "dropdown",
|
| 143 |
-
"lov": lambda: get_bhagavat_gita_chapters(),
|
| 144 |
-
"is_unique": True,
|
| 145 |
-
},
|
| 146 |
-
{
|
| 147 |
-
"name": "sanskrit",
|
| 148 |
-
"label": "Lyrics in sanskrit",
|
| 149 |
-
"datatype": "str",
|
| 150 |
-
"description": "The original sloka in sanskrit.",
|
| 151 |
-
},
|
| 152 |
-
{
|
| 153 |
-
"name": "translation",
|
| 154 |
-
"label": "English Translation",
|
| 155 |
-
"datatype": "str",
|
| 156 |
-
"description": "The english translation.",
|
| 157 |
-
},
|
| 158 |
-
{
|
| 159 |
-
"name": "transliteration",
|
| 160 |
-
"label": "English Transliteration",
|
| 161 |
-
"datatype": "str",
|
| 162 |
-
"description": "The english transliteration.",
|
| 163 |
-
},
|
| 164 |
-
{
|
| 165 |
-
"name": "relative_verse_number",
|
| 166 |
-
"label": "Relative Verse Number",
|
| 167 |
-
"datatype": "int",
|
| 168 |
-
"description": "The relative verse number of the sloka inside the chapter.",
|
| 169 |
-
"show_as_filter": True,
|
| 170 |
-
"is_unique": True,
|
| 171 |
-
},
|
| 172 |
-
],
|
| 173 |
-
"pdf_path": "./data/bhagavat_gita.pdf",
|
| 174 |
-
"source": "https://vivekavani.com/",
|
| 175 |
-
"language": "san+eng",
|
| 176 |
-
"example_labels": [
|
| 177 |
-
"About Arjuna",
|
| 178 |
-
"About Karma",
|
| 179 |
-
"About birth and death",
|
| 180 |
-
"About the battle field",
|
| 181 |
-
"About Krishna's form",
|
| 182 |
-
"Krishna's Teachings",
|
| 183 |
-
],
|
| 184 |
-
"examples": [
|
| 185 |
-
"Show some verses where Krishna advises Arjuna",
|
| 186 |
-
"What does Krishna say about Karma",
|
| 187 |
-
"What does Krishna say about birth and death",
|
| 188 |
-
"describe the battle field",
|
| 189 |
-
"How did Arjuna respond upon witnessing Krishna’s Vishwarupa?"
|
| 190 |
-
"What teachings did Krishna share in the Gita?",
|
| 191 |
-
],
|
| 192 |
-
"llm_hints": [],
|
| 193 |
-
},
|
| 194 |
-
{
|
| 195 |
-
"name": "valmiki_ramayanam",
|
| 196 |
-
"title": "Valmiki Ramayanam",
|
| 197 |
-
"output_dir": "./output/valmiki_ramayanam",
|
| 198 |
-
"collection_name": "valmiki_ramayanam_openai",
|
| 199 |
-
"collection_embedding_fn": "openai",
|
| 200 |
-
"unit": "page",
|
| 201 |
-
"metadata_fields": [
|
| 202 |
-
{
|
| 203 |
-
"name": "file",
|
| 204 |
-
"label": "File Name",
|
| 205 |
-
"datatype": "str",
|
| 206 |
-
"description": "name of the file from which the information was extracted",
|
| 207 |
-
},
|
| 208 |
-
{
|
| 209 |
-
"name": "page",
|
| 210 |
-
"datatype": "int",
|
| 211 |
-
"label": "Page Number",
|
| 212 |
-
"description": "Page number from the source",
|
| 213 |
-
"show_as_filter": True,
|
| 214 |
-
"is_unique": True,
|
| 215 |
-
},
|
| 216 |
-
],
|
| 217 |
-
"pdf_path": "./data/valmiki_ramayanam.pdf",
|
| 218 |
-
"source": "https://ia800509.us.archive.org/28/items/valmiki-ramayana-gita-press-english/Valmiki%20Ramayana%20Gita%20Press%20English.pdf",
|
| 219 |
-
"language": "san+eng",
|
| 220 |
-
"example_labels": [
|
| 221 |
-
"About Jatayu",
|
| 222 |
-
"About Hanuman",
|
| 223 |
-
"About Vali",
|
| 224 |
-
"About Sita",
|
| 225 |
-
"About Ravana",
|
| 226 |
-
"A slokam by name",
|
| 227 |
-
"Vibheeshana sharanagathi slokam",
|
| 228 |
-
],
|
| 229 |
-
"examples": [
|
| 230 |
-
"What is the significance of Jatayu? show some sanskrit verses to support the argument",
|
| 231 |
-
"Show some verses where Hanuman is mentioned",
|
| 232 |
-
"How did Rama kill Vali",
|
| 233 |
-
"How was Sita abducted",
|
| 234 |
-
"How did Rama kill Ravana?",
|
| 235 |
-
"explain sakrudeva prapannaaya shlokam in ramayana",
|
| 236 |
-
"give the shlokam in ramayanam that vibheeshana uses to perform sharanagathi to rama, give the sanskrit shlokam and its meaning",
|
| 237 |
-
],
|
| 238 |
-
"llm_hints": [],
|
| 239 |
-
},
|
| 240 |
-
{
|
| 241 |
-
"name": "vishnu_sahasranamam",
|
| 242 |
-
"title": "Vishnu Sahasranamam",
|
| 243 |
-
"output_dir": "./output/vishnu_sahasranamam",
|
| 244 |
-
"collection_name": "vishnu_sahasranamam_openai",
|
| 245 |
-
"collection_embedding_fn": "openai",
|
| 246 |
-
"unit": "verse",
|
| 247 |
-
"chapter_order": lambda: get_chapter_order_from_sahasranamam(),
|
| 248 |
-
"field_mapping": {
|
| 249 |
-
"text": "sanskrit",
|
| 250 |
-
"title": lambda doc: f"Verse {doc.get('verse','')}",
|
| 251 |
-
"unit_index": "verse",
|
| 252 |
-
"transliteration": "transliteration",
|
| 253 |
-
"translation": "translation",
|
| 254 |
-
"author": lambda doc: f"Sage Vyasa",
|
| 255 |
-
"chapter_name": "chapter",
|
| 256 |
-
"relative_path": lambda doc: f"{doc.get("chapter","")}-{doc.get("verse","")}",
|
| 257 |
-
},
|
| 258 |
-
"metadata_fields": [
|
| 259 |
-
{
|
| 260 |
-
"name": "chapter",
|
| 261 |
-
"datatype": "str",
|
| 262 |
-
"label": "Chapter Name",
|
| 263 |
-
"description": "Name of the Chapter",
|
| 264 |
-
"show_as_filter": True,
|
| 265 |
-
"component": "dropdown",
|
| 266 |
-
"lov": lambda: get_chapters_from_sahasranamam(),
|
| 267 |
-
"is_unique": True,
|
| 268 |
-
},
|
| 269 |
-
{
|
| 270 |
-
"name": "page_number",
|
| 271 |
-
"datatype": "int",
|
| 272 |
-
"label": "Page Number",
|
| 273 |
-
"description": "Page number from the source",
|
| 274 |
-
},
|
| 275 |
-
{
|
| 276 |
-
"name": "sanskrit",
|
| 277 |
-
"label": "Lyrics in sanskrit",
|
| 278 |
-
"datatype": "str",
|
| 279 |
-
"description": "The original sloka in sanskrit.",
|
| 280 |
-
},
|
| 281 |
-
{
|
| 282 |
-
"name": "translation",
|
| 283 |
-
"label": "English Translation",
|
| 284 |
-
"datatype": "str",
|
| 285 |
-
"description": "The english translation.",
|
| 286 |
-
},
|
| 287 |
-
{
|
| 288 |
-
"name": "transliteration",
|
| 289 |
-
"label": "English Transliteration",
|
| 290 |
-
"datatype": "str",
|
| 291 |
-
"description": "The english transliteration.",
|
| 292 |
-
},
|
| 293 |
-
{
|
| 294 |
-
"name": "verse",
|
| 295 |
-
"label": "Verse Number",
|
| 296 |
-
"datatype": "int",
|
| 297 |
-
"description": "The verse number of the sloka.",
|
| 298 |
-
"show_as_filter": True,
|
| 299 |
-
"is_unique": True,
|
| 300 |
-
},
|
| 301 |
-
],
|
| 302 |
-
"pdf_path": "./data/vishnu_sahasranamam.pdf",
|
| 303 |
-
"source": "https://www.swami-krishnananda.org/vishnu/Sri_Vishnu_Sahasranama_Stotram.pdf",
|
| 304 |
-
"language": "san+eng",
|
| 305 |
-
"example_labels": ["Vanamali", "1000 names", "Sanskrit text search"],
|
| 306 |
-
"examples": [
|
| 307 |
-
"Vanamali",
|
| 308 |
-
"Show some of the 1000 names of Vishnu along with their meaning",
|
| 309 |
-
"show the verse that begins with शुक्लाम्बरधरं",
|
| 310 |
-
],
|
| 311 |
-
"llm_hints": [],
|
| 312 |
-
},
|
| 313 |
-
{
|
| 314 |
-
"name": "divya_prabandham",
|
| 315 |
-
"title": "4000 Divya Prabandham",
|
| 316 |
-
"output_dir": "./output/divya_prabandham",
|
| 317 |
-
"collection_name": "divya_prabandham",
|
| 318 |
-
"collection_embedding_fn": "openai",
|
| 319 |
-
"unit": "pasuram",
|
| 320 |
-
"unit_field" : "verse",
|
| 321 |
-
"credits": "We owe deep gratitude to uveda.org for providing such beautifully curated data. 🙏 This section would not have been possible without the dedicated efforts of the Uveda team.",
|
| 322 |
-
"field_mapping": {
|
| 323 |
-
"text": "pasuram_ta",
|
| 324 |
-
"title": lambda doc: f"{doc.get('prabandham_name','')} {doc.get('chapter','')}-{doc.get('decade','')}:{doc.get('position_in_chapter','')}",
|
| 325 |
-
"location": "divya_desams",
|
| 326 |
-
"word_by_word_native": "wbw_ta",
|
| 327 |
-
"unit_index": "verse",
|
| 328 |
-
"transliteration": "pasuram_en",
|
| 329 |
-
"reference_link": "html_url",
|
| 330 |
-
"author": "azhwar_name",
|
| 331 |
-
"chapter_name": "prabandham_name",
|
| 332 |
-
"relative_path": lambda doc: "-".join(
|
| 333 |
-
filter(
|
| 334 |
-
None,
|
| 335 |
-
[
|
| 336 |
-
doc.get("prabandham_name", ""),
|
| 337 |
-
*(
|
| 338 |
-
str(doc.get(k))
|
| 339 |
-
for k in ["decade", "chapter", "position_in_chapter"]
|
| 340 |
-
if doc.get(k, -1) != -1
|
| 341 |
-
),
|
| 342 |
-
],
|
| 343 |
-
)
|
| 344 |
-
),
|
| 345 |
-
},
|
| 346 |
-
"metadata_fields": [
|
| 347 |
-
{
|
| 348 |
-
"name": "prabandham_code",
|
| 349 |
-
"label": "Prabandham Code",
|
| 350 |
-
"datatype": "str",
|
| 351 |
-
"description": "contains the short prabandham_code. e.g. `TPL` for `Thiruppallandu`",
|
| 352 |
-
},
|
| 353 |
-
{
|
| 354 |
-
"name": "prabandham_name",
|
| 355 |
-
"label": "Prabandham Name",
|
| 356 |
-
"datatype": "str",
|
| 357 |
-
"description": "contains the prabandham name. e.g. `Thiruppallandu`",
|
| 358 |
-
"show_as_filter": True,
|
| 359 |
-
"component": "dropdown",
|
| 360 |
-
"lov": lambda: [
|
| 361 |
-
p.prabandham_name
|
| 362 |
-
for p in nalayiram_helper.get_standardized_prabandham_names()
|
| 363 |
-
],
|
| 364 |
-
},
|
| 365 |
-
{
|
| 366 |
-
"name": "azhwar_name",
|
| 367 |
-
"label": "Azhwar Name",
|
| 368 |
-
"datatype": "str",
|
| 369 |
-
"description": "contains the azhwar name. e.g. `Thirumangai Azhwar`",
|
| 370 |
-
"show_as_filter": True,
|
| 371 |
-
"component": "dropdown",
|
| 372 |
-
"lov": lambda: [
|
| 373 |
-
azhwar_name
|
| 374 |
-
for azhwar_name in nalayiram_helper.get_standardized_azhwar_names()
|
| 375 |
-
],
|
| 376 |
-
},
|
| 377 |
-
{
|
| 378 |
-
"name": "divya_desams",
|
| 379 |
-
"label": "Divya Desams",
|
| 380 |
-
"datatype": "str",
|
| 381 |
-
"description": "comma separated list of divya desams. e.g. Thiruneermalai,Thiruvallikkeni.",
|
| 382 |
-
"show_as_filter": True,
|
| 383 |
-
"component": "dropdown",
|
| 384 |
-
"lov": lambda: [
|
| 385 |
-
divya_desam_name
|
| 386 |
-
for divya_desam_name in nalayiram_helper.get_standardized_divya_desam_names()
|
| 387 |
-
],
|
| 388 |
-
},
|
| 389 |
-
{
|
| 390 |
-
"name": "title",
|
| 391 |
-
"label": "Pasuram Title",
|
| 392 |
-
"datatype": "str",
|
| 393 |
-
"description": (
|
| 394 |
-
"Exact title of a pasuram in one of the following formats:\n"
|
| 395 |
-
"1. '{prabandham_code} {decade}.{chapter}.{pasuram}' — use when the prabandham has decades.\n"
|
| 396 |
-
"2. '{prabandham_code} {chapter}.{pasuram}' — use when the prabandham does not have decades.\n\n"
|
| 397 |
-
"⚠️ Use this field ONLY when the user provides a specific prabandham and a relative verse number.\n"
|
| 398 |
-
"Examples of valid usage:\n"
|
| 399 |
-
"- User query: '3rd pasuram in the 8th Thiruvaimozhi of the 1st decade.'\n"
|
| 400 |
-
" → Convert to: '{prabandham_code} 1.8.3' and pass as `title` filter.\n"
|
| 401 |
-
"- User query: '2nd pasuram of chapter 5 in [Prabandham with no decades].'\n"
|
| 402 |
-
" → Convert to: '{prabandham_code} 5.2' and pass as `title` filter.\n"
|
| 403 |
-
"Do NOT use `title` for general queries or keyword searches — leave it empty in those cases."
|
| 404 |
-
),
|
| 405 |
-
"show_as_filter": True,
|
| 406 |
-
},
|
| 407 |
-
{
|
| 408 |
-
"name": "verse",
|
| 409 |
-
"label": "Absolute Pasuram Number",
|
| 410 |
-
"datatype": "int",
|
| 411 |
-
"is_unique": True,
|
| 412 |
-
"description": (
|
| 413 |
-
"Absolute verse number or pasuram number. Each verse has a unique number."
|
| 414 |
-
# "Use it only when a specific prabandham name is NOT mentioned in the user query."
|
| 415 |
-
"For e.g. 'Give me pasuram 1176'"
|
| 416 |
-
),
|
| 417 |
-
"show_as_filter": True,
|
| 418 |
-
},
|
| 419 |
-
{
|
| 420 |
-
"name": "decade",
|
| 421 |
-
"label": "Decade Number (Pathu)",
|
| 422 |
-
"datatype": "int",
|
| 423 |
-
"description": (
|
| 424 |
-
"The decade (or `pathu` in Tamil) that this pasuram belongs to. decade is -1 when there is no associated decade."
|
| 425 |
-
),
|
| 426 |
-
"show_as_filter": True,
|
| 427 |
-
},
|
| 428 |
-
{
|
| 429 |
-
"name": "chapter",
|
| 430 |
-
"label": "Chapter Number",
|
| 431 |
-
"datatype": "int",
|
| 432 |
-
"description": (
|
| 433 |
-
"chapter number of this pasuram. is -1 when there is no associated chapter number"
|
| 434 |
-
),
|
| 435 |
-
"show_as_filter": True,
|
| 436 |
-
},
|
| 437 |
-
{
|
| 438 |
-
"name": "position_in_chapter",
|
| 439 |
-
"label": "Relative Pasuram Number",
|
| 440 |
-
"datatype": "int",
|
| 441 |
-
"description": (
|
| 442 |
-
"Relative verse number or pasuram number within a chapter."
|
| 443 |
-
"Use it only when a specific prabandham name is mentioned in the user query."
|
| 444 |
-
"For e.g. 'Give me the 5th pasuram from Thirupavai'"
|
| 445 |
-
),
|
| 446 |
-
"show_as_filter": True,
|
| 447 |
-
},
|
| 448 |
-
],
|
| 449 |
-
"pdf_path": "./data/divya_prabandham.pdf",
|
| 450 |
-
"source": "https://uveda.org",
|
| 451 |
-
"language": "tamil",
|
| 452 |
-
"example_labels": [
|
| 453 |
-
"About the five elements",
|
| 454 |
-
"About Garuda",
|
| 455 |
-
"Pasuram about Krishna's Flute",
|
| 456 |
-
"Andal's pasuram",
|
| 457 |
-
"Specific Pasuram (absolute)",
|
| 458 |
-
"Pasuram by Azhwar",
|
| 459 |
-
"Specific pasuram(relative)",
|
| 460 |
-
"Decade and Chapter Search",
|
| 461 |
-
],
|
| 462 |
-
"examples": [
|
| 463 |
-
"five elements and their significance as defined in divya_prabandham",
|
| 464 |
-
"What is the significance of Garuda? Show some verses from divya prabandham that describe him.",
|
| 465 |
-
"Show me a pasuram that talks about how the animals and birds enjoy Krishna's flute playing.",
|
| 466 |
-
"Give me a pasuram by Andal",
|
| 467 |
-
"Show me Pasuram 1187 ",
|
| 468 |
-
"Show me a pasuram by Thondaradippodi azhwar",
|
| 469 |
-
"Give me the 2nd pasuram in the 3rd Thiruvaimozhi from the 2nd decade",
|
| 470 |
-
"Give me just a few words from the starting lines and reference links of all 11 pasurams from thiruvaimozhi 5th decade 4th chapter.",
|
| 471 |
-
],
|
| 472 |
-
"llm_hints": [
|
| 473 |
-
"If the user wishes to query at a decade or chapter level for a given prabandham, use the direct metadata query on the appropriate fields once instead of querying the tool multiple times for each pasuram from the chapter."
|
| 474 |
-
],
|
| 475 |
-
},
|
| 476 |
-
{
|
| 477 |
-
"name": "bhagavata_purana",
|
| 478 |
-
"title": "Bhagavatha Puranam",
|
| 479 |
-
"output_dir": "./output/bhagavata_purana",
|
| 480 |
-
"collection_name": "bhagavata_purana",
|
| 481 |
-
"unit": "page",
|
| 482 |
-
"metadata_fields": [
|
| 483 |
-
{
|
| 484 |
-
"name": "file",
|
| 485 |
-
"label": "File Name",
|
| 486 |
-
"datatype": "str",
|
| 487 |
-
"description": "name of the file from which the information was extracted",
|
| 488 |
-
},
|
| 489 |
-
{
|
| 490 |
-
"name": "page",
|
| 491 |
-
"datatype": "int",
|
| 492 |
-
"label": "Page Number",
|
| 493 |
-
"description": "Page number from the source",
|
| 494 |
-
"show_as_filter": True,
|
| 495 |
-
"is_unique": True,
|
| 496 |
-
},
|
| 497 |
-
],
|
| 498 |
-
"pdf_path": "./data/bhagavata_purana.pdf",
|
| 499 |
-
"source": "https://dn790003.ca.archive.org/0/items/bhagavatapuranagitapress_201907/Bhagavata%20Purana%20-%20Gita%20Press_text.pdf",
|
| 500 |
-
"language": "san+eng",
|
| 501 |
-
"example_labels": ["Gajendra Moksham", "Prahalad"],
|
| 502 |
-
"examples": [
|
| 503 |
-
"State some verses that showcase the devotion of Gajendra the elephant",
|
| 504 |
-
"State some verses that showcase the devotion of Prahlada",
|
| 505 |
-
],
|
| 506 |
-
"llm_hints": [],
|
| 507 |
-
},
|
| 508 |
-
{
|
| 509 |
-
"name": "kamba_ramayanam_en",
|
| 510 |
-
"title": "Kamba Ramayanam (English)",
|
| 511 |
-
"output_dir": "./output/kamba_ramayanam",
|
| 512 |
-
"collection_name": "kamba_ramayanam_en",
|
| 513 |
-
"unit": "verse",
|
| 514 |
-
"unit_field": "verse_number",
|
| 515 |
-
"field_mapping": {
|
| 516 |
-
"chapter_name": lambda doc: f"{doc.get('kandam','')}",
|
| 517 |
-
"title": lambda doc: f"{doc.get('padalam_ta','')} - {doc.get('padalam_en','')}".strip(),
|
| 518 |
-
"author": lambda doc: "Kamban",
|
| 519 |
-
"unit_index": "verse_number",
|
| 520 |
-
"verse": lambda doc: int(doc.get("verse_number", "0")),
|
| 521 |
-
"relative_path": lambda doc: f"{doc.get('padalam_ta','')} - {doc.get('padalam_en','')}".strip(),
|
| 522 |
-
},
|
| 523 |
-
"metadata_fields": [
|
| 524 |
-
{
|
| 525 |
-
"name": "kandam",
|
| 526 |
-
"label": "Kandam",
|
| 527 |
-
"datatype": "str",
|
| 528 |
-
"description": "The name of the Kandam or the chapter.",
|
| 529 |
-
"show_as_filter": True,
|
| 530 |
-
"component": "dropdown",
|
| 531 |
-
"lov": lambda: get_list_of_kandams(),
|
| 532 |
-
},
|
| 533 |
-
{
|
| 534 |
-
"name": "padalam_en",
|
| 535 |
-
"label": "Chapter Name",
|
| 536 |
-
"datatype": "str",
|
| 537 |
-
"description": "The name of the Padalam (Episode) in English.",
|
| 538 |
-
"show_as_filter": True,
|
| 539 |
-
"component": "dropdown",
|
| 540 |
-
"lov": lambda: get_list_of_padalams(),
|
| 541 |
-
},
|
| 542 |
-
{
|
| 543 |
-
"name": "padalam_ta",
|
| 544 |
-
"label": "Padalam name in Tamil",
|
| 545 |
-
"datatype": "str",
|
| 546 |
-
"description": "The name of the Padalam (Episode) in Tamil.",
|
| 547 |
-
"show_as_filter": True,
|
| 548 |
-
"component": "dropdown",
|
| 549 |
-
"lov": lambda: get_list_of_padalams_in_tamil(),
|
| 550 |
-
},
|
| 551 |
-
{
|
| 552 |
-
"name": "page",
|
| 553 |
-
"datatype": "int",
|
| 554 |
-
"label": "Page Number",
|
| 555 |
-
"description": "Page number from the source",
|
| 556 |
-
"show_as_filter": True,
|
| 557 |
-
},
|
| 558 |
-
{
|
| 559 |
-
"name": "verse_number",
|
| 560 |
-
"datatype": "int",
|
| 561 |
-
"label": "Verse Number",
|
| 562 |
-
"description": "Verse Number",
|
| 563 |
-
"show_as_filter": True,
|
| 564 |
-
"is_unique": True,
|
| 565 |
-
},
|
| 566 |
-
],
|
| 567 |
-
"pdf_path": "./data/kamba_ramayanam.pdf",
|
| 568 |
-
"source": "https://www.hindupedia.com/images/1/13/Kamba_Ramayanam_I.pdf",
|
| 569 |
-
"language": "tamil",
|
| 570 |
-
"example_labels": [
|
| 571 |
-
"About Jatayu",
|
| 572 |
-
"About Hanuman",
|
| 573 |
-
"About Vali",
|
| 574 |
-
"About Sita",
|
| 575 |
-
"About Ravana",
|
| 576 |
-
],
|
| 577 |
-
"examples": [
|
| 578 |
-
"What is the significance of Jatayu? show some sanskrit verses to support the argument",
|
| 579 |
-
"Show some verses where Hanuman is mentioned",
|
| 580 |
-
"How did Rama kill Vali",
|
| 581 |
-
"How was Sita abducted",
|
| 582 |
-
"How did Rama kill Ravana?",
|
| 583 |
-
],
|
| 584 |
-
"llm_hints": [],
|
| 585 |
-
},
|
| 586 |
-
{
|
| 587 |
-
"name": "kamba_ramayanam",
|
| 588 |
-
"title": "Kamba Ramayanam (Tamil)",
|
| 589 |
-
"output_dir": "./output/kamba_ramayanam",
|
| 590 |
-
"collection_name": "kamba_ramayanam",
|
| 591 |
-
"unit": "chunk",
|
| 592 |
-
"unit_field": "chunk_index",
|
| 593 |
-
"field_mapping": {
|
| 594 |
-
"chapter_name": lambda doc: f"{doc.get('kandam','')}",
|
| 595 |
-
"title": lambda doc: f"{doc.get('padalam_ta','')} - {doc.get('padalam_en','')}".strip(),
|
| 596 |
-
"author": lambda doc: "Kamban",
|
| 597 |
-
"unit_index": "chunk_index",
|
| 598 |
-
"verse": lambda doc: int(doc.get("verse_number", "0")),
|
| 599 |
-
"relative_path": lambda doc: f"{doc.get('padalam_ta','')} - {doc.get('padalam_en','')}".strip(),
|
| 600 |
-
},
|
| 601 |
-
"metadata_fields": [
|
| 602 |
-
{
|
| 603 |
-
"name": "chunk_index",
|
| 604 |
-
"label": "Page Index",
|
| 605 |
-
"datatype": "int",
|
| 606 |
-
"description": "The index of the chunk",
|
| 607 |
-
"show_as_filter": True,
|
| 608 |
-
"is_unique": True,
|
| 609 |
-
},
|
| 610 |
-
{
|
| 611 |
-
"name": "filename",
|
| 612 |
-
"label": "File name from the source",
|
| 613 |
-
"datatype": "str",
|
| 614 |
-
"description": "The name of the file.",
|
| 615 |
-
},
|
| 616 |
-
],
|
| 617 |
-
"pdf_path": "./data/kamba_ramayanam.pdf",
|
| 618 |
-
"source": "https://archive.org/details/vrajeshkumar_gmail_061/01-%E0%AE%AA%E0%AE%BE%E0%AE%B2%20%E0%AE%95%E0%AE%BE%E0%AE%A3%E0%AF%8D%E0%AE%9F%E0%AE%AE%E0%AF%8D/page/n15/mode/2up",
|
| 619 |
-
"language": "tamil",
|
| 620 |
-
"example_labels": [
|
| 621 |
-
"About Jatayu",
|
| 622 |
-
"About Hanuman",
|
| 623 |
-
"About Vali",
|
| 624 |
-
"About Sita",
|
| 625 |
-
"About Ravana",
|
| 626 |
-
],
|
| 627 |
-
"examples": [
|
| 628 |
-
"What is the significance of Jatayu? show some sanskrit verses to support the argument",
|
| 629 |
-
"Show some verses where Hanuman is mentioned",
|
| 630 |
-
"How did Rama kill Vali",
|
| 631 |
-
"How was Sita abducted",
|
| 632 |
-
"How did Rama kill Ravana?",
|
| 633 |
-
],
|
| 634 |
-
"llm_hints": [],
|
| 635 |
-
},
|
| 636 |
-
{
|
| 637 |
-
"name": "chathusloki",
|
| 638 |
-
"title": "Chathusloki by Sri Alavandar",
|
| 639 |
-
"output_dir": "./output/chathusloki",
|
| 640 |
-
"collection_name": "chathusloki",
|
| 641 |
-
"unit": "verse",
|
| 642 |
-
"unit_field": "sloka_number",
|
| 643 |
-
"field_mapping": {
|
| 644 |
-
"text": "sloka_devanagari",
|
| 645 |
-
"title": lambda doc: f"Verse {doc.get('verse','')}",
|
| 646 |
-
"unit_index": "sloka_number",
|
| 647 |
-
"transliteration": "sloka_english_transliteration",
|
| 648 |
-
"word_by_word_native": "meaning",
|
| 649 |
-
"author": lambda doc: f"Sri Aalavandhaar",
|
| 650 |
-
"relative_path": lambda doc: f"Chathusloki-{doc.get("sloka_number","")}",
|
| 651 |
-
},
|
| 652 |
-
"metadata_fields": [
|
| 653 |
-
{
|
| 654 |
-
"name": "sloka_number",
|
| 655 |
-
"label": "Slokam Number",
|
| 656 |
-
"datatype": "int",
|
| 657 |
-
"description": "The index of the sloka or verse",
|
| 658 |
-
"show_as_filter": True,
|
| 659 |
-
"is_unique": True,
|
| 660 |
-
},
|
| 661 |
-
{
|
| 662 |
-
"name": "meaning_short",
|
| 663 |
-
"label": "Short meaning",
|
| 664 |
-
"datatype": "str",
|
| 665 |
-
"description": "A short meaning of the sanskrit verse in English.",
|
| 666 |
-
"show_as_filter": True,
|
| 667 |
-
},
|
| 668 |
-
],
|
| 669 |
-
"pdf_path": "./data/chathusloki.pdf",
|
| 670 |
-
"source": "https://www.sadagopan.org/ebook/pdf/Chatusloki%20-%20VS.pdf",
|
| 671 |
-
"language": "san+eng",
|
| 672 |
-
"example_labels": ["Recite a sloka", "Commentary", "Role of Sridevi"],
|
| 673 |
-
"examples": [
|
| 674 |
-
"Recite the 1st sloka from Chathusloki",
|
| 675 |
-
"Show detailed commentary for sloka 2 from Chathusloki",
|
| 676 |
-
"What is the role of Sri Devi in the universe according to the Chathusloki?",
|
| 677 |
-
],
|
| 678 |
-
"llm_hints": [],
|
| 679 |
-
},
|
| 680 |
-
{
|
| 681 |
-
"name": "sri_stavam",
|
| 682 |
-
"title": "Sri Stavam by Sri Koorathazhwan",
|
| 683 |
-
"output_dir": "./output/sri_stavam",
|
| 684 |
-
"collection_name": "sri_stavam",
|
| 685 |
-
"unit": "slokam",
|
| 686 |
-
"unit_field": "sloka_number",
|
| 687 |
-
"field_mapping": {
|
| 688 |
-
"text": "sanskrit",
|
| 689 |
-
"title": lambda doc: f"Verse {doc.get('verse','')}",
|
| 690 |
-
"unit_index": "sloka_number",
|
| 691 |
-
"transliteration": "transliteration",
|
| 692 |
-
"word_by_word_native": "meaning_short",
|
| 693 |
-
"author": lambda doc: f"Sri Koorathazhwan",
|
| 694 |
-
"relative_path": lambda doc: f"Sri Stavam-{doc.get("sloka_number","")}",
|
| 695 |
-
},
|
| 696 |
-
"metadata_fields": [
|
| 697 |
-
{
|
| 698 |
-
"name": "sloka_number",
|
| 699 |
-
"label": "Slokam Number",
|
| 700 |
-
"datatype": "int",
|
| 701 |
-
"description": "The index of the sloka or verse",
|
| 702 |
-
"show_as_filter": True,
|
| 703 |
-
"is_unique": True,
|
| 704 |
-
},
|
| 705 |
-
{
|
| 706 |
-
"name": "meaning_short",
|
| 707 |
-
"label": "Short meaning",
|
| 708 |
-
"datatype": "str",
|
| 709 |
-
"description": "A short meaning of the sanskrit verse in English.",
|
| 710 |
-
"show_as_filter": True,
|
| 711 |
-
},
|
| 712 |
-
{
|
| 713 |
-
"name": "sanskrit",
|
| 714 |
-
"label": "Lyrics in sanskrit",
|
| 715 |
-
"datatype": "str",
|
| 716 |
-
"description": "Verse in sanskrit",
|
| 717 |
-
},
|
| 718 |
-
{
|
| 719 |
-
"name": "transliteration",
|
| 720 |
-
"label": "English Transliteration",
|
| 721 |
-
"datatype": "str",
|
| 722 |
-
"description": "Verse transliterated to English",
|
| 723 |
-
"show_as_filter": True,
|
| 724 |
-
},
|
| 725 |
-
],
|
| 726 |
-
"pdf_path": "./data/sri_stavam.pdf",
|
| 727 |
-
"source": "https://www.sadagopan.org/ebook/pdf/Sri%20Stavam.pdf",
|
| 728 |
-
"language": "san+eng",
|
| 729 |
-
"example_labels": ["Recite a sloka", "Commentary", "Role of Sridevi"],
|
| 730 |
-
"examples": [
|
| 731 |
-
"Recite the 1st sloka from Sri Stavam",
|
| 732 |
-
"Show detailed commentary for sloka 2 from Sri Stavam",
|
| 733 |
-
"What is the role of Sri Devi in the universe according to the Sri Stavam?",
|
| 734 |
-
],
|
| 735 |
-
"llm_hints": [
|
| 736 |
-
"if the user asks for nth sloka, do a metadata search on the `verse` field."
|
| 737 |
-
],
|
| 738 |
-
},
|
| 739 |
-
{
|
| 740 |
-
"name": "yt_metadata",
|
| 741 |
-
"title": "Sampradayam in YouTube",
|
| 742 |
-
"output_dir": "./output/yt_metadata",
|
| 743 |
-
"collection_name": "yt_metadata",
|
| 744 |
-
"collection_embedding_fn": "openai",
|
| 745 |
-
"unit": "video",
|
| 746 |
-
"field_mapping": {
|
| 747 |
-
"text": "description",
|
| 748 |
-
"title": "video_title",
|
| 749 |
-
"author": "channel_title",
|
| 750 |
-
"reference_link": lambda doc: f"https://www.youtube.com/watch?v={doc.get('video_id','')}",
|
| 751 |
-
},
|
| 752 |
-
"metadata_fields": [
|
| 753 |
-
{
|
| 754 |
-
"name": "video_id",
|
| 755 |
-
"label": "Video ID",
|
| 756 |
-
"datatype": "str",
|
| 757 |
-
"description": "The video id as in YouTube",
|
| 758 |
-
"show_as_filter": True,
|
| 759 |
-
"is_unique": True,
|
| 760 |
-
},
|
| 761 |
-
{
|
| 762 |
-
"name": "video_title",
|
| 763 |
-
"label": "Video Title",
|
| 764 |
-
"datatype": "str",
|
| 765 |
-
"description": "The title of the video as in YouTube",
|
| 766 |
-
"show_as_filter": True,
|
| 767 |
-
},
|
| 768 |
-
{
|
| 769 |
-
"name": "description",
|
| 770 |
-
"label": "Video Description",
|
| 771 |
-
"datatype": "str",
|
| 772 |
-
"description": "Description as in YouTube",
|
| 773 |
-
"show_as_filter": True,
|
| 774 |
-
},
|
| 775 |
-
{
|
| 776 |
-
"name": "channel_url",
|
| 777 |
-
"label": "Channel URL",
|
| 778 |
-
"datatype": "str",
|
| 779 |
-
"description": "URL of the YouTube Channel",
|
| 780 |
-
},
|
| 781 |
-
{
|
| 782 |
-
"name": "channel_title",
|
| 783 |
-
"label": "Channel Title",
|
| 784 |
-
"datatype": "str",
|
| 785 |
-
"description": "Title of the YouTube Channel",
|
| 786 |
-
"show_as_filter": True,
|
| 787 |
-
},
|
| 788 |
-
],
|
| 789 |
-
"pdf_path": "./data/none.pdf",
|
| 790 |
-
"source": "https://youtube.com",
|
| 791 |
-
"language": "san+eng+tam",
|
| 792 |
-
"example_labels": ["Srirangam", "Pasuram video"],
|
| 793 |
-
"examples": [
|
| 794 |
-
"Show me YouTube videos that talk about Srirangam",
|
| 795 |
-
"Show me lyrics of 1st pasuram of 1st decade in the 4st Thiruvaimozhi. Also show the related youtube videos.",
|
| 796 |
-
],
|
| 797 |
-
"llm_hints": [
|
| 798 |
-
"if the user asks for YouTube videos, DO NOT do a web search, instead do a search on this collection."
|
| 799 |
-
],
|
| 800 |
-
},
|
| 801 |
-
{
|
| 802 |
-
"name": "pancha_sooktham",
|
| 803 |
-
"title": "Pancha Sooktham",
|
| 804 |
-
"output_dir": "./output/pancha_sooktham",
|
| 805 |
-
"collection_name": "pancha_sooktham",
|
| 806 |
-
"collection_embedding_fn": "openai",
|
| 807 |
-
"unit": "verse",
|
| 808 |
-
"unit_field": "relative_verse_number",
|
| 809 |
-
"chapter_order": lambda: get_chapter_order_from_pancha_sooktham(),
|
| 810 |
-
"field_mapping": {
|
| 811 |
-
"text": "sanskrit",
|
| 812 |
-
"unit_index": "relative_verse_number",
|
| 813 |
-
"transliteration": lambda doc: f"English: \n{doc.get('english')}\n\nதமிழ்: \n{doc.get('tamil')}\n\nతెలుగు: \n{doc.get('telugu')}\n\nಕನ್ನಡ: \n{doc.get('kannada')}",
|
| 814 |
-
"chapter_name": "chapter_title",
|
| 815 |
-
"relative_path": lambda doc: f"{doc.get('chapter_title',"")}-{doc.get('relative_verse_number',"")}",
|
| 816 |
-
},
|
| 817 |
-
"metadata_fields": [
|
| 818 |
-
{
|
| 819 |
-
"name": "chapter_title",
|
| 820 |
-
"datatype": "str",
|
| 821 |
-
"label": "Chapter Name",
|
| 822 |
-
"description": "Name of the Chapter",
|
| 823 |
-
"show_as_filter": True,
|
| 824 |
-
"component": "dropdown",
|
| 825 |
-
"lov": lambda: get_pancha_sooktham_chapters(),
|
| 826 |
-
"is_unique": True,
|
| 827 |
-
},
|
| 828 |
-
{
|
| 829 |
-
"name": "sanskrit",
|
| 830 |
-
"label": "Lyrics in sanskrit",
|
| 831 |
-
"datatype": "str",
|
| 832 |
-
"description": "The original sloka in sanskrit.",
|
| 833 |
-
},
|
| 834 |
-
{
|
| 835 |
-
"name": "relative_verse_number",
|
| 836 |
-
"label": "Relative Verse Number",
|
| 837 |
-
"datatype": "int",
|
| 838 |
-
"description": "The relative verse number of the sloka inside the chapter.",
|
| 839 |
-
"show_as_filter": True,
|
| 840 |
-
"is_unique": True,
|
| 841 |
-
},
|
| 842 |
-
],
|
| 843 |
-
"pdf_path": "./data/pancha_sooktham.pdf",
|
| 844 |
-
"source": "https://stotranidhi.com/",
|
| 845 |
-
"language": "san+eng",
|
| 846 |
-
"example_labels": [
|
| 847 |
-
"Purusha Sooktham",
|
| 848 |
-
],
|
| 849 |
-
"examples": [
|
| 850 |
-
"Show some verses from purusha sooktham",
|
| 851 |
-
],
|
| 852 |
-
"llm_hints": [],
|
| 853 |
-
},
|
| 854 |
-
{
|
| 855 |
-
"name": "taitriya_upanishad",
|
| 856 |
-
"title": "Taitriya Upanishad",
|
| 857 |
-
"output_dir": "./output/taitriya_upanishad",
|
| 858 |
-
"collection_name": "taitriya_upanishad",
|
| 859 |
-
"collection_embedding_fn": "openai",
|
| 860 |
-
"unit": "verse",
|
| 861 |
-
"unit_field": "relative_verse_number",
|
| 862 |
-
"chapter_order": lambda: get_chapter_order_from_taitriya_upanishad(),
|
| 863 |
-
"field_mapping": {
|
| 864 |
-
"text": "sanskrit",
|
| 865 |
-
"unit_index": "relative_verse_number",
|
| 866 |
-
"transliteration": lambda doc: f"English: \n{doc.get('english')}\n\nதமிழ்: \n{doc.get('tamil')}\n\nతెలుగు: \n{doc.get('telugu')}\n\nಕನ್ನಡ: \n{doc.get('kannada')}",
|
| 867 |
-
"chapter_name": "chapter_title",
|
| 868 |
-
"relative_path": lambda doc: f"{doc.get('chapter_title',"")}-{doc.get('relative_verse_number',"")}",
|
| 869 |
-
},
|
| 870 |
-
"metadata_fields": [
|
| 871 |
-
{
|
| 872 |
-
"name": "chapter_title",
|
| 873 |
-
"datatype": "str",
|
| 874 |
-
"label": "Chapter Name",
|
| 875 |
-
"description": "Name of the Chapter",
|
| 876 |
-
"show_as_filter": True,
|
| 877 |
-
"component": "dropdown",
|
| 878 |
-
"lov": lambda: get_taitriya_upanishad_chapters(),
|
| 879 |
-
"is_unique": True,
|
| 880 |
-
},
|
| 881 |
-
{
|
| 882 |
-
"name": "sanskrit",
|
| 883 |
-
"label": "Lyrics in sanskrit",
|
| 884 |
-
"datatype": "str",
|
| 885 |
-
"description": "The original sloka in sanskrit.",
|
| 886 |
-
},
|
| 887 |
-
{
|
| 888 |
-
"name": "relative_verse_number",
|
| 889 |
-
"label": "Relative Verse Number",
|
| 890 |
-
"datatype": "int",
|
| 891 |
-
"description": "The relative verse number of the sloka inside the chapter.",
|
| 892 |
-
"show_as_filter": True,
|
| 893 |
-
"is_unique": True,
|
| 894 |
-
},
|
| 895 |
-
],
|
| 896 |
-
"pdf_path": "./data/taitriya_upanishad.pdf",
|
| 897 |
-
"source": "https://stotranidhi.com/",
|
| 898 |
-
"language": "san+eng",
|
| 899 |
-
"example_labels": [
|
| 900 |
-
"Seeksha Valli",
|
| 901 |
-
],
|
| 902 |
-
"examples": [
|
| 903 |
-
"Show some verses from Seeksha Valli",
|
| 904 |
-
],
|
| 905 |
-
"llm_hints": [],
|
| 906 |
-
},
|
| 907 |
-
{
|
| 908 |
-
"name": "shanthi_panchakam",
|
| 909 |
-
"title": "Shanthi Panchakam",
|
| 910 |
-
"output_dir": "./output/shanthi_panchakam",
|
| 911 |
-
"collection_name": "shanthi_panchakam",
|
| 912 |
-
"collection_embedding_fn": "openai",
|
| 913 |
-
"unit": "verse",
|
| 914 |
-
"unit_field": "relative_verse_number",
|
| 915 |
-
"chapter_order": lambda: get_chapter_order_from_shanthi_panchakam(),
|
| 916 |
-
"field_mapping": {
|
| 917 |
-
"text": "sanskrit",
|
| 918 |
-
"unit_index": "relative_verse_number",
|
| 919 |
-
"transliteration": lambda doc: f"English: \n{doc.get('english')}\n\nதமிழ்: \n{doc.get('tamil')}\n\nతెలుగు: \n{doc.get('telugu')}\n\nಕನ್ನಡ: \n{doc.get('kannada')}",
|
| 920 |
-
"chapter_name": "chapter_title",
|
| 921 |
-
"relative_path": lambda doc: f"{doc.get('chapter_title',"")}-{doc.get('relative_verse_number',"")}",
|
| 922 |
-
},
|
| 923 |
-
"metadata_fields": [
|
| 924 |
-
{
|
| 925 |
-
"name": "chapter_title",
|
| 926 |
-
"datatype": "str",
|
| 927 |
-
"label": "Chapter Name",
|
| 928 |
-
"description": "Name of the Chapter",
|
| 929 |
-
"show_as_filter": True,
|
| 930 |
-
"component": "dropdown",
|
| 931 |
-
"lov": lambda: get_shanthi_panchakam_chapters(),
|
| 932 |
-
"is_unique": True,
|
| 933 |
-
},
|
| 934 |
-
{
|
| 935 |
-
"name": "sanskrit",
|
| 936 |
-
"label": "Lyrics in sanskrit",
|
| 937 |
-
"datatype": "str",
|
| 938 |
-
"description": "The original sloka in sanskrit.",
|
| 939 |
-
},
|
| 940 |
-
{
|
| 941 |
-
"name": "relative_verse_number",
|
| 942 |
-
"label": "Relative Verse Number",
|
| 943 |
-
"datatype": "int",
|
| 944 |
-
"description": "The relative verse number of the sloka inside the chapter.",
|
| 945 |
-
"show_as_filter": True,
|
| 946 |
-
"is_unique": True,
|
| 947 |
-
},
|
| 948 |
-
],
|
| 949 |
-
"pdf_path": "./data/shanthi_panchakam.pdf",
|
| 950 |
-
"source": "https://vignanam.org/english/shanti-panchakam.html",
|
| 951 |
-
"language": "san+eng",
|
| 952 |
-
"example_labels": [
|
| 953 |
-
"Shanthi Panchakam",
|
| 954 |
-
],
|
| 955 |
-
"examples": [
|
| 956 |
-
"Show some verses from Shanthi Panchakam",
|
| 957 |
-
],
|
| 958 |
-
"llm_hints": [],
|
| 959 |
-
},
|
| 960 |
-
{
|
| 961 |
-
"name": "taitriya_samhitha",
|
| 962 |
-
"title": "Taitriya Samhitha",
|
| 963 |
-
"output_dir": "./output/taitriya_samhitha",
|
| 964 |
-
"collection_name": "taitriya_samhitha",
|
| 965 |
-
"collection_embedding_fn": "openai",
|
| 966 |
-
"unit": "panchadhi",
|
| 967 |
-
"unit_field": "panchadhi",
|
| 968 |
-
# "chapter_order": lambda: get_chapter_order_from_taitriya_samhitha(),
|
| 969 |
-
"field_mapping": {
|
| 970 |
-
"text": "sanskrit",
|
| 971 |
-
"unit_index": "panchadhi",
|
| 972 |
-
"transliteration": "transliteration",
|
| 973 |
-
"chapter_name": lambda doc: (
|
| 974 |
-
doc.get("prashnam_name")
|
| 975 |
-
if doc.get("prashnam_name") and doc.get("prashnam_name") != "-"
|
| 976 |
-
else (
|
| 977 |
-
doc.get("kandam_name")
|
| 978 |
-
if doc.get("kandam_name") and doc.get("kandam_name") != "-"
|
| 979 |
-
else "-"
|
| 980 |
-
)
|
| 981 |
-
),
|
| 982 |
-
"relative_path": lambda doc: (
|
| 983 |
-
"-"
|
| 984 |
-
if not doc.get("panchadhi") or doc.get("panchadhi") == "-"
|
| 985 |
-
else f"{doc.get('kandam')}.{doc.get('prashnam')}.{doc.get('anuvakam')}.{doc.get('panchadhi_index')} || {doc.get('panchadhi_sa')} ||"
|
| 986 |
-
),
|
| 987 |
-
},
|
| 988 |
-
"metadata_fields": [
|
| 989 |
-
{
|
| 990 |
-
"name": "kandam",
|
| 991 |
-
"datatype": "int",
|
| 992 |
-
"label": "Kandam Number",
|
| 993 |
-
"description": "Kandam Number",
|
| 994 |
-
"show_as_filter": True,
|
| 995 |
-
"is_unique": True,
|
| 996 |
-
},
|
| 997 |
-
{
|
| 998 |
-
"name": "prashnam",
|
| 999 |
-
"datatype": "int",
|
| 1000 |
-
"label": "Prashnam Number",
|
| 1001 |
-
"description": "Prashnam Number",
|
| 1002 |
-
"show_as_filter": True,
|
| 1003 |
-
"is_unique": True,
|
| 1004 |
-
},
|
| 1005 |
-
{
|
| 1006 |
-
"name": "anuvakam",
|
| 1007 |
-
"datatype": "int",
|
| 1008 |
-
"label": "Anuvakam Number",
|
| 1009 |
-
"description": "Anuvakam Number",
|
| 1010 |
-
"show_as_filter": True,
|
| 1011 |
-
"is_unique": True,
|
| 1012 |
-
},
|
| 1013 |
-
{
|
| 1014 |
-
"name": "panchadhi_index",
|
| 1015 |
-
"datatype": "int",
|
| 1016 |
-
"label": "Relative Panchadhi Number",
|
| 1017 |
-
"description": "Relative Panchadhi Number",
|
| 1018 |
-
"show_as_filter": True,
|
| 1019 |
-
"is_unique": True,
|
| 1020 |
-
},
|
| 1021 |
-
{
|
| 1022 |
-
"name": "panchadhi",
|
| 1023 |
-
"datatype": "int",
|
| 1024 |
-
"label": "Absolute Panchadhi Number",
|
| 1025 |
-
"description": "Absolute Panchadhi Number",
|
| 1026 |
-
"show_as_filter": True,
|
| 1027 |
-
"is_unique": True,
|
| 1028 |
-
},
|
| 1029 |
-
{
|
| 1030 |
-
"name": "sanskrit",
|
| 1031 |
-
"label": "Lyrics in sanskrit",
|
| 1032 |
-
"datatype": "str",
|
| 1033 |
-
"description": "The original sloka in sanskrit.",
|
| 1034 |
-
},
|
| 1035 |
-
{
|
| 1036 |
-
"name": "transliteration",
|
| 1037 |
-
"label": "Transliteration in english",
|
| 1038 |
-
"datatype": "str",
|
| 1039 |
-
"description": "The original sloka transliterated in English.",
|
| 1040 |
-
},
|
| 1041 |
-
],
|
| 1042 |
-
"pdf_path": "./data/taitriya_samhitha.pdf",
|
| 1043 |
-
"source": "https://sanskritdocuments.org/doc_veda/taittirIyasamhitA.html",
|
| 1044 |
-
"language": "san+eng",
|
| 1045 |
-
"example_labels": [
|
| 1046 |
-
"Taitriya Samhitha",
|
| 1047 |
-
],
|
| 1048 |
-
"examples": [
|
| 1049 |
-
"Show some verses from Taitriya Samhitha",
|
| 1050 |
-
],
|
| 1051 |
-
"llm_hints": [],
|
| 1052 |
-
},
|
| 1053 |
-
{
|
| 1054 |
-
"name": "taitriya_brahmanam",
|
| 1055 |
-
"title": "Taitriya Brahmanam",
|
| 1056 |
-
"output_dir": "./output/taitriya_brahmanam",
|
| 1057 |
-
"collection_name": "taitriya_brahmanam",
|
| 1058 |
-
"collection_embedding_fn": "openai",
|
| 1059 |
-
"unit": "panchadhi",
|
| 1060 |
-
"unit_field": "panchadhi",
|
| 1061 |
-
# "chapter_order": lambda: get_chapter_order_from_taitriya_brahmanam(),
|
| 1062 |
-
"field_mapping": {
|
| 1063 |
-
"text": "sanskrit",
|
| 1064 |
-
"unit_index": "panchadhi",
|
| 1065 |
-
"transliteration": "transliteration",
|
| 1066 |
-
"chapter_name": lambda doc: (
|
| 1067 |
-
doc.get("prapaatakam_name")
|
| 1068 |
-
if doc.get("prapaatakam_name") and doc.get("prapaatakam_name") != "-"
|
| 1069 |
-
else (
|
| 1070 |
-
doc.get("ashtakam_name")
|
| 1071 |
-
if doc.get("ashtakam_name") and doc.get("ashtakam_name") != "-"
|
| 1072 |
-
else "-"
|
| 1073 |
-
)
|
| 1074 |
-
),
|
| 1075 |
-
"relative_path": lambda doc: (
|
| 1076 |
-
"-"
|
| 1077 |
-
if not doc.get("panchadhi") or doc.get("panchadhi") == "-"
|
| 1078 |
-
else f"{doc.get('ashtakam')}.{doc.get('prapaatakam')}.{doc.get('anuvakam')}.{doc.get('panchadhi_index')} || {doc.get('panchadhi_sa')} ||"
|
| 1079 |
-
),
|
| 1080 |
-
},
|
| 1081 |
-
"metadata_fields": [
|
| 1082 |
-
{
|
| 1083 |
-
"name": "ashtakam",
|
| 1084 |
-
"datatype": "int",
|
| 1085 |
-
"label": "Ashtakam Number",
|
| 1086 |
-
"description": "Ashtakam Number",
|
| 1087 |
-
"show_as_filter": True,
|
| 1088 |
-
"is_unique": True,
|
| 1089 |
-
},
|
| 1090 |
-
{
|
| 1091 |
-
"name": "prapaatakam",
|
| 1092 |
-
"datatype": "int",
|
| 1093 |
-
"label": "Prapaatakam Number",
|
| 1094 |
-
"description": "Prapaatakam Number",
|
| 1095 |
-
"show_as_filter": True,
|
| 1096 |
-
"is_unique": True,
|
| 1097 |
-
},
|
| 1098 |
-
{
|
| 1099 |
-
"name": "anuvakam",
|
| 1100 |
-
"datatype": "int",
|
| 1101 |
-
"label": "Anuvakam Number",
|
| 1102 |
-
"description": "Anuvakam Number",
|
| 1103 |
-
"show_as_filter": True,
|
| 1104 |
-
"is_unique": True,
|
| 1105 |
-
},
|
| 1106 |
-
{
|
| 1107 |
-
"name": "panchadhi_index",
|
| 1108 |
-
"datatype": "int",
|
| 1109 |
-
"label": "Relative Panchadhi Number",
|
| 1110 |
-
"description": "Relative Panchadhi Number",
|
| 1111 |
-
"show_as_filter": True,
|
| 1112 |
-
"is_unique": True,
|
| 1113 |
-
},
|
| 1114 |
-
{
|
| 1115 |
-
"name": "panchadhi",
|
| 1116 |
-
"datatype": "int",
|
| 1117 |
-
"label": "Absolute Panchadhi Number",
|
| 1118 |
-
"description": "Absolute Panchadhi Number",
|
| 1119 |
-
"show_as_filter": True,
|
| 1120 |
-
"is_unique": True,
|
| 1121 |
-
},
|
| 1122 |
-
{
|
| 1123 |
-
"name": "sanskrit",
|
| 1124 |
-
"label": "Lyrics in sanskrit",
|
| 1125 |
-
"datatype": "str",
|
| 1126 |
-
"description": "The original sloka in sanskrit.",
|
| 1127 |
-
},
|
| 1128 |
-
{
|
| 1129 |
-
"name": "transliteration",
|
| 1130 |
-
"label": "Transliteration in english",
|
| 1131 |
-
"datatype": "str",
|
| 1132 |
-
"description": "The original sloka transliterated in English.",
|
| 1133 |
-
},
|
| 1134 |
-
],
|
| 1135 |
-
"pdf_path": "./data/taitriya_brahmanam.pdf",
|
| 1136 |
-
"source": "https://sanskritdocuments.org/doc_veda/taittirIyabrAhmaNam.html",
|
| 1137 |
-
"language": "san+eng",
|
| 1138 |
-
"example_labels": [
|
| 1139 |
-
"Taitriya Brahmanam",
|
| 1140 |
-
],
|
| 1141 |
-
"examples": [
|
| 1142 |
-
"Show some verses from Taitriya Brahmanam",
|
| 1143 |
-
],
|
| 1144 |
-
"llm_hints": [],
|
| 1145 |
-
},
|
| 1146 |
-
{
|
| 1147 |
-
"name": "katakam",
|
| 1148 |
-
"title": "Katakam",
|
| 1149 |
-
"output_dir": "./output/katakam",
|
| 1150 |
-
"collection_name": "katakam",
|
| 1151 |
-
"collection_embedding_fn": "openai",
|
| 1152 |
-
"unit": "panchadhi",
|
| 1153 |
-
"unit_field": "panchadhi",
|
| 1154 |
-
# "chapter_order": lambda: get_chapter_order_from_katakam(),
|
| 1155 |
-
"field_mapping": {
|
| 1156 |
-
"text": "sanskrit",
|
| 1157 |
-
"unit_index": "panchadhi",
|
| 1158 |
-
"transliteration": "transliteration",
|
| 1159 |
-
"chapter_name": lambda doc: (
|
| 1160 |
-
doc.get("prapaatakam_name")
|
| 1161 |
-
if doc.get("prapaatakam_name") and doc.get("prapaatakam_name") != "-"
|
| 1162 |
-
else "॥ काठकम् ॥"
|
| 1163 |
-
),
|
| 1164 |
-
"relative_path": lambda doc: (
|
| 1165 |
-
"-"
|
| 1166 |
-
if not doc.get("panchadhi") or doc.get("panchadhi") == "-"
|
| 1167 |
-
else f"{doc.get('prapaatakam')}.{doc.get('anuvakam')}.{doc.get('panchadhi_index')} || {doc.get('panchadhi_sa')} ||"
|
| 1168 |
-
),
|
| 1169 |
-
},
|
| 1170 |
-
"metadata_fields": [
|
| 1171 |
-
{
|
| 1172 |
-
"name": "prapaatakam",
|
| 1173 |
-
"datatype": "int",
|
| 1174 |
-
"label": "Prapaatakam Number",
|
| 1175 |
-
"description": "Prapaatakam Number",
|
| 1176 |
-
"show_as_filter": True,
|
| 1177 |
-
"is_unique": True,
|
| 1178 |
-
},
|
| 1179 |
-
{
|
| 1180 |
-
"name": "anuvakam",
|
| 1181 |
-
"datatype": "int",
|
| 1182 |
-
"label": "Anuvakam Number",
|
| 1183 |
-
"description": "Anuvakam Number",
|
| 1184 |
-
"show_as_filter": True,
|
| 1185 |
-
"is_unique": True,
|
| 1186 |
-
},
|
| 1187 |
-
{
|
| 1188 |
-
"name": "panchadhi_index",
|
| 1189 |
-
"datatype": "int",
|
| 1190 |
-
"label": "Relative Panchadhi Number",
|
| 1191 |
-
"description": "Relative Panchadhi Number",
|
| 1192 |
-
"show_as_filter": True,
|
| 1193 |
-
"is_unique": True,
|
| 1194 |
-
},
|
| 1195 |
-
{
|
| 1196 |
-
"name": "panchadhi",
|
| 1197 |
-
"datatype": "int",
|
| 1198 |
-
"label": "Absolute Panchadhi Number",
|
| 1199 |
-
"description": "Absolute Panchadhi Number",
|
| 1200 |
-
"show_as_filter": True,
|
| 1201 |
-
"is_unique": True,
|
| 1202 |
-
},
|
| 1203 |
-
{
|
| 1204 |
-
"name": "sanskrit",
|
| 1205 |
-
"label": "Lyrics in sanskrit",
|
| 1206 |
-
"datatype": "str",
|
| 1207 |
-
"description": "The original sloka in sanskrit.",
|
| 1208 |
-
},
|
| 1209 |
-
{
|
| 1210 |
-
"name": "transliteration",
|
| 1211 |
-
"label": "Transliteration in english",
|
| 1212 |
-
"datatype": "str",
|
| 1213 |
-
"description": "The original sloka transliterated in English.",
|
| 1214 |
-
},
|
| 1215 |
-
],
|
| 1216 |
-
"pdf_path": "./data/katakam.pdf",
|
| 1217 |
-
"source": "https://sanskritdocuments.org/doc_veda/taittirIyabrAhmaNam.html",
|
| 1218 |
-
"language": "san+eng",
|
| 1219 |
-
"example_labels": [
|
| 1220 |
-
"Katakam",
|
| 1221 |
-
],
|
| 1222 |
-
"examples": [
|
| 1223 |
-
"Show some verses from Katakam",
|
| 1224 |
-
],
|
| 1225 |
-
"llm_hints": [],
|
| 1226 |
-
},
|
| 1227 |
-
]
|
| 1228 |
-
|
| 1229 |
def get_scripture_by_collection(self, collection_name: str):
|
| 1230 |
return [
|
| 1231 |
scripture
|
|
@@ -1365,3 +145,7 @@ class SanatanConfig:
|
|
| 1365 |
)
|
| 1366 |
collection_name = config.get("collection_name")
|
| 1367 |
return collection_name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from metadata import MetadataWhereClause
|
| 2 |
from typing import List, Dict
|
| 3 |
|
| 4 |
+
from modules.config import scripture_configurations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
class SanatanConfig:
|
| 7 |
dbStorePath: str = "./chromadb-store"
|
| 8 |
+
scriptures = scripture_configurations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
def get_scripture_by_collection(self, collection_name: str):
|
| 10 |
return [
|
| 11 |
scripture
|
|
|
|
| 145 |
)
|
| 146 |
collection_name = config.get("collection_name")
|
| 147 |
return collection_name
|
| 148 |
+
|
| 149 |
+
if __name__ == "__main__":
|
| 150 |
+
print(SanatanConfig.scriptures)
|
| 151 |
+
[scripture["collection_name"] for scripture in SanatanConfig.scriptures]
|
data/dropbox/scriptures/divya_prabandham/video_metadata.json
CHANGED
|
@@ -77,30 +77,126 @@
|
|
| 77 |
"video_url": "https://www.youtube.com/watch?v=6DFMA-hG7Vs",
|
| 78 |
"type": "virutham"
|
| 79 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
{
|
| 81 |
"scripture": "divya_prabandham",
|
| 82 |
"global_index": 475,
|
| 83 |
"video_url": "https://www.youtube.com/watch?v=hBR9Cu0sev0",
|
| 84 |
"type": "virutham"
|
| 85 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
{
|
| 87 |
"scripture": "divya_prabandham",
|
| 88 |
"global_index": 476,
|
| 89 |
"video_url": "https://www.youtube.com/watch?v=gEx7wtE7kxc",
|
| 90 |
"type": "virutham"
|
| 91 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
{
|
| 93 |
"scripture": "divya_prabandham",
|
| 94 |
"global_index": 477,
|
| 95 |
"video_url": "https://www.youtube.com/watch?v=wE2C-Xzrcfg",
|
| 96 |
"type": "virutham"
|
| 97 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
{
|
| 99 |
"scripture": "divya_prabandham",
|
| 100 |
"global_index": 478,
|
| 101 |
"video_url": "https://www.youtube.com/watch?v=ql3Be2uckjY",
|
| 102 |
"type": "virutham"
|
| 103 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
{
|
| 105 |
"scripture": "divya_prabandham",
|
| 106 |
"global_index": 479,
|
|
|
|
| 77 |
"video_url": "https://www.youtube.com/watch?v=6DFMA-hG7Vs",
|
| 78 |
"type": "virutham"
|
| 79 |
},
|
| 80 |
+
{
|
| 81 |
+
"scripture": "divya_prabandham",
|
| 82 |
+
"global_index": 474,
|
| 83 |
+
"video_url": "https://www.youtube.com/shorts/E3wanN1FiCs",
|
| 84 |
+
"type": "upanyasam"
|
| 85 |
+
},
|
| 86 |
{
|
| 87 |
"scripture": "divya_prabandham",
|
| 88 |
"global_index": 475,
|
| 89 |
"video_url": "https://www.youtube.com/watch?v=hBR9Cu0sev0",
|
| 90 |
"type": "virutham"
|
| 91 |
},
|
| 92 |
+
{
|
| 93 |
+
"scripture": "divya_prabandham",
|
| 94 |
+
"global_index": 475,
|
| 95 |
+
"video_url": "https://www.youtube.com/shorts/lF3NMduim2I",
|
| 96 |
+
"type": "upanyasam"
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"scripture": "divya_prabandham",
|
| 100 |
+
"global_index": 475,
|
| 101 |
+
"video_url": "https://www.youtube.com/shorts/rcYDiw4q2Po",
|
| 102 |
+
"type": "upanyasam 2"
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"scripture": "divya_prabandham",
|
| 106 |
+
"global_index": 475,
|
| 107 |
+
"video_url": "https://www.youtube.com/shorts/fHFBUMkcd_o",
|
| 108 |
+
"type": "upanyasam 3"
|
| 109 |
+
},
|
| 110 |
+
{
|
| 111 |
+
"scripture": "divya_prabandham",
|
| 112 |
+
"global_index": 475,
|
| 113 |
+
"video_url": "https://www.youtube.com/shorts/Flyra2mqopM",
|
| 114 |
+
"type": "upanyasam 4"
|
| 115 |
+
},
|
| 116 |
+
{
|
| 117 |
+
"scripture": "divya_prabandham",
|
| 118 |
+
"global_index": 475,
|
| 119 |
+
"video_url": "https://www.youtube.com/shorts/Px6VoeaVJu4",
|
| 120 |
+
"type": "upanyasam 4"
|
| 121 |
+
},
|
| 122 |
{
|
| 123 |
"scripture": "divya_prabandham",
|
| 124 |
"global_index": 476,
|
| 125 |
"video_url": "https://www.youtube.com/watch?v=gEx7wtE7kxc",
|
| 126 |
"type": "virutham"
|
| 127 |
},
|
| 128 |
+
{
|
| 129 |
+
"scripture": "divya_prabandham",
|
| 130 |
+
"global_index": 476,
|
| 131 |
+
"video_url": "https://www.youtube.com/shorts/ccyBfd3vQcU",
|
| 132 |
+
"type": "upanyasam"
|
| 133 |
+
},
|
| 134 |
+
{
|
| 135 |
+
"scripture": "divya_prabandham",
|
| 136 |
+
"global_index": 476,
|
| 137 |
+
"video_url": "https://www.youtube.com/shorts/y0N65owAa5c",
|
| 138 |
+
"type": "upanyasam 2"
|
| 139 |
+
},
|
| 140 |
+
{
|
| 141 |
+
"scripture": "divya_prabandham",
|
| 142 |
+
"global_index": 476,
|
| 143 |
+
"video_url": "https://www.youtube.com/shorts/T3GH0YOpHc0",
|
| 144 |
+
"type": "upanyasam 3"
|
| 145 |
+
},
|
| 146 |
+
{
|
| 147 |
+
"scripture": "divya_prabandham",
|
| 148 |
+
"global_index": 476,
|
| 149 |
+
"video_url": "https://www.youtube.com/shorts/5idsyjWrpVg",
|
| 150 |
+
"type": "upanyasam 4"
|
| 151 |
+
},
|
| 152 |
{
|
| 153 |
"scripture": "divya_prabandham",
|
| 154 |
"global_index": 477,
|
| 155 |
"video_url": "https://www.youtube.com/watch?v=wE2C-Xzrcfg",
|
| 156 |
"type": "virutham"
|
| 157 |
},
|
| 158 |
+
{
|
| 159 |
+
"scripture": "divya_prabandham",
|
| 160 |
+
"global_index": 477,
|
| 161 |
+
"video_url": "https://www.youtube.com/shorts/N8Z042bZdTQ",
|
| 162 |
+
"type": "upanyasam"
|
| 163 |
+
},
|
| 164 |
+
{
|
| 165 |
+
"scripture": "divya_prabandham",
|
| 166 |
+
"global_index": 477,
|
| 167 |
+
"video_url": "https://www.youtube.com/shorts/EJyqA1QhsV4",
|
| 168 |
+
"type": "upanyasam 2"
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"scripture": "divya_prabandham",
|
| 172 |
+
"global_index": 477,
|
| 173 |
+
"video_url": "https://www.youtube.com/shorts/ksEh6PQ1Jh4",
|
| 174 |
+
"type": "upanyasam 3"
|
| 175 |
+
},
|
| 176 |
{
|
| 177 |
"scripture": "divya_prabandham",
|
| 178 |
"global_index": 478,
|
| 179 |
"video_url": "https://www.youtube.com/watch?v=ql3Be2uckjY",
|
| 180 |
"type": "virutham"
|
| 181 |
},
|
| 182 |
+
{
|
| 183 |
+
"scripture": "divya_prabandham",
|
| 184 |
+
"global_index": 478,
|
| 185 |
+
"video_url": "https://www.youtube.com/shorts/dLguVgyXVKA",
|
| 186 |
+
"type": "upanyasam"
|
| 187 |
+
},
|
| 188 |
+
{
|
| 189 |
+
"scripture": "divya_prabandham",
|
| 190 |
+
"global_index": 478,
|
| 191 |
+
"video_url": "https://www.youtube.com/shorts/FE-mI732zmQ",
|
| 192 |
+
"type": "upanyasam 2"
|
| 193 |
+
},
|
| 194 |
+
{
|
| 195 |
+
"scripture": "divya_prabandham",
|
| 196 |
+
"global_index": 478,
|
| 197 |
+
"video_url": "https://www.youtube.com/shorts/lb5IxMn2M_8",
|
| 198 |
+
"type": "upanyasam 3"
|
| 199 |
+
},
|
| 200 |
{
|
| 201 |
"scripture": "divya_prabandham",
|
| 202 |
"global_index": 479,
|
modules/config/__init__.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.config.bhagavat_gita import bhagavat_gita_config
|
| 2 |
+
from modules.config.bhagavata_purana import bhagavata_purana_config
|
| 3 |
+
from modules.config.chathusloki import chathusloki_config
|
| 4 |
+
from modules.config.divya_prabandham import divya_prabandham_config
|
| 5 |
+
from modules.config.kamba_ramayanam import kamba_ramayanam_config
|
| 6 |
+
from modules.config.kamba_ramayanam_en import kamba_ramayanam_en_config
|
| 7 |
+
from modules.config.katakam import katakam_config
|
| 8 |
+
from modules.config.pancha_sooktham import pancha_sooktham_config
|
| 9 |
+
from modules.config.shanthi_panchakam import shanthi_panchakam_config
|
| 10 |
+
from modules.config.shukla_yajur_vedam import shukla_yajur_vedam_config
|
| 11 |
+
from modules.config.sri_stavam import sri_stavam_config
|
| 12 |
+
from modules.config.taitriya_brahmanam import taitriya_brahmanam_config
|
| 13 |
+
from modules.config.taitriya_samhitha import taitriya_samhitha_config
|
| 14 |
+
from modules.config.taitriya_upanishad import taitriya_upanishad_config
|
| 15 |
+
from modules.config.valmiki_ramayanam import valmiki_ramayanam_config
|
| 16 |
+
from modules.config.vishnu_puranam import vishnu_puranam_config
|
| 17 |
+
from modules.config.vishnu_sahasranamam import vishnu_sahasranamam_config
|
| 18 |
+
from modules.config.yt_metadata import yt_metadata_config
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
scripture_configurations = [
|
| 22 |
+
bhagavat_gita_config,
|
| 23 |
+
bhagavata_purana_config,
|
| 24 |
+
chathusloki_config,
|
| 25 |
+
divya_prabandham_config,
|
| 26 |
+
kamba_ramayanam_en_config,
|
| 27 |
+
kamba_ramayanam_config,
|
| 28 |
+
katakam_config,
|
| 29 |
+
pancha_sooktham_config,
|
| 30 |
+
shanthi_panchakam_config,
|
| 31 |
+
shukla_yajur_vedam_config,
|
| 32 |
+
sri_stavam_config,
|
| 33 |
+
taitriya_brahmanam_config,
|
| 34 |
+
taitriya_samhitha_config,
|
| 35 |
+
taitriya_upanishad_config,
|
| 36 |
+
valmiki_ramayanam_config,
|
| 37 |
+
vishnu_puranam_config,
|
| 38 |
+
vishnu_sahasranamam_config,
|
| 39 |
+
yt_metadata_config,
|
| 40 |
+
]
|
modules/config/bhagavat_gita.py
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.scripture_helpers.bhagavat_gita_helper import (
|
| 2 |
+
get_bhagavat_gita_chapters,
|
| 3 |
+
get_chapter_order_from_bhagavat_gita,
|
| 4 |
+
)
|
| 5 |
+
|
| 6 |
+
bhagavat_gita_config = {
|
| 7 |
+
"name": "bhagavat_gita",
|
| 8 |
+
"title": "Bhagavat Gita",
|
| 9 |
+
"output_dir": "./output/bhagavat_gita",
|
| 10 |
+
"collection_name": "bhagavat_gita_openai",
|
| 11 |
+
"collection_embedding_fn": "openai",
|
| 12 |
+
"unit": "verse",
|
| 13 |
+
"unit_field": "relative_verse_number",
|
| 14 |
+
"chapter_order": lambda: get_chapter_order_from_bhagavat_gita(),
|
| 15 |
+
"audio_storage": "external",
|
| 16 |
+
"field_mapping": {
|
| 17 |
+
"text": "sanskrit",
|
| 18 |
+
"title": "verse_title",
|
| 19 |
+
"unit_index": "relative_verse_number",
|
| 20 |
+
"transliteration": "transliteration",
|
| 21 |
+
"word_by_word_native": "word_by_word_meaning",
|
| 22 |
+
"translation": "translation",
|
| 23 |
+
"author": lambda doc: f"Maharishi Vedvyas Ji",
|
| 24 |
+
"chapter_name": "chapter_title",
|
| 25 |
+
"relative_path": lambda doc: f"{doc.get("chapter_title","")}-{doc.get("relative_verse_number","")}",
|
| 26 |
+
},
|
| 27 |
+
"metadata_fields": [
|
| 28 |
+
{
|
| 29 |
+
"name": "chapter_title",
|
| 30 |
+
"datatype": "str",
|
| 31 |
+
"label": "Chapter Name",
|
| 32 |
+
"description": "Name of the Chapter",
|
| 33 |
+
"show_as_filter": True,
|
| 34 |
+
"component": "dropdown",
|
| 35 |
+
"lov": lambda: get_bhagavat_gita_chapters(),
|
| 36 |
+
"is_unique": True,
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"name": "sanskrit",
|
| 40 |
+
"label": "Lyrics in sanskrit",
|
| 41 |
+
"datatype": "str",
|
| 42 |
+
"description": "The original sloka in sanskrit.",
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"name": "translation",
|
| 46 |
+
"label": "English Translation",
|
| 47 |
+
"datatype": "str",
|
| 48 |
+
"description": "The english translation.",
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"name": "transliteration",
|
| 52 |
+
"label": "English Transliteration",
|
| 53 |
+
"datatype": "str",
|
| 54 |
+
"description": "The english transliteration.",
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"name": "relative_verse_number",
|
| 58 |
+
"label": "Relative Verse Number",
|
| 59 |
+
"datatype": "int",
|
| 60 |
+
"description": "The relative verse number of the sloka inside the chapter.",
|
| 61 |
+
"show_as_filter": True,
|
| 62 |
+
"is_unique": True,
|
| 63 |
+
},
|
| 64 |
+
],
|
| 65 |
+
"pdf_path": "./data/bhagavat_gita.pdf",
|
| 66 |
+
"source": "https://vivekavani.com/",
|
| 67 |
+
"language": "san+eng",
|
| 68 |
+
"example_labels": [
|
| 69 |
+
"About Arjuna",
|
| 70 |
+
"About Karma",
|
| 71 |
+
"About birth and death",
|
| 72 |
+
"About the battle field",
|
| 73 |
+
"About Krishna's form",
|
| 74 |
+
"Krishna's Teachings",
|
| 75 |
+
],
|
| 76 |
+
"examples": [
|
| 77 |
+
"Show some verses where Krishna advises Arjuna",
|
| 78 |
+
"What does Krishna say about Karma",
|
| 79 |
+
"What does Krishna say about birth and death",
|
| 80 |
+
"describe the battle field",
|
| 81 |
+
"How did Arjuna respond upon witnessing Krishna’s Vishwarupa?"
|
| 82 |
+
"What teachings did Krishna share in the Gita?",
|
| 83 |
+
],
|
| 84 |
+
"llm_hints": [],
|
| 85 |
+
}
|
modules/config/bhagavata_purana.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
bhagavata_purana_config = {
|
| 2 |
+
"name": "bhagavata_purana",
|
| 3 |
+
"title": "Bhagavatha Puranam",
|
| 4 |
+
"output_dir": "./output/bhagavata_purana",
|
| 5 |
+
"collection_name": "bhagavata_purana",
|
| 6 |
+
"unit": "page",
|
| 7 |
+
"metadata_fields": [
|
| 8 |
+
{
|
| 9 |
+
"name": "file",
|
| 10 |
+
"label": "File Name",
|
| 11 |
+
"datatype": "str",
|
| 12 |
+
"description": "name of the file from which the information was extracted",
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"name": "page",
|
| 16 |
+
"datatype": "int",
|
| 17 |
+
"label": "Page Number",
|
| 18 |
+
"description": "Page number from the source",
|
| 19 |
+
"show_as_filter": True,
|
| 20 |
+
"is_unique": True,
|
| 21 |
+
},
|
| 22 |
+
],
|
| 23 |
+
"pdf_path": "./data/bhagavata_purana.pdf",
|
| 24 |
+
"source": "https://dn790003.ca.archive.org/0/items/bhagavatapuranagitapress_201907/Bhagavata%20Purana%20-%20Gita%20Press_text.pdf",
|
| 25 |
+
"language": "san+eng",
|
| 26 |
+
"example_labels": ["Gajendra Moksham", "Prahalad"],
|
| 27 |
+
"examples": [
|
| 28 |
+
"State some verses that showcase the devotion of Gajendra the elephant",
|
| 29 |
+
"State some verses that showcase the devotion of Prahlada",
|
| 30 |
+
],
|
| 31 |
+
"llm_hints": [],
|
| 32 |
+
}
|
modules/config/chathusloki.py
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
chathusloki_config = {
|
| 2 |
+
"name": "chathusloki",
|
| 3 |
+
"title": "Chathusloki by Sri Alavandar",
|
| 4 |
+
"output_dir": "./output/chathusloki",
|
| 5 |
+
"collection_name": "chathusloki",
|
| 6 |
+
"unit": "verse",
|
| 7 |
+
"unit_field": "sloka_number",
|
| 8 |
+
"field_mapping": {
|
| 9 |
+
"text": "sloka_devanagari",
|
| 10 |
+
"title": lambda doc: f"Verse {doc.get('verse','')}",
|
| 11 |
+
"unit_index": "sloka_number",
|
| 12 |
+
"transliteration": "sloka_english_transliteration",
|
| 13 |
+
"word_by_word_native": "meaning",
|
| 14 |
+
"author": lambda doc: f"Sri Aalavandhaar",
|
| 15 |
+
"relative_path": lambda doc: f"Chathusloki-{doc.get("sloka_number","")}",
|
| 16 |
+
},
|
| 17 |
+
"metadata_fields": [
|
| 18 |
+
{
|
| 19 |
+
"name": "sloka_number",
|
| 20 |
+
"label": "Slokam Number",
|
| 21 |
+
"datatype": "int",
|
| 22 |
+
"description": "The index of the sloka or verse",
|
| 23 |
+
"show_as_filter": True,
|
| 24 |
+
"is_unique": True,
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"name": "meaning_short",
|
| 28 |
+
"label": "Short meaning",
|
| 29 |
+
"datatype": "str",
|
| 30 |
+
"description": "A short meaning of the sanskrit verse in English.",
|
| 31 |
+
"show_as_filter": True,
|
| 32 |
+
},
|
| 33 |
+
],
|
| 34 |
+
"pdf_path": "./data/chathusloki.pdf",
|
| 35 |
+
"source": "https://www.sadagopan.org/ebook/pdf/Chatusloki%20-%20VS.pdf",
|
| 36 |
+
"language": "san+eng",
|
| 37 |
+
"example_labels": ["Recite a sloka", "Commentary", "Role of Sridevi"],
|
| 38 |
+
"examples": [
|
| 39 |
+
"Recite the 1st sloka from Chathusloki",
|
| 40 |
+
"Show detailed commentary for sloka 2 from Chathusloki",
|
| 41 |
+
"What is the role of Sri Devi in the universe according to the Chathusloki?",
|
| 42 |
+
],
|
| 43 |
+
"llm_hints": [],
|
| 44 |
+
}
|
modules/config/divya_prabandham.py
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import nalayiram_helper
|
| 2 |
+
|
| 3 |
+
divya_prabandham_config = {
|
| 4 |
+
"name": "divya_prabandham",
|
| 5 |
+
"title": "4000 Divya Prabandham",
|
| 6 |
+
"output_dir": "./output/divya_prabandham",
|
| 7 |
+
"collection_name": "divya_prabandham",
|
| 8 |
+
"collection_embedding_fn": "openai",
|
| 9 |
+
"unit": "pasuram",
|
| 10 |
+
"unit_field": "verse",
|
| 11 |
+
"credits": "We owe deep gratitude to uveda.org for providing such beautifully curated data. 🙏 This section would not have been possible without the dedicated efforts of the Uveda team.",
|
| 12 |
+
"field_mapping": {
|
| 13 |
+
"text": "pasuram_ta",
|
| 14 |
+
"title": lambda doc: f"{doc.get('prabandham_name','')} {doc.get('chapter','')}-{doc.get('decade','')}:{doc.get('position_in_chapter','')}",
|
| 15 |
+
"location": "divya_desams",
|
| 16 |
+
"word_by_word_native": "wbw_ta",
|
| 17 |
+
"unit_index": "verse",
|
| 18 |
+
"transliteration": "pasuram_en",
|
| 19 |
+
"reference_link": "html_url",
|
| 20 |
+
"author": "azhwar_name",
|
| 21 |
+
"chapter_name": "prabandham_name",
|
| 22 |
+
"relative_path": lambda doc: "-".join(
|
| 23 |
+
filter(
|
| 24 |
+
None,
|
| 25 |
+
[
|
| 26 |
+
doc.get("prabandham_name", ""),
|
| 27 |
+
*(
|
| 28 |
+
str(doc.get(k))
|
| 29 |
+
for k in ["decade", "chapter", "position_in_chapter"]
|
| 30 |
+
if doc.get(k, -1) != -1
|
| 31 |
+
),
|
| 32 |
+
],
|
| 33 |
+
)
|
| 34 |
+
),
|
| 35 |
+
},
|
| 36 |
+
"metadata_fields": [
|
| 37 |
+
{
|
| 38 |
+
"name": "prabandham_code",
|
| 39 |
+
"label": "Prabandham Code",
|
| 40 |
+
"datatype": "str",
|
| 41 |
+
"description": "contains the short prabandham_code. e.g. `TPL` for `Thiruppallandu`",
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"name": "prabandham_name",
|
| 45 |
+
"label": "Prabandham Name",
|
| 46 |
+
"datatype": "str",
|
| 47 |
+
"description": "contains the prabandham name. e.g. `Thiruppallandu`",
|
| 48 |
+
"show_as_filter": True,
|
| 49 |
+
"component": "dropdown",
|
| 50 |
+
"lov": lambda: [
|
| 51 |
+
p.prabandham_name
|
| 52 |
+
for p in nalayiram_helper.get_standardized_prabandham_names()
|
| 53 |
+
],
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"name": "azhwar_name",
|
| 57 |
+
"label": "Azhwar Name",
|
| 58 |
+
"datatype": "str",
|
| 59 |
+
"description": "contains the azhwar name. e.g. `Thirumangai Azhwar`",
|
| 60 |
+
"show_as_filter": True,
|
| 61 |
+
"component": "dropdown",
|
| 62 |
+
"lov": lambda: [
|
| 63 |
+
azhwar_name
|
| 64 |
+
for azhwar_name in nalayiram_helper.get_standardized_azhwar_names()
|
| 65 |
+
],
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"name": "divya_desams",
|
| 69 |
+
"label": "Divya Desams",
|
| 70 |
+
"datatype": "str",
|
| 71 |
+
"description": "comma separated list of divya desams. e.g. Thiruneermalai,Thiruvallikkeni.",
|
| 72 |
+
"show_as_filter": True,
|
| 73 |
+
"component": "dropdown",
|
| 74 |
+
"lov": lambda: [
|
| 75 |
+
divya_desam_name
|
| 76 |
+
for divya_desam_name in nalayiram_helper.get_standardized_divya_desam_names()
|
| 77 |
+
],
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"name": "title",
|
| 81 |
+
"label": "Pasuram Title",
|
| 82 |
+
"datatype": "str",
|
| 83 |
+
"description": (
|
| 84 |
+
"Exact title of a pasuram in one of the following formats:\n"
|
| 85 |
+
"1. '{prabandham_code} {decade}.{chapter}.{pasuram}' — use when the prabandham has decades.\n"
|
| 86 |
+
"2. '{prabandham_code} {chapter}.{pasuram}' — use when the prabandham does not have decades.\n\n"
|
| 87 |
+
"⚠️ Use this field ONLY when the user provides a specific prabandham and a relative verse number.\n"
|
| 88 |
+
"Examples of valid usage:\n"
|
| 89 |
+
"- User query: '3rd pasuram in the 8th Thiruvaimozhi of the 1st decade.'\n"
|
| 90 |
+
" → Convert to: '{prabandham_code} 1.8.3' and pass as `title` filter.\n"
|
| 91 |
+
"- User query: '2nd pasuram of chapter 5 in [Prabandham with no decades].'\n"
|
| 92 |
+
" → Convert to: '{prabandham_code} 5.2' and pass as `title` filter.\n"
|
| 93 |
+
"Do NOT use `title` for general queries or keyword searches — leave it empty in those cases."
|
| 94 |
+
),
|
| 95 |
+
"show_as_filter": True,
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"name": "verse",
|
| 99 |
+
"label": "Absolute Pasuram Number",
|
| 100 |
+
"datatype": "int",
|
| 101 |
+
"is_unique": True,
|
| 102 |
+
"description": (
|
| 103 |
+
"Absolute verse number or pasuram number. Each verse has a unique number."
|
| 104 |
+
# "Use it only when a specific prabandham name is NOT mentioned in the user query."
|
| 105 |
+
"For e.g. 'Give me pasuram 1176'"
|
| 106 |
+
),
|
| 107 |
+
"show_as_filter": True,
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"name": "decade",
|
| 111 |
+
"label": "Decade Number (Pathu)",
|
| 112 |
+
"datatype": "int",
|
| 113 |
+
"description": (
|
| 114 |
+
"The decade (or `pathu` in Tamil) that this pasuram belongs to. decade is -1 when there is no associated decade."
|
| 115 |
+
),
|
| 116 |
+
"show_as_filter": True,
|
| 117 |
+
},
|
| 118 |
+
{
|
| 119 |
+
"name": "chapter",
|
| 120 |
+
"label": "Chapter Number",
|
| 121 |
+
"datatype": "int",
|
| 122 |
+
"description": (
|
| 123 |
+
"chapter number of this pasuram. is -1 when there is no associated chapter number"
|
| 124 |
+
),
|
| 125 |
+
"show_as_filter": True,
|
| 126 |
+
},
|
| 127 |
+
{
|
| 128 |
+
"name": "position_in_chapter",
|
| 129 |
+
"label": "Relative Pasuram Number",
|
| 130 |
+
"datatype": "int",
|
| 131 |
+
"description": (
|
| 132 |
+
"Relative verse number or pasuram number within a chapter."
|
| 133 |
+
"Use it only when a specific prabandham name is mentioned in the user query."
|
| 134 |
+
"For e.g. 'Give me the 5th pasuram from Thirupavai'"
|
| 135 |
+
),
|
| 136 |
+
"show_as_filter": True,
|
| 137 |
+
},
|
| 138 |
+
],
|
| 139 |
+
"pdf_path": "./data/divya_prabandham.pdf",
|
| 140 |
+
"source": "https://uveda.org",
|
| 141 |
+
"language": "tamil",
|
| 142 |
+
"example_labels": [
|
| 143 |
+
"About the five elements",
|
| 144 |
+
"About Garuda",
|
| 145 |
+
"Pasuram about Krishna's Flute",
|
| 146 |
+
"Andal's pasuram",
|
| 147 |
+
"Specific Pasuram (absolute)",
|
| 148 |
+
"Pasuram by Azhwar",
|
| 149 |
+
"Specific pasuram(relative)",
|
| 150 |
+
"Decade and Chapter Search",
|
| 151 |
+
],
|
| 152 |
+
"examples": [
|
| 153 |
+
"five elements and their significance as defined in divya_prabandham",
|
| 154 |
+
"What is the significance of Garuda? Show some verses from divya prabandham that describe him.",
|
| 155 |
+
"Show me a pasuram that talks about how the animals and birds enjoy Krishna's flute playing.",
|
| 156 |
+
"Give me a pasuram by Andal",
|
| 157 |
+
"Show me Pasuram 1187 ",
|
| 158 |
+
"Show me a pasuram by Thondaradippodi azhwar",
|
| 159 |
+
"Give me the 2nd pasuram in the 3rd Thiruvaimozhi from the 2nd decade",
|
| 160 |
+
"Give me just a few words from the starting lines and reference links of all 11 pasurams from thiruvaimozhi 5th decade 4th chapter.",
|
| 161 |
+
],
|
| 162 |
+
"llm_hints": [
|
| 163 |
+
"If the user wishes to query at a decade or chapter level for a given prabandham, use the direct metadata query on the appropriate fields once instead of querying the tool multiple times for each pasuram from the chapter."
|
| 164 |
+
],
|
| 165 |
+
}
|
modules/config/kamba_ramayanam.py
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
kamba_ramayanam_config = {
|
| 2 |
+
"name": "kamba_ramayanam",
|
| 3 |
+
"title": "Kamba Ramayanam (Tamil)",
|
| 4 |
+
"output_dir": "./output/kamba_ramayanam",
|
| 5 |
+
"collection_name": "kamba_ramayanam",
|
| 6 |
+
"unit": "chunk",
|
| 7 |
+
"unit_field": "chunk_index",
|
| 8 |
+
"field_mapping": {
|
| 9 |
+
"chapter_name": lambda doc: f"{doc.get('kandam','')}",
|
| 10 |
+
"title": lambda doc: f"{doc.get('padalam_ta','')} - {doc.get('padalam_en','')}".strip(),
|
| 11 |
+
"author": lambda doc: "Kamban",
|
| 12 |
+
"unit_index": "chunk_index",
|
| 13 |
+
"verse": lambda doc: int(doc.get("verse_number", "0")),
|
| 14 |
+
"relative_path": lambda doc: f"{doc.get('padalam_ta','')} - {doc.get('padalam_en','')}".strip(),
|
| 15 |
+
},
|
| 16 |
+
"metadata_fields": [
|
| 17 |
+
{
|
| 18 |
+
"name": "chunk_index",
|
| 19 |
+
"label": "Page Index",
|
| 20 |
+
"datatype": "int",
|
| 21 |
+
"description": "The index of the chunk",
|
| 22 |
+
"show_as_filter": True,
|
| 23 |
+
"is_unique": True,
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"name": "filename",
|
| 27 |
+
"label": "File name from the source",
|
| 28 |
+
"datatype": "str",
|
| 29 |
+
"description": "The name of the file.",
|
| 30 |
+
},
|
| 31 |
+
],
|
| 32 |
+
"pdf_path": "./data/kamba_ramayanam.pdf",
|
| 33 |
+
"source": "https://archive.org/details/vrajeshkumar_gmail_061/01-%E0%AE%AA%E0%AE%BE%E0%AE%B2%20%E0%AE%95%E0%AE%BE%E0%AE%A3%E0%AF%8D%E0%AE%9F%E0%AE%AE%E0%AF%8D/page/n15/mode/2up",
|
| 34 |
+
"language": "tamil",
|
| 35 |
+
"example_labels": [
|
| 36 |
+
"About Jatayu",
|
| 37 |
+
"About Hanuman",
|
| 38 |
+
"About Vali",
|
| 39 |
+
"About Sita",
|
| 40 |
+
"About Ravana",
|
| 41 |
+
],
|
| 42 |
+
"examples": [
|
| 43 |
+
"What is the significance of Jatayu? show some sanskrit verses to support the argument",
|
| 44 |
+
"Show some verses where Hanuman is mentioned",
|
| 45 |
+
"How did Rama kill Vali",
|
| 46 |
+
"How was Sita abducted",
|
| 47 |
+
"How did Rama kill Ravana?",
|
| 48 |
+
],
|
| 49 |
+
"llm_hints": [],
|
| 50 |
+
}
|
modules/config/kamba_ramayanam_en.py
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.scripture_helpers.kamba_ramayanam_helper import (
|
| 2 |
+
get_list_of_kandams,
|
| 3 |
+
get_list_of_padalams,
|
| 4 |
+
get_list_of_padalams_in_tamil,
|
| 5 |
+
)
|
| 6 |
+
|
| 7 |
+
kamba_ramayanam_en_config = {
|
| 8 |
+
"name": "kamba_ramayanam_en",
|
| 9 |
+
"title": "Kamba Ramayanam (English)",
|
| 10 |
+
"output_dir": "./output/kamba_ramayanam",
|
| 11 |
+
"collection_name": "kamba_ramayanam_en",
|
| 12 |
+
"unit": "verse",
|
| 13 |
+
"unit_field": "verse_number",
|
| 14 |
+
"field_mapping": {
|
| 15 |
+
"chapter_name": lambda doc: f"{doc.get('kandam','')}",
|
| 16 |
+
"title": lambda doc: f"{doc.get('padalam_ta','')} - {doc.get('padalam_en','')}".strip(),
|
| 17 |
+
"author": lambda doc: "Kamban",
|
| 18 |
+
"unit_index": "verse_number",
|
| 19 |
+
"verse": lambda doc: int(doc.get("verse_number", "0")),
|
| 20 |
+
"relative_path": lambda doc: f"{doc.get('padalam_ta','')} - {doc.get('padalam_en','')}".strip(),
|
| 21 |
+
},
|
| 22 |
+
"metadata_fields": [
|
| 23 |
+
{
|
| 24 |
+
"name": "kandam",
|
| 25 |
+
"label": "Kandam",
|
| 26 |
+
"datatype": "str",
|
| 27 |
+
"description": "The name of the Kandam or the chapter.",
|
| 28 |
+
"show_as_filter": True,
|
| 29 |
+
"component": "dropdown",
|
| 30 |
+
"lov": lambda: get_list_of_kandams(),
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"name": "padalam_en",
|
| 34 |
+
"label": "Chapter Name",
|
| 35 |
+
"datatype": "str",
|
| 36 |
+
"description": "The name of the Padalam (Episode) in English.",
|
| 37 |
+
"show_as_filter": True,
|
| 38 |
+
"component": "dropdown",
|
| 39 |
+
"lov": lambda: get_list_of_padalams(),
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"name": "padalam_ta",
|
| 43 |
+
"label": "Padalam name in Tamil",
|
| 44 |
+
"datatype": "str",
|
| 45 |
+
"description": "The name of the Padalam (Episode) in Tamil.",
|
| 46 |
+
"show_as_filter": True,
|
| 47 |
+
"component": "dropdown",
|
| 48 |
+
"lov": lambda: get_list_of_padalams_in_tamil(),
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"name": "page",
|
| 52 |
+
"datatype": "int",
|
| 53 |
+
"label": "Page Number",
|
| 54 |
+
"description": "Page number from the source",
|
| 55 |
+
"show_as_filter": True,
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"name": "verse_number",
|
| 59 |
+
"datatype": "int",
|
| 60 |
+
"label": "Verse Number",
|
| 61 |
+
"description": "Verse Number",
|
| 62 |
+
"show_as_filter": True,
|
| 63 |
+
"is_unique": True,
|
| 64 |
+
},
|
| 65 |
+
],
|
| 66 |
+
"pdf_path": "./data/kamba_ramayanam.pdf",
|
| 67 |
+
"source": "https://www.hindupedia.com/images/1/13/Kamba_Ramayanam_I.pdf",
|
| 68 |
+
"language": "tamil",
|
| 69 |
+
"example_labels": [
|
| 70 |
+
"About Jatayu",
|
| 71 |
+
"About Hanuman",
|
| 72 |
+
"About Vali",
|
| 73 |
+
"About Sita",
|
| 74 |
+
"About Ravana",
|
| 75 |
+
],
|
| 76 |
+
"examples": [
|
| 77 |
+
"What is the significance of Jatayu? show some sanskrit verses to support the argument",
|
| 78 |
+
"Show some verses where Hanuman is mentioned",
|
| 79 |
+
"How did Rama kill Vali",
|
| 80 |
+
"How was Sita abducted",
|
| 81 |
+
"How did Rama kill Ravana?",
|
| 82 |
+
],
|
| 83 |
+
"llm_hints": [],
|
| 84 |
+
}
|
modules/config/katakam.py
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
katakam_config = {
|
| 2 |
+
"name": "katakam",
|
| 3 |
+
"title": "Katakam",
|
| 4 |
+
"output_dir": "./output/katakam",
|
| 5 |
+
"collection_name": "katakam",
|
| 6 |
+
"collection_embedding_fn": "openai",
|
| 7 |
+
"unit": "panchadhi",
|
| 8 |
+
"unit_field": "panchadhi",
|
| 9 |
+
# "chapter_order": lambda: get_chapter_order_from_katakam(),
|
| 10 |
+
"field_mapping": {
|
| 11 |
+
"text": "sanskrit",
|
| 12 |
+
"unit_index": "panchadhi",
|
| 13 |
+
"transliteration": "transliteration",
|
| 14 |
+
"chapter_name": lambda doc: (
|
| 15 |
+
doc.get("prapaatakam_name")
|
| 16 |
+
if doc.get("prapaatakam_name") and doc.get("prapaatakam_name") != "-"
|
| 17 |
+
else "॥ काठकम् ॥"
|
| 18 |
+
),
|
| 19 |
+
"relative_path": lambda doc: (
|
| 20 |
+
"-"
|
| 21 |
+
if not doc.get("panchadhi") or doc.get("panchadhi") == "-"
|
| 22 |
+
else f"{doc.get('prapaatakam')}.{doc.get('anuvakam')}.{doc.get('panchadhi_index')} || {doc.get('panchadhi_sa')} ||"
|
| 23 |
+
),
|
| 24 |
+
},
|
| 25 |
+
"metadata_fields": [
|
| 26 |
+
{
|
| 27 |
+
"name": "prapaatakam",
|
| 28 |
+
"datatype": "int",
|
| 29 |
+
"label": "Prapaatakam Number",
|
| 30 |
+
"description": "Prapaatakam Number",
|
| 31 |
+
"show_as_filter": True,
|
| 32 |
+
"is_unique": True,
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"name": "anuvakam",
|
| 36 |
+
"datatype": "int",
|
| 37 |
+
"label": "Anuvakam Number",
|
| 38 |
+
"description": "Anuvakam Number",
|
| 39 |
+
"show_as_filter": True,
|
| 40 |
+
"is_unique": True,
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"name": "panchadhi_index",
|
| 44 |
+
"datatype": "int",
|
| 45 |
+
"label": "Relative Panchadhi Number",
|
| 46 |
+
"description": "Relative Panchadhi Number",
|
| 47 |
+
"show_as_filter": True,
|
| 48 |
+
"is_unique": True,
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"name": "panchadhi",
|
| 52 |
+
"datatype": "int",
|
| 53 |
+
"label": "Absolute Panchadhi Number",
|
| 54 |
+
"description": "Absolute Panchadhi Number",
|
| 55 |
+
"show_as_filter": True,
|
| 56 |
+
"is_unique": True,
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"name": "sanskrit",
|
| 60 |
+
"label": "Lyrics in sanskrit",
|
| 61 |
+
"datatype": "str",
|
| 62 |
+
"description": "The original sloka in sanskrit.",
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"name": "transliteration",
|
| 66 |
+
"label": "Transliteration in english",
|
| 67 |
+
"datatype": "str",
|
| 68 |
+
"description": "The original sloka transliterated in English.",
|
| 69 |
+
},
|
| 70 |
+
],
|
| 71 |
+
"pdf_path": "./data/katakam.pdf",
|
| 72 |
+
"source": "https://sanskritdocuments.org/doc_veda/taittirIyabrAhmaNam.html",
|
| 73 |
+
"language": "san+eng",
|
| 74 |
+
"example_labels": [
|
| 75 |
+
"Katakam",
|
| 76 |
+
],
|
| 77 |
+
"examples": [
|
| 78 |
+
"Show some verses from Katakam",
|
| 79 |
+
],
|
| 80 |
+
"llm_hints": [],
|
| 81 |
+
}
|
modules/config/pancha_sooktham.py
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.scripture_helpers.pancha_sooktham_helper import (
|
| 2 |
+
get_chapter_order_from_pancha_sooktham,
|
| 3 |
+
get_pancha_sooktham_chapters,
|
| 4 |
+
)
|
| 5 |
+
pancha_sooktham_config = {
|
| 6 |
+
"name": "pancha_sooktham",
|
| 7 |
+
"title": "Pancha Sooktham",
|
| 8 |
+
"output_dir": "./output/pancha_sooktham",
|
| 9 |
+
"collection_name": "pancha_sooktham",
|
| 10 |
+
"collection_embedding_fn": "openai",
|
| 11 |
+
"unit": "verse",
|
| 12 |
+
"unit_field": "relative_verse_number",
|
| 13 |
+
"chapter_order": lambda: get_chapter_order_from_pancha_sooktham(),
|
| 14 |
+
"field_mapping": {
|
| 15 |
+
"text": "sanskrit",
|
| 16 |
+
"unit_index": "relative_verse_number",
|
| 17 |
+
"transliteration": lambda doc: f"English: \n{doc.get('english')}\n\nதமிழ்: \n{doc.get('tamil')}\n\nతెలుగు: \n{doc.get('telugu')}\n\nಕನ್ನಡ: \n{doc.get('kannada')}",
|
| 18 |
+
"chapter_name": "chapter_title",
|
| 19 |
+
"relative_path": lambda doc: f"{doc.get('chapter_title',"")}-{doc.get('relative_verse_number',"")}",
|
| 20 |
+
},
|
| 21 |
+
"metadata_fields": [
|
| 22 |
+
{
|
| 23 |
+
"name": "chapter_title",
|
| 24 |
+
"datatype": "str",
|
| 25 |
+
"label": "Chapter Name",
|
| 26 |
+
"description": "Name of the Chapter",
|
| 27 |
+
"show_as_filter": True,
|
| 28 |
+
"component": "dropdown",
|
| 29 |
+
"lov": lambda: get_pancha_sooktham_chapters(),
|
| 30 |
+
"is_unique": True,
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"name": "sanskrit",
|
| 34 |
+
"label": "Lyrics in sanskrit",
|
| 35 |
+
"datatype": "str",
|
| 36 |
+
"description": "The original sloka in sanskrit.",
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"name": "relative_verse_number",
|
| 40 |
+
"label": "Relative Verse Number",
|
| 41 |
+
"datatype": "int",
|
| 42 |
+
"description": "The relative verse number of the sloka inside the chapter.",
|
| 43 |
+
"show_as_filter": True,
|
| 44 |
+
"is_unique": True,
|
| 45 |
+
},
|
| 46 |
+
],
|
| 47 |
+
"pdf_path": "./data/pancha_sooktham.pdf",
|
| 48 |
+
"source": "https://stotranidhi.com/",
|
| 49 |
+
"language": "san+eng",
|
| 50 |
+
"example_labels": [
|
| 51 |
+
"Purusha Sooktham",
|
| 52 |
+
],
|
| 53 |
+
"examples": [
|
| 54 |
+
"Show some verses from purusha sooktham",
|
| 55 |
+
],
|
| 56 |
+
"llm_hints": [],
|
| 57 |
+
}
|
modules/config/shanthi_panchakam.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.scripture_helpers.shanthi_panchakam_helper import (
|
| 2 |
+
get_chapter_order_from_shanthi_panchakam,
|
| 3 |
+
get_shanthi_panchakam_chapters,
|
| 4 |
+
)
|
| 5 |
+
|
| 6 |
+
shanthi_panchakam_config = {
|
| 7 |
+
"name": "shanthi_panchakam",
|
| 8 |
+
"title": "Shanthi Panchakam",
|
| 9 |
+
"output_dir": "./output/shanthi_panchakam",
|
| 10 |
+
"collection_name": "shanthi_panchakam",
|
| 11 |
+
"collection_embedding_fn": "openai",
|
| 12 |
+
"unit": "verse",
|
| 13 |
+
"unit_field": "relative_verse_number",
|
| 14 |
+
"chapter_order": lambda: get_chapter_order_from_shanthi_panchakam(),
|
| 15 |
+
"field_mapping": {
|
| 16 |
+
"text": "sanskrit",
|
| 17 |
+
"unit_index": "relative_verse_number",
|
| 18 |
+
"transliteration": lambda doc: f"English: \n{doc.get('english')}\n\nதமிழ்: \n{doc.get('tamil')}\n\nతెలుగు: \n{doc.get('telugu')}\n\nಕನ್ನಡ: \n{doc.get('kannada')}",
|
| 19 |
+
"chapter_name": "chapter_title",
|
| 20 |
+
"relative_path": lambda doc: f"{doc.get('chapter_title',"")}-{doc.get('relative_verse_number',"")}",
|
| 21 |
+
},
|
| 22 |
+
"metadata_fields": [
|
| 23 |
+
{
|
| 24 |
+
"name": "chapter_title",
|
| 25 |
+
"datatype": "str",
|
| 26 |
+
"label": "Chapter Name",
|
| 27 |
+
"description": "Name of the Chapter",
|
| 28 |
+
"show_as_filter": True,
|
| 29 |
+
"component": "dropdown",
|
| 30 |
+
"lov": lambda: get_shanthi_panchakam_chapters(),
|
| 31 |
+
"is_unique": True,
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"name": "sanskrit",
|
| 35 |
+
"label": "Lyrics in sanskrit",
|
| 36 |
+
"datatype": "str",
|
| 37 |
+
"description": "The original sloka in sanskrit.",
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"name": "relative_verse_number",
|
| 41 |
+
"label": "Relative Verse Number",
|
| 42 |
+
"datatype": "int",
|
| 43 |
+
"description": "The relative verse number of the sloka inside the chapter.",
|
| 44 |
+
"show_as_filter": True,
|
| 45 |
+
"is_unique": True,
|
| 46 |
+
},
|
| 47 |
+
],
|
| 48 |
+
"pdf_path": "./data/shanthi_panchakam.pdf",
|
| 49 |
+
"source": "https://vignanam.org/english/shanti-panchakam.html",
|
| 50 |
+
"language": "san+eng",
|
| 51 |
+
"example_labels": [
|
| 52 |
+
"Shanthi Panchakam",
|
| 53 |
+
],
|
| 54 |
+
"examples": [
|
| 55 |
+
"Show some verses from Shanthi Panchakam",
|
| 56 |
+
],
|
| 57 |
+
"llm_hints": [],
|
| 58 |
+
}
|
modules/config/shukla_yajur_vedam.py
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
shukla_yajur_vedam_config = {
|
| 2 |
+
"name": "shukla_yajur_vedam",
|
| 3 |
+
"title": "Shukla Yajur Vedam",
|
| 4 |
+
"output_dir": "./output/shukla_yajur_vedam",
|
| 5 |
+
"collection_name": "shukla_yajur_vedam",
|
| 6 |
+
"unit": "page",
|
| 7 |
+
"metadata_fields": [
|
| 8 |
+
{
|
| 9 |
+
"name": "file",
|
| 10 |
+
"label": "File Name",
|
| 11 |
+
"datatype": "str",
|
| 12 |
+
"description": "name of the file from which the information was extracted",
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"name": "page",
|
| 16 |
+
"datatype": "int",
|
| 17 |
+
"label": "Page Number",
|
| 18 |
+
"description": "Page number from the source",
|
| 19 |
+
"show_as_filter": True,
|
| 20 |
+
"is_unique": True,
|
| 21 |
+
},
|
| 22 |
+
],
|
| 23 |
+
"pdf_path": "./data/shukla-yajur-veda.pdf",
|
| 24 |
+
"source": "https://www.thearyasamaj.org/uploads/book/2014/04/R1sSjG_eLb_sub_406_yajurveda.pdf",
|
| 25 |
+
"language": "san+eng",
|
| 26 |
+
"example_labels": [
|
| 27 |
+
"About Vedam",
|
| 28 |
+
"About the five elements",
|
| 29 |
+
"About Brahma",
|
| 30 |
+
],
|
| 31 |
+
"examples": [
|
| 32 |
+
"Gist of Shukla Yajur Vedam. Give me some sanskrit verses.",
|
| 33 |
+
"What is the significance of fire and water. show some sanskrit verses",
|
| 34 |
+
"Brahma",
|
| 35 |
+
],
|
| 36 |
+
"llm_hints": [],
|
| 37 |
+
}
|
modules/config/sri_stavam.py
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
sri_stavam_config = {
|
| 2 |
+
"name": "sri_stavam",
|
| 3 |
+
"title": "Sri Stavam by Sri Koorathazhwan",
|
| 4 |
+
"output_dir": "./output/sri_stavam",
|
| 5 |
+
"collection_name": "sri_stavam",
|
| 6 |
+
"unit": "slokam",
|
| 7 |
+
"unit_field": "sloka_number",
|
| 8 |
+
"field_mapping": {
|
| 9 |
+
"text": "sanskrit",
|
| 10 |
+
"title": lambda doc: f"Verse {doc.get('verse','')}",
|
| 11 |
+
"unit_index": "sloka_number",
|
| 12 |
+
"transliteration": "transliteration",
|
| 13 |
+
"word_by_word_native": "meaning_short",
|
| 14 |
+
"author": lambda doc: f"Sri Koorathazhwan",
|
| 15 |
+
"relative_path": lambda doc: f"Sri Stavam-{doc.get("sloka_number","")}",
|
| 16 |
+
},
|
| 17 |
+
"metadata_fields": [
|
| 18 |
+
{
|
| 19 |
+
"name": "sloka_number",
|
| 20 |
+
"label": "Slokam Number",
|
| 21 |
+
"datatype": "int",
|
| 22 |
+
"description": "The index of the sloka or verse",
|
| 23 |
+
"show_as_filter": True,
|
| 24 |
+
"is_unique": True,
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"name": "meaning_short",
|
| 28 |
+
"label": "Short meaning",
|
| 29 |
+
"datatype": "str",
|
| 30 |
+
"description": "A short meaning of the sanskrit verse in English.",
|
| 31 |
+
"show_as_filter": True,
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"name": "sanskrit",
|
| 35 |
+
"label": "Lyrics in sanskrit",
|
| 36 |
+
"datatype": "str",
|
| 37 |
+
"description": "Verse in sanskrit",
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"name": "transliteration",
|
| 41 |
+
"label": "English Transliteration",
|
| 42 |
+
"datatype": "str",
|
| 43 |
+
"description": "Verse transliterated to English",
|
| 44 |
+
"show_as_filter": True,
|
| 45 |
+
},
|
| 46 |
+
],
|
| 47 |
+
"pdf_path": "./data/sri_stavam.pdf",
|
| 48 |
+
"source": "https://www.sadagopan.org/ebook/pdf/Sri%20Stavam.pdf",
|
| 49 |
+
"language": "san+eng",
|
| 50 |
+
"example_labels": ["Recite a sloka", "Commentary", "Role of Sridevi"],
|
| 51 |
+
"examples": [
|
| 52 |
+
"Recite the 1st sloka from Sri Stavam",
|
| 53 |
+
"Show detailed commentary for sloka 2 from Sri Stavam",
|
| 54 |
+
"What is the role of Sri Devi in the universe according to the Sri Stavam?",
|
| 55 |
+
],
|
| 56 |
+
"llm_hints": [
|
| 57 |
+
"if the user asks for nth sloka, do a metadata search on the `verse` field."
|
| 58 |
+
],
|
| 59 |
+
}
|
modules/config/taitriya_brahmanam.py
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
taitriya_brahmanam_config = {
|
| 2 |
+
"name": "taitriya_brahmanam",
|
| 3 |
+
"title": "Taitriya Brahmanam",
|
| 4 |
+
"output_dir": "./output/taitriya_brahmanam",
|
| 5 |
+
"collection_name": "taitriya_brahmanam",
|
| 6 |
+
"collection_embedding_fn": "openai",
|
| 7 |
+
"unit": "panchadhi",
|
| 8 |
+
"unit_field": "panchadhi",
|
| 9 |
+
# "chapter_order": lambda: get_chapter_order_from_taitriya_brahmanam(),
|
| 10 |
+
"field_mapping": {
|
| 11 |
+
"text": "sanskrit",
|
| 12 |
+
"unit_index": "panchadhi",
|
| 13 |
+
"transliteration": "transliteration",
|
| 14 |
+
"chapter_name": lambda doc: (
|
| 15 |
+
doc.get("prapaatakam_name")
|
| 16 |
+
if doc.get("prapaatakam_name") and doc.get("prapaatakam_name") != "-"
|
| 17 |
+
else (
|
| 18 |
+
doc.get("ashtakam_name")
|
| 19 |
+
if doc.get("ashtakam_name") and doc.get("ashtakam_name") != "-"
|
| 20 |
+
else "-"
|
| 21 |
+
)
|
| 22 |
+
),
|
| 23 |
+
"relative_path": lambda doc: (
|
| 24 |
+
"-"
|
| 25 |
+
if not doc.get("panchadhi") or doc.get("panchadhi") == "-"
|
| 26 |
+
else f"{doc.get('ashtakam')}.{doc.get('prapaatakam')}.{doc.get('anuvakam')}.{doc.get('panchadhi_index')} || {doc.get('panchadhi_sa')} ||"
|
| 27 |
+
),
|
| 28 |
+
},
|
| 29 |
+
"metadata_fields": [
|
| 30 |
+
{
|
| 31 |
+
"name": "ashtakam",
|
| 32 |
+
"datatype": "int",
|
| 33 |
+
"label": "Ashtakam Number",
|
| 34 |
+
"description": "Ashtakam Number",
|
| 35 |
+
"show_as_filter": True,
|
| 36 |
+
"is_unique": True,
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"name": "prapaatakam",
|
| 40 |
+
"datatype": "int",
|
| 41 |
+
"label": "Prapaatakam Number",
|
| 42 |
+
"description": "Prapaatakam Number",
|
| 43 |
+
"show_as_filter": True,
|
| 44 |
+
"is_unique": True,
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"name": "anuvakam",
|
| 48 |
+
"datatype": "int",
|
| 49 |
+
"label": "Anuvakam Number",
|
| 50 |
+
"description": "Anuvakam Number",
|
| 51 |
+
"show_as_filter": True,
|
| 52 |
+
"is_unique": True,
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"name": "panchadhi_index",
|
| 56 |
+
"datatype": "int",
|
| 57 |
+
"label": "Relative Panchadhi Number",
|
| 58 |
+
"description": "Relative Panchadhi Number",
|
| 59 |
+
"show_as_filter": True,
|
| 60 |
+
"is_unique": True,
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"name": "panchadhi",
|
| 64 |
+
"datatype": "int",
|
| 65 |
+
"label": "Absolute Panchadhi Number",
|
| 66 |
+
"description": "Absolute Panchadhi Number",
|
| 67 |
+
"show_as_filter": True,
|
| 68 |
+
"is_unique": True,
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"name": "sanskrit",
|
| 72 |
+
"label": "Lyrics in sanskrit",
|
| 73 |
+
"datatype": "str",
|
| 74 |
+
"description": "The original sloka in sanskrit.",
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"name": "transliteration",
|
| 78 |
+
"label": "Transliteration in english",
|
| 79 |
+
"datatype": "str",
|
| 80 |
+
"description": "The original sloka transliterated in English.",
|
| 81 |
+
},
|
| 82 |
+
],
|
| 83 |
+
"pdf_path": "./data/taitriya_brahmanam.pdf",
|
| 84 |
+
"source": "https://sanskritdocuments.org/doc_veda/taittirIyabrAhmaNam.html",
|
| 85 |
+
"language": "san+eng",
|
| 86 |
+
"example_labels": [
|
| 87 |
+
"Taitriya Brahmanam",
|
| 88 |
+
],
|
| 89 |
+
"examples": [
|
| 90 |
+
"Show some verses from Taitriya Brahmanam",
|
| 91 |
+
],
|
| 92 |
+
"llm_hints": [],
|
| 93 |
+
}
|
modules/config/taitriya_samhitha.py
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
taitriya_samhitha_config = {
|
| 2 |
+
"name": "taitriya_samhitha",
|
| 3 |
+
"title": "Taitriya Samhitha",
|
| 4 |
+
"output_dir": "./output/taitriya_samhitha",
|
| 5 |
+
"collection_name": "taitriya_samhitha",
|
| 6 |
+
"collection_embedding_fn": "openai",
|
| 7 |
+
"unit": "panchadhi",
|
| 8 |
+
"unit_field": "panchadhi",
|
| 9 |
+
# "chapter_order": lambda: get_chapter_order_from_taitriya_samhitha(),
|
| 10 |
+
"field_mapping": {
|
| 11 |
+
"text": "sanskrit",
|
| 12 |
+
"unit_index": "panchadhi",
|
| 13 |
+
"transliteration": "transliteration",
|
| 14 |
+
"chapter_name": lambda doc: (
|
| 15 |
+
doc.get("prashnam_name")
|
| 16 |
+
if doc.get("prashnam_name") and doc.get("prashnam_name") != "-"
|
| 17 |
+
else (
|
| 18 |
+
doc.get("kandam_name")
|
| 19 |
+
if doc.get("kandam_name") and doc.get("kandam_name") != "-"
|
| 20 |
+
else "-"
|
| 21 |
+
)
|
| 22 |
+
),
|
| 23 |
+
"relative_path": lambda doc: (
|
| 24 |
+
"-"
|
| 25 |
+
if not doc.get("panchadhi") or doc.get("panchadhi") == "-"
|
| 26 |
+
else f"{doc.get('kandam')}.{doc.get('prashnam')}.{doc.get('anuvakam')}.{doc.get('panchadhi_index')} || {doc.get('panchadhi_sa')} ||"
|
| 27 |
+
),
|
| 28 |
+
},
|
| 29 |
+
"metadata_fields": [
|
| 30 |
+
{
|
| 31 |
+
"name": "kandam",
|
| 32 |
+
"datatype": "int",
|
| 33 |
+
"label": "Kandam Number",
|
| 34 |
+
"description": "Kandam Number",
|
| 35 |
+
"show_as_filter": True,
|
| 36 |
+
"is_unique": True,
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"name": "prashnam",
|
| 40 |
+
"datatype": "int",
|
| 41 |
+
"label": "Prashnam Number",
|
| 42 |
+
"description": "Prashnam Number",
|
| 43 |
+
"show_as_filter": True,
|
| 44 |
+
"is_unique": True,
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"name": "anuvakam",
|
| 48 |
+
"datatype": "int",
|
| 49 |
+
"label": "Anuvakam Number",
|
| 50 |
+
"description": "Anuvakam Number",
|
| 51 |
+
"show_as_filter": True,
|
| 52 |
+
"is_unique": True,
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"name": "panchadhi_index",
|
| 56 |
+
"datatype": "int",
|
| 57 |
+
"label": "Relative Panchadhi Number",
|
| 58 |
+
"description": "Relative Panchadhi Number",
|
| 59 |
+
"show_as_filter": True,
|
| 60 |
+
"is_unique": True,
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"name": "panchadhi",
|
| 64 |
+
"datatype": "int",
|
| 65 |
+
"label": "Absolute Panchadhi Number",
|
| 66 |
+
"description": "Absolute Panchadhi Number",
|
| 67 |
+
"show_as_filter": True,
|
| 68 |
+
"is_unique": True,
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"name": "sanskrit",
|
| 72 |
+
"label": "Lyrics in sanskrit",
|
| 73 |
+
"datatype": "str",
|
| 74 |
+
"description": "The original sloka in sanskrit.",
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"name": "transliteration",
|
| 78 |
+
"label": "Transliteration in english",
|
| 79 |
+
"datatype": "str",
|
| 80 |
+
"description": "The original sloka transliterated in English.",
|
| 81 |
+
},
|
| 82 |
+
],
|
| 83 |
+
"pdf_path": "./data/taitriya_samhitha.pdf",
|
| 84 |
+
"source": "https://sanskritdocuments.org/doc_veda/taittirIyasamhitA.html",
|
| 85 |
+
"language": "san+eng",
|
| 86 |
+
"example_labels": [
|
| 87 |
+
"Taitriya Samhitha",
|
| 88 |
+
],
|
| 89 |
+
"examples": [
|
| 90 |
+
"Show some verses from Taitriya Samhitha",
|
| 91 |
+
],
|
| 92 |
+
"llm_hints": [],
|
| 93 |
+
}
|
modules/config/taitriya_upanishad.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.scripture_helpers.taitriya_upanishad_helper import (
|
| 2 |
+
get_chapter_order_from_taitriya_upanishad,
|
| 3 |
+
get_taitriya_upanishad_chapters,
|
| 4 |
+
)
|
| 5 |
+
|
| 6 |
+
taitriya_upanishad_config = {
|
| 7 |
+
"name": "taitriya_upanishad",
|
| 8 |
+
"title": "Taitriya Upanishad",
|
| 9 |
+
"output_dir": "./output/taitriya_upanishad",
|
| 10 |
+
"collection_name": "taitriya_upanishad",
|
| 11 |
+
"collection_embedding_fn": "openai",
|
| 12 |
+
"unit": "verse",
|
| 13 |
+
"unit_field": "relative_verse_number",
|
| 14 |
+
"chapter_order": lambda: get_chapter_order_from_taitriya_upanishad(),
|
| 15 |
+
"field_mapping": {
|
| 16 |
+
"text": "sanskrit",
|
| 17 |
+
"unit_index": "relative_verse_number",
|
| 18 |
+
"transliteration": lambda doc: f"English: \n{doc.get('english')}\n\nதமிழ்: \n{doc.get('tamil')}\n\nతెలుగు: \n{doc.get('telugu')}\n\nಕನ್ನಡ: \n{doc.get('kannada')}",
|
| 19 |
+
"chapter_name": "chapter_title",
|
| 20 |
+
"relative_path": lambda doc: f"{doc.get('chapter_title',"")}-{doc.get('relative_verse_number',"")}",
|
| 21 |
+
},
|
| 22 |
+
"metadata_fields": [
|
| 23 |
+
{
|
| 24 |
+
"name": "chapter_title",
|
| 25 |
+
"datatype": "str",
|
| 26 |
+
"label": "Chapter Name",
|
| 27 |
+
"description": "Name of the Chapter",
|
| 28 |
+
"show_as_filter": True,
|
| 29 |
+
"component": "dropdown",
|
| 30 |
+
"lov": lambda: get_taitriya_upanishad_chapters(),
|
| 31 |
+
"is_unique": True,
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"name": "sanskrit",
|
| 35 |
+
"label": "Lyrics in sanskrit",
|
| 36 |
+
"datatype": "str",
|
| 37 |
+
"description": "The original sloka in sanskrit.",
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"name": "relative_verse_number",
|
| 41 |
+
"label": "Relative Verse Number",
|
| 42 |
+
"datatype": "int",
|
| 43 |
+
"description": "The relative verse number of the sloka inside the chapter.",
|
| 44 |
+
"show_as_filter": True,
|
| 45 |
+
"is_unique": True,
|
| 46 |
+
},
|
| 47 |
+
],
|
| 48 |
+
"pdf_path": "./data/taitriya_upanishad.pdf",
|
| 49 |
+
"source": "https://stotranidhi.com/",
|
| 50 |
+
"language": "san+eng",
|
| 51 |
+
"example_labels": [
|
| 52 |
+
"Seeksha Valli",
|
| 53 |
+
],
|
| 54 |
+
"examples": [
|
| 55 |
+
"Show some verses from Seeksha Valli",
|
| 56 |
+
],
|
| 57 |
+
"llm_hints": [],
|
| 58 |
+
}
|
modules/config/valmiki_ramayanam.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
valmiki_ramayanam_config = {
|
| 2 |
+
"name": "valmiki_ramayanam",
|
| 3 |
+
"title": "Valmiki Ramayanam",
|
| 4 |
+
"output_dir": "./output/valmiki_ramayanam",
|
| 5 |
+
"collection_name": "valmiki_ramayanam_openai",
|
| 6 |
+
"collection_embedding_fn": "openai",
|
| 7 |
+
"unit": "page",
|
| 8 |
+
"metadata_fields": [
|
| 9 |
+
{
|
| 10 |
+
"name": "file",
|
| 11 |
+
"label": "File Name",
|
| 12 |
+
"datatype": "str",
|
| 13 |
+
"description": "name of the file from which the information was extracted",
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"name": "page",
|
| 17 |
+
"datatype": "int",
|
| 18 |
+
"label": "Page Number",
|
| 19 |
+
"description": "Page number from the source",
|
| 20 |
+
"show_as_filter": True,
|
| 21 |
+
"is_unique": True,
|
| 22 |
+
},
|
| 23 |
+
],
|
| 24 |
+
"pdf_path": "./data/valmiki_ramayanam.pdf",
|
| 25 |
+
"source": "https://ia800509.us.archive.org/28/items/valmiki-ramayana-gita-press-english/Valmiki%20Ramayana%20Gita%20Press%20English.pdf",
|
| 26 |
+
"language": "san+eng",
|
| 27 |
+
"example_labels": [
|
| 28 |
+
"About Jatayu",
|
| 29 |
+
"About Hanuman",
|
| 30 |
+
"About Vali",
|
| 31 |
+
"About Sita",
|
| 32 |
+
"About Ravana",
|
| 33 |
+
"A slokam by name",
|
| 34 |
+
"Vibheeshana sharanagathi slokam",
|
| 35 |
+
],
|
| 36 |
+
"examples": [
|
| 37 |
+
"What is the significance of Jatayu? show some sanskrit verses to support the argument",
|
| 38 |
+
"Show some verses where Hanuman is mentioned",
|
| 39 |
+
"How did Rama kill Vali",
|
| 40 |
+
"How was Sita abducted",
|
| 41 |
+
"How did Rama kill Ravana?",
|
| 42 |
+
"explain sakrudeva prapannaaya shlokam in ramayana",
|
| 43 |
+
"give the shlokam in ramayanam that vibheeshana uses to perform sharanagathi to rama, give the sanskrit shlokam and its meaning",
|
| 44 |
+
],
|
| 45 |
+
"llm_hints": [],
|
| 46 |
+
}
|
modules/config/vishnu_puranam.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
vishnu_puranam_config = {
|
| 2 |
+
"name": "vishnu_puranam",
|
| 3 |
+
"title": "Sri Vishnu Puranam",
|
| 4 |
+
"output_dir": "./output/vishnu_puranam",
|
| 5 |
+
"collection_name": "vishnu_puranam_openai",
|
| 6 |
+
"collection_embedding_fn": "openai",
|
| 7 |
+
"unit": "page",
|
| 8 |
+
"metadata_fields": [
|
| 9 |
+
{
|
| 10 |
+
"name": "file",
|
| 11 |
+
"label": "File Name",
|
| 12 |
+
"datatype": "str",
|
| 13 |
+
"description": "name of the file from which the information was extracted",
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"name": "page",
|
| 17 |
+
"datatype": "int",
|
| 18 |
+
"label": "Page Number",
|
| 19 |
+
"description": "Page number from the source",
|
| 20 |
+
"show_as_filter": True,
|
| 21 |
+
"is_unique": True,
|
| 22 |
+
},
|
| 23 |
+
],
|
| 24 |
+
"pdf_path": "./data/vishnu_puranam.pdf",
|
| 25 |
+
"source": "https://dn720005.ca.archive.org/0/items/vishnu-purana-sanskrit-english-ocr/VISHNU-PURANA-Sanskrit-English-OCR.pdf",
|
| 26 |
+
"language": "san+eng",
|
| 27 |
+
"example_labels": [
|
| 28 |
+
"Vishnu's form",
|
| 29 |
+
"About the five elements",
|
| 30 |
+
"About Garuda",
|
| 31 |
+
"Weapons of Vishnu",
|
| 32 |
+
"Vishnu's form (all scriptures)",
|
| 33 |
+
],
|
| 34 |
+
"examples": [
|
| 35 |
+
"describe Vishnu's form as defined in vishnu puranam",
|
| 36 |
+
"five elements and their significance as per vishnu puranam",
|
| 37 |
+
"What is the significance of Garuda? Show some verses from vishnu puranam that describe him.",
|
| 38 |
+
"What weapons does Vishnu hold as mentioned in vishnu puranam?",
|
| 39 |
+
"How is the form of Vishnu described across the scriptures?",
|
| 40 |
+
],
|
| 41 |
+
"llm_hints": [],
|
| 42 |
+
}
|
modules/config/vishnu_sahasranamam.py
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from modules.scripture_helpers.vishnu_sahasranamam_helper import (
|
| 2 |
+
get_chapter_order_from_sahasranamam,
|
| 3 |
+
get_chapters_from_sahasranamam,
|
| 4 |
+
)
|
| 5 |
+
|
| 6 |
+
vishnu_sahasranamam_config = {
|
| 7 |
+
"name": "vishnu_sahasranamam",
|
| 8 |
+
"title": "Vishnu Sahasranamam",
|
| 9 |
+
"output_dir": "./output/vishnu_sahasranamam",
|
| 10 |
+
"collection_name": "vishnu_sahasranamam_openai",
|
| 11 |
+
"collection_embedding_fn": "openai",
|
| 12 |
+
"unit": "verse",
|
| 13 |
+
"chapter_order": lambda: get_chapter_order_from_sahasranamam(),
|
| 14 |
+
"field_mapping": {
|
| 15 |
+
"text": "sanskrit",
|
| 16 |
+
"title": lambda doc: f"Verse {doc.get('verse','')}",
|
| 17 |
+
"unit_index": "verse",
|
| 18 |
+
"transliteration": "transliteration",
|
| 19 |
+
"translation": "translation",
|
| 20 |
+
"author": lambda doc: f"Sage Vyasa",
|
| 21 |
+
"chapter_name": "chapter",
|
| 22 |
+
"relative_path": lambda doc: f"{doc.get("chapter","")}-{doc.get("verse","")}",
|
| 23 |
+
},
|
| 24 |
+
"metadata_fields": [
|
| 25 |
+
{
|
| 26 |
+
"name": "chapter",
|
| 27 |
+
"datatype": "str",
|
| 28 |
+
"label": "Chapter Name",
|
| 29 |
+
"description": "Name of the Chapter",
|
| 30 |
+
"show_as_filter": True,
|
| 31 |
+
"component": "dropdown",
|
| 32 |
+
"lov": lambda: get_chapters_from_sahasranamam(),
|
| 33 |
+
"is_unique": True,
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"name": "page_number",
|
| 37 |
+
"datatype": "int",
|
| 38 |
+
"label": "Page Number",
|
| 39 |
+
"description": "Page number from the source",
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"name": "sanskrit",
|
| 43 |
+
"label": "Lyrics in sanskrit",
|
| 44 |
+
"datatype": "str",
|
| 45 |
+
"description": "The original sloka in sanskrit.",
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"name": "translation",
|
| 49 |
+
"label": "English Translation",
|
| 50 |
+
"datatype": "str",
|
| 51 |
+
"description": "The english translation.",
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
"name": "transliteration",
|
| 55 |
+
"label": "English Transliteration",
|
| 56 |
+
"datatype": "str",
|
| 57 |
+
"description": "The english transliteration.",
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"name": "verse",
|
| 61 |
+
"label": "Verse Number",
|
| 62 |
+
"datatype": "int",
|
| 63 |
+
"description": "The verse number of the sloka.",
|
| 64 |
+
"show_as_filter": True,
|
| 65 |
+
"is_unique": True,
|
| 66 |
+
},
|
| 67 |
+
],
|
| 68 |
+
"pdf_path": "./data/vishnu_sahasranamam.pdf",
|
| 69 |
+
"source": "https://www.swami-krishnananda.org/vishnu/Sri_Vishnu_Sahasranama_Stotram.pdf",
|
| 70 |
+
"language": "san+eng",
|
| 71 |
+
"example_labels": ["Vanamali", "1000 names", "Sanskrit text search"],
|
| 72 |
+
"examples": [
|
| 73 |
+
"Vanamali",
|
| 74 |
+
"Show some of the 1000 names of Vishnu along with their meaning",
|
| 75 |
+
"show the verse that begins with शुक्लाम्बरधरं",
|
| 76 |
+
],
|
| 77 |
+
"llm_hints": [],
|
| 78 |
+
}
|
modules/config/yt_metadata.py
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
yt_metadata_config = {
|
| 2 |
+
"name": "yt_metadata",
|
| 3 |
+
"title": "Sampradayam in YouTube",
|
| 4 |
+
"output_dir": "./output/yt_metadata",
|
| 5 |
+
"collection_name": "yt_metadata",
|
| 6 |
+
"collection_embedding_fn": "openai",
|
| 7 |
+
"unit": "video",
|
| 8 |
+
"field_mapping": {
|
| 9 |
+
"text": "description",
|
| 10 |
+
"title": "video_title",
|
| 11 |
+
"author": "channel_title",
|
| 12 |
+
"reference_link": lambda doc: f"https://www.youtube.com/watch?v={doc.get('video_id','')}",
|
| 13 |
+
},
|
| 14 |
+
"metadata_fields": [
|
| 15 |
+
{
|
| 16 |
+
"name": "video_id",
|
| 17 |
+
"label": "Video ID",
|
| 18 |
+
"datatype": "str",
|
| 19 |
+
"description": "The video id as in YouTube",
|
| 20 |
+
"show_as_filter": True,
|
| 21 |
+
"is_unique": True,
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"name": "video_title",
|
| 25 |
+
"label": "Video Title",
|
| 26 |
+
"datatype": "str",
|
| 27 |
+
"description": "The title of the video as in YouTube",
|
| 28 |
+
"show_as_filter": True,
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"name": "description",
|
| 32 |
+
"label": "Video Description",
|
| 33 |
+
"datatype": "str",
|
| 34 |
+
"description": "Description as in YouTube",
|
| 35 |
+
"show_as_filter": True,
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"name": "channel_url",
|
| 39 |
+
"label": "Channel URL",
|
| 40 |
+
"datatype": "str",
|
| 41 |
+
"description": "URL of the YouTube Channel",
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"name": "channel_title",
|
| 45 |
+
"label": "Channel Title",
|
| 46 |
+
"datatype": "str",
|
| 47 |
+
"description": "Title of the YouTube Channel",
|
| 48 |
+
"show_as_filter": True,
|
| 49 |
+
},
|
| 50 |
+
],
|
| 51 |
+
"pdf_path": "./data/none.pdf",
|
| 52 |
+
"source": "https://youtube.com",
|
| 53 |
+
"language": "san+eng+tam",
|
| 54 |
+
"example_labels": ["Srirangam", "Pasuram video"],
|
| 55 |
+
"examples": [
|
| 56 |
+
"Show me YouTube videos that talk about Srirangam",
|
| 57 |
+
"Show me lyrics of 1st pasuram of 1st decade in the 4st Thiruvaimozhi. Also show the related youtube videos.",
|
| 58 |
+
],
|
| 59 |
+
"llm_hints": [
|
| 60 |
+
"if the user asks for YouTube videos, DO NOT do a web search, instead do a search on this collection."
|
| 61 |
+
],
|
| 62 |
+
}
|