Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Upload folder using huggingface_hub
Browse files
tools.py
CHANGED
|
@@ -24,6 +24,7 @@ allowed_collections = [s["collection_name"] for s in SanatanConfig.scriptures]
|
|
| 24 |
|
| 25 |
tool_search_db = StructuredTool.from_function(
|
| 26 |
query,
|
|
|
|
| 27 |
description=(
|
| 28 |
f"Do **NOT** use this tool if the user asks for specific verse numbers or pasuram numbers."
|
| 29 |
" Use this when the user asks **about themes, stories, ideas, emotions, or meanings** in the scriptures."
|
|
@@ -36,8 +37,8 @@ tool_search_db = StructuredTool.from_function(
|
|
| 36 |
tool_search_db_for_literal = StructuredTool.from_function(
|
| 37 |
query_by_literal_text,
|
| 38 |
description=(
|
| 39 |
-
"Use this only if the user explicitly says they want a 'literal match' or exact phrase search."
|
| 40 |
-
" This is not the default.
|
| 41 |
f" The collection_name must be one of: {', '.join(allowed_collections)}."
|
| 42 |
),
|
| 43 |
)
|
|
|
|
| 24 |
|
| 25 |
tool_search_db = StructuredTool.from_function(
|
| 26 |
query,
|
| 27 |
+
name="tool_semantic_vector_search",
|
| 28 |
description=(
|
| 29 |
f"Do **NOT** use this tool if the user asks for specific verse numbers or pasuram numbers."
|
| 30 |
" Use this when the user asks **about themes, stories, ideas, emotions, or meanings** in the scriptures."
|
|
|
|
| 37 |
tool_search_db_for_literal = StructuredTool.from_function(
|
| 38 |
query_by_literal_text,
|
| 39 |
description=(
|
| 40 |
+
"Use this only if the user explicitly says they want a 'literal match' or exact phrase search OR if the `tool_semantic_vector_search` or the `tool_search_db_by_metadata` don't yield accurate results."
|
| 41 |
+
" This is not the default."
|
| 42 |
f" The collection_name must be one of: {', '.join(allowed_collections)}."
|
| 43 |
),
|
| 44 |
)
|