Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- config.py +6 -6
- modules/nodes/init.py +1 -1
config.py
CHANGED
|
@@ -20,7 +20,7 @@ class SanatanConfig:
|
|
| 20 |
"collection_embedding_fn": "openai",
|
| 21 |
"unit" : "page",
|
| 22 |
"metadata_fields": [
|
| 23 |
-
{"name": "file", "datatype": "str"},
|
| 24 |
{"name": "num_chars", "datatype": "str"},
|
| 25 |
{"name": "page", "datatype": "int"},
|
| 26 |
],
|
|
@@ -50,7 +50,7 @@ class SanatanConfig:
|
|
| 50 |
"collection_name": "shukla_yajur_vedam",
|
| 51 |
"unit" : "page",
|
| 52 |
"metadata_fields": [
|
| 53 |
-
{"name": "file", "datatype": "str"},
|
| 54 |
{"name": "num_chars", "datatype": "str"},
|
| 55 |
{"name": "page", "datatype": "int"},
|
| 56 |
],
|
|
@@ -77,7 +77,7 @@ class SanatanConfig:
|
|
| 77 |
"collection_embedding_fn": "openai",
|
| 78 |
"unit" : "page",
|
| 79 |
"metadata_fields": [
|
| 80 |
-
{"name": "file", "datatype": "str"},
|
| 81 |
{"name": "num_chars", "datatype": "str"},
|
| 82 |
{"name": "page", "datatype": "int"},
|
| 83 |
],
|
|
@@ -110,7 +110,7 @@ class SanatanConfig:
|
|
| 110 |
"collection_embedding_fn": "openai",
|
| 111 |
"unit" : "page",
|
| 112 |
"metadata_fields": [
|
| 113 |
-
{"name": "file", "datatype": "str"},
|
| 114 |
{"name": "num_chars", "datatype": "str"},
|
| 115 |
{"name": "page", "datatype": "int"},
|
| 116 |
],
|
|
@@ -274,7 +274,7 @@ class SanatanConfig:
|
|
| 274 |
"collection_name": "bhagavata_purana",
|
| 275 |
"unit" : "page",
|
| 276 |
"metadata_fields": [
|
| 277 |
-
{"name": "file", "datatype": "str"},
|
| 278 |
{"name": "num_chars", "datatype": "str"},
|
| 279 |
{"name": "page", "datatype": "int"},
|
| 280 |
],
|
|
@@ -296,7 +296,7 @@ class SanatanConfig:
|
|
| 296 |
"unit" : "verse",
|
| 297 |
"metadata_fields": [
|
| 298 |
{
|
| 299 |
-
"name": "
|
| 300 |
"datatype": "str",
|
| 301 |
"description": "The name of the Kandam or the chapter.",
|
| 302 |
},
|
|
|
|
| 20 |
"collection_embedding_fn": "openai",
|
| 21 |
"unit" : "page",
|
| 22 |
"metadata_fields": [
|
| 23 |
+
{"name": "file", "datatype": "str", "desc" : "name of the file from which the information was extracted"},
|
| 24 |
{"name": "num_chars", "datatype": "str"},
|
| 25 |
{"name": "page", "datatype": "int"},
|
| 26 |
],
|
|
|
|
| 50 |
"collection_name": "shukla_yajur_vedam",
|
| 51 |
"unit" : "page",
|
| 52 |
"metadata_fields": [
|
| 53 |
+
{"name": "file", "datatype": "str", "desc" : "name of the file from which the information was extracted"},
|
| 54 |
{"name": "num_chars", "datatype": "str"},
|
| 55 |
{"name": "page", "datatype": "int"},
|
| 56 |
],
|
|
|
|
| 77 |
"collection_embedding_fn": "openai",
|
| 78 |
"unit" : "page",
|
| 79 |
"metadata_fields": [
|
| 80 |
+
{"name": "file", "datatype": "str", "desc" : "name of the file from which the information was extracted"},
|
| 81 |
{"name": "num_chars", "datatype": "str"},
|
| 82 |
{"name": "page", "datatype": "int"},
|
| 83 |
],
|
|
|
|
| 110 |
"collection_embedding_fn": "openai",
|
| 111 |
"unit" : "page",
|
| 112 |
"metadata_fields": [
|
| 113 |
+
{"name": "file", "datatype": "str", "desc" : "name of the file from which the information was extracted"},
|
| 114 |
{"name": "num_chars", "datatype": "str"},
|
| 115 |
{"name": "page", "datatype": "int"},
|
| 116 |
],
|
|
|
|
| 274 |
"collection_name": "bhagavata_purana",
|
| 275 |
"unit" : "page",
|
| 276 |
"metadata_fields": [
|
| 277 |
+
{"name": "file", "datatype": "str", "desc" : "name of the file from which the information was extracted"},
|
| 278 |
{"name": "num_chars", "datatype": "str"},
|
| 279 |
{"name": "page", "datatype": "int"},
|
| 280 |
],
|
|
|
|
| 296 |
"unit" : "verse",
|
| 297 |
"metadata_fields": [
|
| 298 |
{
|
| 299 |
+
"name": "kandam",
|
| 300 |
"datatype": "str",
|
| 301 |
"description": "The name of the Kandam or the chapter.",
|
| 302 |
},
|
modules/nodes/init.py
CHANGED
|
@@ -96,7 +96,7 @@ If the answer is not directly stated in the verses but is present in explanatory
|
|
| 96 |
If the answer asks for translation to another language of their choice and you are capable of doing that, you are allowed to do that.
|
| 97 |
|
| 98 |
if there was no information in the context, then ask the user in {user_preferred_language} "Can you give me more context please?".
|
| 99 |
-
If the answer WAS indeed found in the context, use the following response format (in Markdown) otherwise clearly state **"I do not have enough information from the {scripture} to answer this. I searched using {search_methodology}. Do you want me try to another search like {alternative_searchmethod}?"**
|
| 100 |
|
| 101 |
### 🧾 Answer
|
| 102 |
- Present a brief summary of your response in concise **{user_preferred_language}**. Mention only the scripture(s), chapter(s) and verse number(s) available if multiple matches are available.
|
|
|
|
| 96 |
If the answer asks for translation to another language of their choice and you are capable of doing that, you are allowed to do that.
|
| 97 |
|
| 98 |
if there was no information in the context, then ask the user in {user_preferred_language} "Can you give me more context please?".
|
| 99 |
+
If the answer WAS indeed found in the context, use the following response format (in Markdown) otherwise clearly state **"I do not have enough information in the context provided from the {scripture} to answer this. I searched using {search_methodology}. Do you want me try to another search like {alternative_searchmethod}?"**
|
| 100 |
|
| 101 |
### 🧾 Answer
|
| 102 |
- Present a brief summary of your response in concise **{user_preferred_language}**. Mention only the scripture(s), chapter(s) and verse number(s) available if multiple matches are available.
|