Ajey95
commited on
Commit
·
ef1317f
1
Parent(s):
b075693
Initial push
Browse files- README.md +229 -9
- claude_desktop_config.json +0 -0
- data/bhagavad_gita.txt +177 -0
- data/dharma_teachings.txt +87 -0
- data/upanishads.txt +80 -0
- debug_python.py +12 -0
- karma_check.py +1893 -0
- requirements.txt +0 -0
- start.bat +0 -0
- start.sh +0 -0
- storage/default__vector_store.json +0 -0
- storage/docstore.json +1 -0
- storage/graph_store.json +1 -0
- storage/image__vector_store.json +1 -0
- storage/index_store.json +1 -0
README.md
CHANGED
@@ -1,14 +1,234 @@
|
|
1 |
---
|
2 |
-
title: KarmaCheck
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 5.
|
8 |
-
app_file:
|
9 |
-
pinned:
|
10 |
license: mit
|
11 |
-
short_description:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
---
|
|
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
title: 🕉 KarmaCheck - Spiritual Guidance & MCP Server
|
3 |
+
emoji: 🕉
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: purple
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 5.0
|
8 |
+
app_file: karma_check.py
|
9 |
+
pinned: true
|
10 |
license: mit
|
11 |
+
short_description: Universal wisdom AI with MCP server for spiritual guidance through ancient texts 🚀
|
12 |
+
tags:
|
13 |
+
- mcp-server-track
|
14 |
+
- spiritual-guidance
|
15 |
+
- ancient-wisdom
|
16 |
+
- life-coaching
|
17 |
+
- ethical-guidance
|
18 |
+
- track-1
|
19 |
+
- mcp-server
|
20 |
+
- llamaindex
|
21 |
+
- rag
|
22 |
+
video_overview: https://www.youtube.com/watch?v=YOUR_VIDEO_ID_HERE
|
23 |
+
collection: >-
|
24 |
+
https://huggingface.co/collections/Agents-MCP-Hackathon
|
25 |
---
|
26 |
+
# 🕉️ KarmaCheck - Spiritual Guidance with MCP Server
|
27 |
|
28 |
+
KarmaCheck is an AI-powered spiritual assistant that provides guidance based on ancient Vedic wisdom. It combines Retrieval-Augmented Generation (RAG) with Vedic scriptures to offer meaningful insights for modern life challenges.
|
29 |
+
|
30 |
+
## ✨ Features
|
31 |
+
|
32 |
+
- 🔮 **Spiritual Guidance**: Get personalized advice based on Vedic principles
|
33 |
+
- 📚 **Sacred Texts**: Draws from Bhagavad Gita, Upanishads, and dharmic teachings
|
34 |
+
- 🤖 **MCP Server**: Integrate with Claude Desktop for seamless AI interactions
|
35 |
+
- 🌟 **Daily Wisdom**: Receive daily spiritual insights
|
36 |
+
- ⚖️ **Ethical Analysis**: Analyze dilemmas using dharmic principles
|
37 |
+
- 🎯 **Concept Explanation**: Understand spiritual concepts deeply
|
38 |
+
|
39 |
+
## 🚀 Quick Start
|
40 |
+
|
41 |
+
### 1. Installation
|
42 |
+
|
43 |
+
```bash
|
44 |
+
# Clone or download the project
|
45 |
+
git clone <your-repo-url>
|
46 |
+
cd karmacheck
|
47 |
+
|
48 |
+
# Install dependencies
|
49 |
+
pip install -r requirements.txt
|
50 |
+
```
|
51 |
+
|
52 |
+
### 2. Get Hugging Face API Token
|
53 |
+
|
54 |
+
1. Go to [Hugging Face Settings](https://huggingface.co/settings/tokens)
|
55 |
+
2. Create a new token (read access is sufficient)
|
56 |
+
3. Copy the token
|
57 |
+
|
58 |
+
### 3. Configuration
|
59 |
+
|
60 |
+
```bash
|
61 |
+
# Copy the example environment file
|
62 |
+
cp .env.example .env
|
63 |
+
|
64 |
+
# Edit .env and add your token
|
65 |
+
HUGGINGFACE_API_TOKEN=your_actual_token_here
|
66 |
+
```
|
67 |
+
|
68 |
+
### 4. Run the Application
|
69 |
+
|
70 |
+
```bash
|
71 |
+
python karma_check.py
|
72 |
+
```
|
73 |
+
|
74 |
+
The app will be available at:
|
75 |
+
- 🌐 **Web UI**: http://localhost:7860
|
76 |
+
- 🔧 **MCP Server**: Same address for Claude Desktop
|
77 |
+
|
78 |
+
## 🤖 Claude Desktop Integration
|
79 |
+
|
80 |
+
### Setup Steps:
|
81 |
+
|
82 |
+
1. **Install Claude Desktop** (if not already installed)
|
83 |
+
|
84 |
+
2. **Configure MCP Server**:
|
85 |
+
|
86 |
+
Add this to your Claude Desktop MCP configuration:
|
87 |
+
|
88 |
+
```json
|
89 |
+
{
|
90 |
+
"mcpServers": {
|
91 |
+
"karmacheck": {
|
92 |
+
"command": "python",
|
93 |
+
"args": ["/absolute/path/to/karma_check.py"],
|
94 |
+
"env": {
|
95 |
+
"HUGGINGFACE_API_TOKEN": "your_hf_token_here"
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
}
|
100 |
+
```
|
101 |
+
|
102 |
+
3. **Update the path**: Replace `/absolute/path/to/karma_check.py` with the actual path to your file
|
103 |
+
|
104 |
+
4. **Restart Claude Desktop**
|
105 |
+
|
106 |
+
### Available MCP Tools:
|
107 |
+
|
108 |
+
- `get_spiritual_guidance(question)` - Main spiritual guidance function
|
109 |
+
- `find_vedic_quotes(topic)` - Find quotes on specific topics
|
110 |
+
- `explain_concept(concept)` - Explain spiritual concepts
|
111 |
+
- `daily_wisdom()` - Get daily spiritual insight
|
112 |
+
- `analyze_dilemma(situation)` - Analyze ethical dilemmas
|
113 |
+
|
114 |
+
### Example Usage in Claude:
|
115 |
+
|
116 |
+
```
|
117 |
+
User: Use KarmaCheck to help me understand karma
|
118 |
+
Claude: I'll use the KarmaCheck tool to explain karma for you.
|
119 |
+
|
120 |
+
[Uses explain_concept("karma")]
|
121 |
+
|
122 |
+
Based on Vedic teachings, karma refers to...
|
123 |
+
```
|
124 |
+
|
125 |
+
## 📚 Data Sources
|
126 |
+
|
127 |
+
The system comes with sample Vedic texts including:
|
128 |
+
- Bhagavad Gita verses and commentary
|
129 |
+
- Upanishad teachings
|
130 |
+
- Dharmic principles and guidance
|
131 |
+
|
132 |
+
### Adding Your Own Texts:
|
133 |
+
|
134 |
+
1. Create text files in the `data/` directory
|
135 |
+
2. Include verses, commentary, and context
|
136 |
+
3. Restart the application to rebuild the index
|
137 |
+
|
138 |
+
## 🛠️ Technical Details
|
139 |
+
|
140 |
+
- **RAG System**: LlamaIndex with FAISS vector store
|
141 |
+
- **Embeddings**: Hugging Face `all-MiniLM-L6-v2`
|
142 |
+
- **LLM**: Mistral-7B-Instruct via Hugging Face Inference API
|
143 |
+
- **UI**: Gradio with MCP server support
|
144 |
+
- **Vector Storage**: Local FAISS index with persistence
|
145 |
+
|
146 |
+
## 🔧 Customization
|
147 |
+
|
148 |
+
### Model Configuration:
|
149 |
+
|
150 |
+
Edit the configuration in `karma_check.py`:
|
151 |
+
|
152 |
+
```python
|
153 |
+
@dataclass
|
154 |
+
class KarmaCheckConfig:
|
155 |
+
embedding_model: str = "sentence-transformers/all-MiniLM-L6-v2"
|
156 |
+
llm_model: str = "mistralai/Mistral-7B-Instruct-v0.1"
|
157 |
+
chunk_size: int = 512
|
158 |
+
similarity_top_k: int = 5
|
159 |
+
# ... other settings
|
160 |
+
```
|
161 |
+
|
162 |
+
### Adding New MCP Tools:
|
163 |
+
|
164 |
+
```python
|
165 |
+
@gr.mcp_tool()
|
166 |
+
def your_new_tool(parameter: str) -> str:
|
167 |
+
"""Description of your tool for MCP clients"""
|
168 |
+
# Your implementation
|
169 |
+
return result
|
170 |
+
```
|
171 |
+
|
172 |
+
## 📖 Example Questions
|
173 |
+
|
174 |
+
### Life & Purpose:
|
175 |
+
- "How can I find my life's true purpose?"
|
176 |
+
- "I feel lost in my career. What should I do?"
|
177 |
+
- "How do I know if I'm following my dharma?"
|
178 |
+
|
179 |
+
### Relationships:
|
180 |
+
- "How should I handle conflicts with family?"
|
181 |
+
- "What does love mean spiritually?"
|
182 |
+
- "How can I forgive someone who hurt me?"
|
183 |
+
|
184 |
+
### Personal Growth:
|
185 |
+
- "How do I overcome anxiety?"
|
186 |
+
- "What is the spiritual meaning of suffering?"
|
187 |
+
- "How can I develop inner peace?"
|
188 |
+
|
189 |
+
### Ethics:
|
190 |
+
- "I'm facing an ethical dilemma at work"
|
191 |
+
- "How do I balance personal desires with duty?"
|
192 |
+
- "What does righteous living mean today?"
|
193 |
+
|
194 |
+
## 🐛 Troubleshooting
|
195 |
+
|
196 |
+
### Common Issues:
|
197 |
+
|
198 |
+
1. **Token Error**: Make sure `HUGGINGFACE_API_TOKEN` is set correctly
|
199 |
+
2. **Model Loading**: Hugging Face models may take time to load initially
|
200 |
+
3. **Dependencies**: Ensure all packages are installed: `pip install -r requirements.txt`
|
201 |
+
4. **Claude Desktop**: Use absolute file paths in MCP configuration
|
202 |
+
|
203 |
+
### Getting Help:
|
204 |
+
|
205 |
+
- Check the console output for detailed error messages
|
206 |
+
- Ensure stable internet connection for Hugging Face API
|
207 |
+
- Verify Python version (3.8+ recommended)
|
208 |
+
|
209 |
+
## 🙏 Contributing
|
210 |
+
|
211 |
+
Contributions are welcome! Areas for improvement:
|
212 |
+
- Additional Vedic texts and translations
|
213 |
+
- Enhanced spiritual analysis features
|
214 |
+
- Better multilingual support
|
215 |
+
- Advanced meditation and practice recommendations
|
216 |
+
|
217 |
+
## 📜 License
|
218 |
+
|
219 |
+
This project is open source. Use it for personal growth and spiritual development.
|
220 |
+
|
221 |
+
## 🕉️ Acknowledgments
|
222 |
+
|
223 |
+
- Ancient Vedic sages for their timeless wisdom
|
224 |
+
- Hugging Face for democratizing AI
|
225 |
+
- Gradio team for excellent tooling
|
226 |
+
- LlamaIndex for powerful RAG capabilities
|
227 |
+
|
228 |
+
---
|
229 |
+
|
230 |
+
*"यदा यदा हि धर्मस्य ग्लानिर्भवति भारत। अभ्युत्थानमधर्मस्य तदात्मानं सृजाम्यहम्॥"*
|
231 |
+
|
232 |
+
*"Whenever there is a decline in righteousness and an increase in unrighteousness, I manifest myself."* - Bhagavad Gita 4.7
|
233 |
+
|
234 |
+
#### 🌟 May this tool serve your spiritual journey with wisdom and compassion.
|
claude_desktop_config.json
ADDED
Binary file (850 Bytes). View file
|
|
data/bhagavad_gita.txt
ADDED
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Bhagavad Gita Chapter 1, Verse 28-29:
|
2 |
+
अर्जुन उवाच - दृष्ट्वेमं स्वजनं कृष्ण युयुत्सुं समुपस्थितम्।
|
3 |
+
सीदन्ति मम गात्राणि मुखं च परिशुष्यति॥
|
4 |
+
|
5 |
+
"Arjuna said: O Krishna, seeing my own people arrayed for battle and eager to fight, my limbs grow weak and my mouth becomes dry."
|
6 |
+
|
7 |
+
Commentary: This verse captures the universal human experience of anxiety when facing difficult decisions or conflicts. Arjuna's physical symptoms - weakness and dry mouth - are the same stress responses we experience today when confronted with challenging situations. This teaches us that even great warriors and spiritual seekers face moments of doubt and anxiety.
|
8 |
+
|
9 |
+
Keywords: anxiety, stress, difficult decisions, fear, overwhelming situations, physical symptoms of worry
|
10 |
+
|
11 |
+
---
|
12 |
+
|
13 |
+
Bhagavad Gita Chapter 2, Verse 11-12:
|
14 |
+
श्रीभगवानुवाच - अशोच्यानन्वशोचस्त्वं प्रज्ञावादांश्च भाषसे।
|
15 |
+
गतासूनगतासूंश्च नानुशोचन्ति पण्डिताः॥
|
16 |
+
|
17 |
+
"The Supreme Lord said: While speaking learned words, you are mourning for what is not worthy of grief. Those who are wise lament neither for the living nor for the dead."
|
18 |
+
|
19 |
+
Commentary: Krishna teaches about the eternal nature of the soul and the futility of excessive grief over temporary circumstances. This doesn't mean being emotionless, but rather understanding the deeper reality beyond surface appearances. In modern terms, this helps us deal with loss, change, and life transitions with greater equanimity.
|
20 |
+
|
21 |
+
Keywords: grief, loss, wise perspective, death, change, emotional balance, letting go
|
22 |
+
|
23 |
+
---
|
24 |
+
|
25 |
+
Bhagavad Gita Chapter 2, Verse 47:
|
26 |
+
कर्मण्येवाधिकारस्ते मा फलेषु कदाचन।
|
27 |
+
मा कर्मफलहेतुर्भूर्मा ते सङ्गोऽस्त्वकर्मणि॥
|
28 |
+
|
29 |
+
"You have a right to perform your prescribed duty, but not to the fruits of action. Never consider yourself the cause of the results of your activities, and never be attached to not doing your duty."
|
30 |
+
|
31 |
+
Commentary: This is the foundational principle of Karma Yoga - performing action without attachment to results. In modern life, this means doing your best at work, in relationships, and in personal growth, while releasing anxiety about outcomes. Focus on the process, not the results. This reduces stress and increases effectiveness.
|
32 |
+
|
33 |
+
Keywords: duty, work, action without attachment, letting go of results, stress reduction, focus on process
|
34 |
+
|
35 |
+
---
|
36 |
+
|
37 |
+
Bhagavad Gita Chapter 2, Verse 62-63:
|
38 |
+
ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते।
|
39 |
+
सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते॥
|
40 |
+
|
41 |
+
"While contemplating the objects of the senses, a person develops attachment for them, and from such attachment lust develops, and from lust anger arises."
|
42 |
+
|
43 |
+
Commentary: This verse explains the psychology of desire and how it leads to suffering. When we constantly think about what we want - material possessions, relationships, status - we develop attachment. This attachment breeds craving, and when we don't get what we want, frustration and anger arise. The solution is mindful awareness of our thought patterns.
|
44 |
+
|
45 |
+
Keywords: desire, attachment, anger, frustration, mindfulness, mental patterns, craving
|
46 |
+
|
47 |
+
---
|
48 |
+
|
49 |
+
Bhagavad Gita Chapter 3, Verse 8:
|
50 |
+
नियतं कुरु कर्म त्वं कर्म ज्यायो ह्यकर्मणः।
|
51 |
+
शरीरयात्रापि च ते न प्रसिद्ध्येदकर्मणः॥
|
52 |
+
|
53 |
+
"Perform your prescribed duty, for action is better than inaction. A man cannot even maintain his physical body without work."
|
54 |
+
|
55 |
+
Commentary: This verse emphasizes the importance of purposeful action over paralysis or inactivity. In modern terms, this addresses procrastination, depression, and the tendency to withdraw from life's responsibilities. Even small, consistent actions are better than being overwhelmed into inaction.
|
56 |
+
|
57 |
+
Keywords: action vs inaction, procrastination, depression, responsibility, purposeful living, consistent effort
|
58 |
+
|
59 |
+
---
|
60 |
+
|
61 |
+
Bhagavad Gita Chapter 3, Verse 21:
|
62 |
+
यद्यदाचरति श्रेष्ठस्तत्तदेवेतरो जनः।
|
63 |
+
स यत्प्रमाणं कुरुते लोकस्तदनुवर्तते॥
|
64 |
+
|
65 |
+
"Whatever action a great person performs, common people follow. And whatever standards such leaders set by exemplary acts, all the world pursues."
|
66 |
+
|
67 |
+
Commentary: This teaches about the responsibility of leadership and influence. Everyone is a leader in some capacity - as a parent, colleague, friend, or community member. Our actions ripple outward and influence others. Therefore, we should strive to be examples of the values we want to see in the world.
|
68 |
+
|
69 |
+
Keywords: leadership, influence, example, responsibility, role model, social impact, integrity
|
70 |
+
|
71 |
+
---
|
72 |
+
|
73 |
+
Bhagavad Gita Chapter 4, Verse 18:
|
74 |
+
कर्मण्यकर्म यः पश्येदकर्मणि च कर्म यः।
|
75 |
+
स बुद्धिमान्मनुष्येषु स युक्तः कृत्स्नकर्मकृत्॥
|
76 |
+
|
77 |
+
"One who can see inaction in action, and action in inaction, is intelligent among humans and is in the transcendental position, although engaged in all sorts of activities."
|
78 |
+
|
79 |
+
Commentary: This verse points to a profound understanding of action and non-action. The wise person performs necessary duties without ego-involvement, maintaining inner stillness even while being active. This is the secret of working without stress - being fully engaged yet internally detached.
|
80 |
+
|
81 |
+
Keywords: intelligent action, inner stillness, working without stress, transcendence, balance, ego-free action
|
82 |
+
|
83 |
+
---
|
84 |
+
|
85 |
+
Bhagavad Gita Chapter 6, Verse 5:
|
86 |
+
उद्धरेदात्मनात्मानं नात्मानमवसादयेत्।
|
87 |
+
आत्मैव ह्यात्मनो बन्धुरात्मैव रिपुरात्मनः॥
|
88 |
+
|
89 |
+
"One must deliver oneself with the help of one's mind, and not degrade oneself. The mind is the friend of the conditioned soul, and his enemy as well."
|
90 |
+
|
91 |
+
Commentary: This verse emphasizes personal responsibility for spiritual and psychological development. Your mind can be your greatest ally or your worst enemy, depending on how you train it. Through practices like meditation, positive thinking, and self-awareness, you can make your mind your friend rather than your enemy.
|
92 |
+
|
93 |
+
Keywords: self-help, mind control, mental training, meditation, self-awareness, personal responsibility, inner work
|
94 |
+
|
95 |
+
---
|
96 |
+
|
97 |
+
Bhagavad Gita Chapter 6, Verse 17:
|
98 |
+
युक्ताहारविहारस्य युक्तचेष्टस्य कर्मसु।
|
99 |
+
युक्तस्वप्नावबोधस्य योगो भवति दुःखहा॥
|
100 |
+
|
101 |
+
"He who is moderate in his eating, sleeping, recreation and work can mitigate all material suffering by practicing the yoga system."
|
102 |
+
|
103 |
+
Commentary: This verse teaches the importance of balance and moderation in daily life. Extremes in any area - whether eating, sleeping, working, or playing - create suffering. A balanced lifestyle is itself a spiritual practice that reduces suffering and supports inner peace.
|
104 |
+
|
105 |
+
Keywords: balance, moderation, healthy lifestyle, work-life balance, reducing suffering, practical spirituality
|
106 |
+
|
107 |
+
---
|
108 |
+
|
109 |
+
Bhagavad Gita Chapter 6, Verse 26:
|
110 |
+
यतो यतो निश्चरति मनश्चञ्चलमस्थिरम्।
|
111 |
+
ततस्ततो नियम्यैतदात्मन्येव वशं नयेत्॥
|
112 |
+
|
113 |
+
"Whenever the restless and unsteady mind wanders away from the focus of meditation, one should gently bring it back and fix it on the Self."
|
114 |
+
|
115 |
+
Commentary: This is perhaps the most practical instruction for meditation and mindfulness. The mind will wander - this is normal and expected. The practice is in gently, without judgment, bringing attention back to your chosen focus. This applies not just to formal meditation but to staying present throughout daily life.
|
116 |
+
|
117 |
+
Keywords: meditation, mindfulness, wandering mind, gentle attention, staying present, mental discipline
|
118 |
+
|
119 |
+
---
|
120 |
+
|
121 |
+
Bhagavad Gita Chapter 9, Verse 22:
|
122 |
+
अनन्याश्चिन्तयन्तो मां ये जनाः पर्युपासते।
|
123 |
+
तेषां नित्याभियुक्तानां योगक्षेमं वहाम्यहम्॥
|
124 |
+
|
125 |
+
"To those who are constantly devoted and who always remember Me with love, I give the understanding by which they can come to Me."
|
126 |
+
|
127 |
+
Commentary: This verse speaks to the power of consistent spiritual practice and devotion. When we maintain regular connection with the divine through prayer, meditation, or contemplation, wisdom and guidance naturally arise. This doesn't require blind faith, but rather consistent practice and openness.
|
128 |
+
|
129 |
+
Keywords: devotion, regular practice, spiritual consistency, divine guidance, prayer, meditation, wisdom
|
130 |
+
|
131 |
+
---
|
132 |
+
|
133 |
+
Bhagavad Gita Chapter 12, Verse 13-14:
|
134 |
+
अद्वेष्टा सर्वभूतानां मैत्रः करुण एव च।
|
135 |
+
निर्ममो निरहङ्कारः समदुःखसुखः क्षमी॥
|
136 |
+
|
137 |
+
"One who is not envious but who is a kind friend to all living entities, who does not think himself a proprietor and is free from false ego, who is equal in both happiness and distress, who is tolerant..."
|
138 |
+
|
139 |
+
Commentary: This verse describes the qualities of a spiritually mature person. Such a person has moved beyond petty jealousies and ego-driven conflicts. They maintain equanimity in success and failure, treating all beings with kindness. This is an ideal to aspire toward in our relationships and daily interactions.
|
140 |
+
|
141 |
+
Keywords: non-envy, kindness, humility, equanimity, tolerance, spiritual maturity, good relationships
|
142 |
+
|
143 |
+
---
|
144 |
+
|
145 |
+
Bhagavad Gita Chapter 15, Verse 7:
|
146 |
+
ममैवांशो जीवलोके जीवभूतः सनातनः।
|
147 |
+
मनःषष्ठानीन्द्रियाणि प्रकृतिस्थानि कर्षति॥
|
148 |
+
|
149 |
+
"The living entities in this conditioned world are My eternal fragmental parts. Due to conditioned life, they are struggling very hard with the six senses, which include the mind."
|
150 |
+
|
151 |
+
Commentary: This verse teaches that all beings are essentially divine at their core. Our struggles come from identification with the body and mind rather than our true spiritual nature. Understanding this helps develop compassion for others and patience with our own spiritual journey. Everyone is doing their best given their level of consciousness.
|
152 |
+
|
153 |
+
Keywords: divine nature, true self, compassion, spiritual journey, patience with others, essential divinity
|
154 |
+
|
155 |
+
---
|
156 |
+
|
157 |
+
Bhagavad Gita Chapter 18, Verse 58:
|
158 |
+
मच्चित्तः सर्वदुर्गाणि मत्प्रसादात्तरिष्यसि।
|
159 |
+
अथ चेत्त्वमहङ्कारान्न श्रोष्यसि विनङ्क्ष्यसि॥
|
160 |
+
|
161 |
+
"If you become conscious of Me, you will pass over all the obstacles of conditioned life by My grace. But if you do not work in such consciousness but act through false ego, you will be lost."
|
162 |
+
|
163 |
+
Commentary: This verse speaks to the difference between ego-driven action and surrendered action. When we act from ego, we create more problems and suffering. When we act with surrender to a higher purpose or divine will, obstacles naturally resolve. This is about aligning with life rather than fighting against it.
|
164 |
+
|
165 |
+
Keywords: divine consciousness, surrender, ego vs higher self, overcoming obstacles, grace, alignment with life
|
166 |
+
|
167 |
+
---
|
168 |
+
|
169 |
+
Bhagavad Gita Chapter 18, Verse 66:
|
170 |
+
सर्वधर्मान्परित्यज्य मामेकं शरणं व्रज।
|
171 |
+
अहं त्वां सर्वपापेभ्यो मोक्षयिष्यामि मा शुचः॥
|
172 |
+
|
173 |
+
"Abandon all varieties of religion and just surrender unto Me. I shall deliver you from all sinful reactions. Do not fear."
|
174 |
+
|
175 |
+
Commentary: This final instruction of the Gita emphasizes complete trust and surrender to the divine. It doesn't mean abandoning ethical behavior, but rather releasing the ego's need to control everything. When we surrender our fears and anxieties to a higher power, we find peace and guidance. This is about trust in life's process.
|
176 |
+
|
177 |
+
Keywords: surrender, trust, letting go of control, divine protection, overcoming fear, spiritual peace
|
data/dharma_teachings.txt
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
On Work and Career Dharma:
|
2 |
+
"One's dharma in work is not determined by external success or society's expectations, but by the intersection of one's natural talents, life circumstances, and what serves the greater good. A person may be called to be a teacher, a business leader, a parent, or a service worker - each path is equally sacred when performed with the right intention."
|
3 |
+
|
4 |
+
Commentary: In modern times, career confusion often arises from chasing external validation rather than understanding our authentic calling. Dharmic career choices consider: What am I naturally good at? What does the world need? What brings me genuine fulfillment? What allows me to serve others? The answers to these questions point toward your dharma.
|
5 |
+
|
6 |
+
Keywords: career calling, authentic work, natural talents, serving others, right livelihood, dharmic career choices
|
7 |
+
|
8 |
+
---
|
9 |
+
|
10 |
+
On Relationships and Marriage:
|
11 |
+
"In relationships, dharma means treating the other person as a divine being worthy of respect, while maintaining your own integrity and boundaries. Love is not possession or control, but rather creating space for both people to grow spiritually. When conflicts arise, ask: 'How can I respond in a way that honors both of us?'"
|
12 |
+
|
13 |
+
Commentary: Modern relationships often suffer from ego-based patterns - trying to control, change, or possess the other person. Dharmic relationships are based on mutual respect, spiritual growth, and service. This doesn't mean being passive or having no boundaries, but rather approaching conflicts with wisdom and compassion.
|
14 |
+
|
15 |
+
Keywords: dharmic relationships, mutual respect, spiritual growth together, healthy boundaries, resolving conflicts
|
16 |
+
|
17 |
+
---
|
18 |
+
|
19 |
+
On Parenting and Family Dharma:
|
20 |
+
"A parent's dharma is not to live vicariously through their children or force them into predetermined paths, but to provide love, guidance, and opportunities for the child to discover their own divine nature and unique gifts. Discipline should come from love, not anger. Teaching should come from example, not just words."
|
21 |
+
|
22 |
+
Commentary: Modern parenting often becomes about achievement and status rather than character development and spiritual growth. Dharmic parenting focuses on helping children develop wisdom, compassion, and self-knowledge. This means supporting their natural inclinations while teaching important values and life skills.
|
23 |
+
|
24 |
+
Keywords: dharmic parenting, child's unique gifts, character development, loving discipline, spiritual growth in children
|
25 |
+
|
26 |
+
---
|
27 |
+
|
28 |
+
On Money and Material Possessions:
|
29 |
+
"Wealth is a tool for dharma, not the goal of life. Money should be earned through honest means, used for genuine needs and the welfare of others, and never allowed to become a source of pride or security. The wealthy have a greater responsibility to serve society. The poor should not feel ashamed, as material wealth does not determine spiritual worth."
|
30 |
+
|
31 |
+
Commentary: In a materialistic society, it's easy to lose perspective about money. Dharmic relationship with wealth means: earning honestly, spending wisely, saving appropriately, and giving generously. Money should serve life's higher purposes, not become life's primary purpose. Both poverty and wealth present spiritual challenges and opportunities.
|
32 |
+
|
33 |
+
Keywords: dharmic wealth, honest earning, generous giving, money as tool, spiritual worth beyond wealth
|
34 |
+
|
35 |
+
---
|
36 |
+
|
37 |
+
On Mental Health and Anxiety:
|
38 |
+
"Anxiety often arises from the ego-mind's attempt to control the uncontrollable. The dharmic response to anxiety is not suppression or indulgence, but rather understanding its root causes and responding with appropriate action. Practice surrender to what you cannot control, while taking responsible action in areas where you have influence."
|
39 |
+
|
40 |
+
Commentary: Modern anxiety often stems from information overload, social comparison, and disconnection from meaning and purpose. Dharmic approaches to mental health include: regular spiritual practice, service to others, connection with nature, healthy lifestyle choices, and seeking appropriate help when needed. Mental health is part of overall spiritual health.
|
41 |
+
|
42 |
+
Keywords: managing anxiety dharmically, surrender and action, spiritual approaches to mental health, finding meaning
|
43 |
+
|
44 |
+
---
|
45 |
+
|
46 |
+
On Social Media and Technology:
|
47 |
+
"Technology should serve dharma, not distract from it. Use social media and digital tools to connect meaningfully with others, learn valuable knowledge, and spread positive influence. Avoid using technology for ego-gratification, comparison with others, or escape from present-moment awareness. Take regular breaks from digital devices to maintain inner peace."
|
48 |
+
|
49 |
+
Commentary: Modern technology can either support or hinder spiritual growth. Dharmic use of technology means being intentional about consumption, avoiding addiction patterns, and using these tools to enhance rather than replace real human connection. Social media should inspire and inform, not create jealousy and superficiality.
|
50 |
+
|
51 |
+
Keywords: dharmic technology use, intentional social media, digital wellness, avoiding comparison, present moment awareness
|
52 |
+
|
53 |
+
---
|
54 |
+
|
55 |
+
On Environmental Responsibility:
|
56 |
+
"The Earth is our mother, and dharma includes caring for the environment as we would care for our own mother. This means consuming mindfully, reducing waste, supporting sustainable practices, and considering the environmental impact of our choices. Environmental destruction is a form of violence that affects all beings."
|
57 |
+
|
58 |
+
Commentary: Environmental dharma is increasingly important in modern times. This includes personal choices (reducing consumption, choosing sustainable products, conserving resources) and collective action (supporting environmentally responsible policies and businesses). Caring for the planet is caring for future generations and all life forms.
|
59 |
+
|
60 |
+
Keywords: environmental dharma, sustainable living, caring for Earth, mindful consumption, collective responsibility
|
61 |
+
|
62 |
+
---
|
63 |
+
|
64 |
+
On Dealing with Injustice and Social Issues:
|
65 |
+
"When witnessing injustice, dharma calls us to respond with both compassion and appropriate action. This may mean speaking truth to power, supporting those who are oppressed, or working for systemic change. However, the response should come from love rather than hatred, seeking to transform rather than destroy."
|
66 |
+
|
67 |
+
Commentary: Social dharma means not remaining passive in the face of injustice, while also ensuring that our responses are skillful and constructive. This might involve volunteering, donating, protesting peacefully, supporting just causes, or simply treating all people with dignity regardless of their background. The goal is positive transformation, not violent revolution.
|
68 |
+
|
69 |
+
Keywords: social dharma, responding to injustice, compassionate action, social responsibility, peaceful change
|
70 |
+
|
71 |
+
---
|
72 |
+
|
73 |
+
On Aging and Death:
|
74 |
+
"Aging is a natural part of life's journey, each stage offering unique opportunities for growth and service. Instead of fighting the aging process or fearing death, dharma teaches us to embrace each stage with grace, continue learning and growing, and prepare for death as a spiritual transition rather than an ending."
|
75 |
+
|
76 |
+
Commentary: Modern culture often fears aging and denies death, but dharmic perspective sees these as natural parts of life's cycle. This includes: staying physically and mentally active, sharing wisdom with younger generations, letting go of ego-driven ambitions, deepening spiritual practice, and facing mortality with curiosity rather than terror.
|
77 |
+
|
78 |
+
Keywords: dharmic aging, embracing life stages, preparing for death, spiritual transition, sharing wisdom
|
79 |
+
|
80 |
+
---
|
81 |
+
|
82 |
+
On Finding Life Purpose:
|
83 |
+
"Life purpose is not a single career or achievement, but rather a way of being that serves both your own growth and the welfare of others. Your dharma may express differently in different life stages - as a student, parent, professional, elder. The key is to remain attuned to how you can best serve in your current circumstances."
|
84 |
+
|
85 |
+
Commentary: Many people struggle with finding their "one true purpose," but dharmic perspective suggests that purpose evolves throughout life. The consistent thread is serving the highest good through your unique gifts and circumstances. This might mean raising children, creating art, running a business, volunteering, or simply being a source of kindness in daily interactions.
|
86 |
+
|
87 |
+
Keywords: evolving life purpose, serving through unique gifts, purpose in different life stages, highest good
|
data/upanishads.txt
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Mandukya Upanishad, Verse 2:
|
2 |
+
सर्वं ह्येतद् ब्रह्मायमात्मा ब्रह्म सोऽयमात्मा चतुष्पात्॥
|
3 |
+
|
4 |
+
"All this is indeed Brahman. This Self is Brahman, and this Self has four quarters."
|
5 |
+
|
6 |
+
Commentary: This fundamental teaching establishes that all of reality is one consciousness appearing in different forms. The four quarters refer to waking, dreaming, deep sleep, and the transcendent state. Understanding this helps us realize that beneath all apparent differences - between people, situations, experiences - there is one underlying unity.
|
7 |
+
|
8 |
+
Keywords: unity consciousness, one reality, different states of consciousness, fundamental truth, non-duality
|
9 |
+
|
10 |
+
---
|
11 |
+
|
12 |
+
Isha Upanishad, Verse 1:
|
13 |
+
ईशावास्यमिदं सर्वं यत्किञ्च जगत्यां जगत्।
|
14 |
+
तेन त्यक्तेन भुञ्जीथा मा गृधः कस्यस्विद्धनम्॥
|
15 |
+
|
16 |
+
"The entire universe is pervaded by the Lord. Enjoy through renunciation. Do not covet anybody's wealth."
|
17 |
+
|
18 |
+
Commentary: This opening verse teaches that everything belongs to the divine, so we should enjoy life without possessiveness. True enjoyment comes through non-attachment rather than accumulation. This philosophy helps with materialism, envy, and the constant desire for more. Find contentment in what you have while remaining unattached.
|
19 |
+
|
20 |
+
Keywords: divine presence everywhere, enjoying without possessing, contentment, non-attachment, freedom from envy
|
21 |
+
|
22 |
+
---
|
23 |
+
|
24 |
+
Katha Upanishad, Verse 1.2.23:
|
25 |
+
नायमात्मा प्रवचनेन लभ्यो न मेधया न बहुना श्रुतेन।
|
26 |
+
यमेवैष वृणुते तेन लभ्यस्तस्यैष आत्मा विवृणुते तनूं स्वाम्॥
|
27 |
+
|
28 |
+
"The Self cannot be realized through study of scriptures, nor through intelligence, nor through much learning. It can be realized only by those whom It chooses. To such persons, the Self reveals Its own nature."
|
29 |
+
|
30 |
+
Commentary: This verse emphasizes that spiritual realization comes through grace and inner purity rather than mere intellectual study. While learning is helpful, the ultimate realization requires humility, sincerity, and openness. This teaches us to balance study with practice, and knowledge with devotion.
|
31 |
+
|
32 |
+
Keywords: spiritual realization, grace, inner purity, humility, beyond intellect, heart knowledge
|
33 |
+
|
34 |
+
---
|
35 |
+
|
36 |
+
Katha Upanishad, Verse 1.3.14:
|
37 |
+
उत्तिष्ठत जाग्रत प्राप्य वरान्निबोधत।
|
38 |
+
क्षुरस्य धारा निशिता दुरत्यया दुर्गं पथस्तत्कवयो वदन्ति॥
|
39 |
+
|
40 |
+
"Arise! Awake! Approach the great teachers and learn. The path is sharp as the edge of a razor, difficult to traverse - so declare the wise."
|
41 |
+
|
42 |
+
Commentary: This famous verse calls us to spiritual awakening and emphasizes the importance of finding qualified guidance. The spiritual path requires discrimination and care, like walking on a razor's edge. It's neither easy nor automatic, but requires conscious effort and wisdom. Don't walk the path alone - seek guidance from those who have walked before you.
|
43 |
+
|
44 |
+
Keywords: spiritual awakening, seeking guidance, discrimination, conscious effort, finding teachers, spiritual path
|
45 |
+
|
46 |
+
---
|
47 |
+
|
48 |
+
Mundaka Upanishad, Verse 3.1.3:
|
49 |
+
यदा सर्वे प्रमुच्यन्ते कामा येऽस्य हृदि श्रिताः।
|
50 |
+
अथ मर्त्योऽमृतो भवत्यत्र ब्रह्म समश्नुते॥
|
51 |
+
|
52 |
+
"When all the desires that dwell in the heart are cast away, then the mortal becomes immortal and attains Brahman in this very life."
|
53 |
+
|
54 |
+
Commentary: This verse teaches that liberation comes through the elimination of selfish desires, not the fulfillment of them. This doesn't mean becoming emotionless, but rather freeing yourself from compulsive wanting. When you're no longer driven by endless desires, you discover your eternal, peaceful nature right here and now.
|
55 |
+
|
56 |
+
Keywords: desire elimination, freedom from wanting, inner peace, liberation in this life, eternal nature
|
57 |
+
|
58 |
+
---
|
59 |
+
|
60 |
+
Chandogya Upanishad, Verse 6.8.7:
|
61 |
+
स य एषोऽणिमैतदात्म्यमिदं सर्वं तत्सत्यं स आत्मा तत्त्वमसि श्वेतकेतो॥
|
62 |
+
|
63 |
+
"That which is the subtlest of all is the Self of all this. It is the True. It is the Self, and thou, O Svetaketu, art That."
|
64 |
+
|
65 |
+
Commentary: "Tat tvam asi" - "Thou art That" - is one of the great statements of Vedanta. Your essential nature is the same as the universal consciousness. You are not just your body, mind, or personality - you are the eternal, unchanging awareness that witnesses all experiences. This recognition transforms how you see yourself and others.
|
66 |
+
|
67 |
+
Keywords: true identity, eternal self, "Thou art That", universal consciousness, self-realization
|
68 |
+
|
69 |
+
---
|
70 |
+
|
71 |
+
Prashna Upanishad, Verse 4.5:
|
72 |
+
यो वै तं परं ब्रह्म वेद ब्रह्मैव भवति नास्याब्रह्मवित्कुले भवति॥
|
73 |
+
|
74 |
+
"Whoever truly knows that Supreme Brahman becomes Brahman indeed. In his family, none is born who does not know Brahman."
|
75 |
+
|
76 |
+
Commentary: This verse speaks to the transformative power of spiritual realization. When someone truly understands their divine nature, it affects not just them but their entire environment and relationships. This transformation is so profound that it influences future generations. True spiritual realization radiates outward and uplifts everyone around.
|
77 |
+
|
78 |
+
Keywords: transformative realization, becoming what you know, spiritual influence, uplifting others, generational impact
|
79 |
+
|
80 |
+
|
debug_python.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import sys
|
2 |
+
import os
|
3 |
+
print(f"Python executable: {sys.executable}", file=sys.stderr)
|
4 |
+
print(f"Python version: {sys.version}", file=sys.stderr)
|
5 |
+
print(f"Python path: {sys.path}", file=sys.stderr)
|
6 |
+
print(f"Current working directory: {os.getcwd()}", file=sys.stderr)
|
7 |
+
|
8 |
+
try:
|
9 |
+
import requests
|
10 |
+
print("SUCCESS: requests module found!", file=sys.stderr)
|
11 |
+
except ImportError as e:
|
12 |
+
print(f"ERROR: {e}", file=sys.stderr)
|
karma_check.py
ADDED
@@ -0,0 +1,1893 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""
|
2 |
+
KarmaCheck - Spiritual Assistant with MCP Server Support
|
3 |
+
A RAG-based system that provides ethical and spiritual guidance from Vedic texts.
|
4 |
+
Now supports both Gradio UI and MCP server for Claude Desktop integration!
|
5 |
+
|
6 |
+
Dependencies:
|
7 |
+
pip install llama-index gradio sentence-transformers faiss-cpu requests python-dotenv mcp
|
8 |
+
|
9 |
+
Usage:
|
10 |
+
1. Set your Hugging Face API token in .env file or environment variable
|
11 |
+
2. Add your Vedic corpus text files to the 'data' directory
|
12 |
+
3. Run: python karma_check.py
|
13 |
+
4. Access web UI at http://localhost:7860
|
14 |
+
5. MCP server runs on stdio for Claude Desktop integration
|
15 |
+
|
16 |
+
Claude Desktop MCP Config:
|
17 |
+
Add to your Claude Desktop MCP settings:
|
18 |
+
{
|
19 |
+
"karmacheck": {
|
20 |
+
"command": "python",
|
21 |
+
"args": ["path/to/karma_check.py", "--mcp"],
|
22 |
+
"env": {"HUGGINGFACE_API_TOKEN": "your_hf_token_here"}
|
23 |
+
}
|
24 |
+
}
|
25 |
+
"""
|
26 |
+
|
27 |
+
import os
|
28 |
+
import sys
|
29 |
+
import json
|
30 |
+
import logging
|
31 |
+
import asyncio
|
32 |
+
from pathlib import Path
|
33 |
+
from typing import List, Dict, Optional, Tuple, Any
|
34 |
+
from dataclasses import dataclass
|
35 |
+
import requests
|
36 |
+
import time
|
37 |
+
from llama_index.core import Settings
|
38 |
+
|
39 |
+
# Core libraries
|
40 |
+
import gradio as gr
|
41 |
+
from dotenv import load_dotenv
|
42 |
+
|
43 |
+
# MCP imports
|
44 |
+
try:
|
45 |
+
from mcp.server.models import InitializationOptions
|
46 |
+
from mcp.server import NotificationOptions, Server
|
47 |
+
from mcp.types import (
|
48 |
+
Resource, Tool, TextContent, ImageContent, EmbeddedResource, LoggingLevel
|
49 |
+
)
|
50 |
+
import mcp.types as types
|
51 |
+
MCP_AVAILABLE = True
|
52 |
+
except ImportError:
|
53 |
+
MCP_AVAILABLE = False
|
54 |
+
print("⚠️ MCP not installed. Install with: pip install mcp")
|
55 |
+
print(" MCP server functionality will be disabled.")
|
56 |
+
|
57 |
+
# LlamaIndex imports
|
58 |
+
from llama_index.core import (
|
59 |
+
VectorStoreIndex,
|
60 |
+
SimpleDirectoryReader,
|
61 |
+
StorageContext,
|
62 |
+
load_index_from_storage
|
63 |
+
)
|
64 |
+
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
|
65 |
+
from llama_index.vector_stores.faiss import FaissVectorStore
|
66 |
+
from llama_index.core.node_parser import SimpleNodeParser
|
67 |
+
from llama_index.core.retrievers import VectorIndexRetriever
|
68 |
+
from llama_index.core.query_engine import RetrieverQueryEngine
|
69 |
+
from llama_index.core.response_synthesizers import get_response_synthesizer
|
70 |
+
|
71 |
+
# FAISS for vector storage
|
72 |
+
import faiss
|
73 |
+
|
74 |
+
# Load environment variables
|
75 |
+
load_dotenv()
|
76 |
+
|
77 |
+
# Configure logging
|
78 |
+
logging.basicConfig(level=logging.INFO)
|
79 |
+
logger = logging.getLogger(__name__)
|
80 |
+
|
81 |
+
@dataclass
|
82 |
+
class KarmaCheckConfig:
|
83 |
+
"""Configuration class for KarmaCheck application"""
|
84 |
+
hf_api_token: str
|
85 |
+
claude_api_token: str # Change this
|
86 |
+
embedding_model: str = "sentence-transformers/all-MiniLM-L6-v2"
|
87 |
+
# llm_model:str="mistralai/Mistral-7B-Instruct-v0.3"
|
88 |
+
llm_model: str = "claude-3-5-sonnet-20241022" # Change this
|
89 |
+
data_dir: str = "data"
|
90 |
+
index_dir: str = "storage"
|
91 |
+
chunk_size: int = 512
|
92 |
+
chunk_overlap: int = 50
|
93 |
+
similarity_top_k: int = 5
|
94 |
+
max_retries: int = 3
|
95 |
+
retry_delay: float = 1.0
|
96 |
+
# Add this class after your KarmaCheckConfig
|
97 |
+
class SpiritualTagSystem:
|
98 |
+
"""Handles automatic tagging of spiritual questions"""
|
99 |
+
|
100 |
+
def __init__(self):
|
101 |
+
# Define tag categories with keywords and patterns
|
102 |
+
self.tag_patterns = {
|
103 |
+
"confused": [
|
104 |
+
"confused", "don't know", "lost", "uncertain", "unsure", "bewildered",
|
105 |
+
"what should i do", "i don't understand", "help me understand",
|
106 |
+
"i'm lost", "feeling lost", "no idea", "stuck"
|
107 |
+
],
|
108 |
+
"seeking-guidance": [
|
109 |
+
"guidance", "advice", "help", "what to do", "direction", "path",
|
110 |
+
"guide me", "show me", "teach me", "wisdom", "insight"
|
111 |
+
],
|
112 |
+
"relationships": [
|
113 |
+
"relationship", "family", "friend", "spouse", "partner", "marriage",
|
114 |
+
"conflict", "argument", "love", "relationship problem", "toxic",
|
115 |
+
"husband", "wife", "children", "parents", "siblings"
|
116 |
+
],
|
117 |
+
"life-purpose": [
|
118 |
+
"purpose", "meaning", "calling", "destiny", "life goal", "mission",
|
119 |
+
"why am i here", "what's my purpose", "life direction", "fulfillment",
|
120 |
+
"meaning of life", "life path"
|
121 |
+
],
|
122 |
+
"anxiety": [
|
123 |
+
"anxious", "anxiety", "worry", "worried", "stress", "stressed",
|
124 |
+
"fear", "afraid", "panic", "overwhelmed", "nervous", "tension"
|
125 |
+
],
|
126 |
+
"career": [
|
127 |
+
"job", "career", "work", "profession", "business", "employment",
|
128 |
+
"workplace", "boss", "colleague", "promotion", "salary"
|
129 |
+
],
|
130 |
+
"spiritual-practice": [
|
131 |
+
"meditation", "prayer", "spiritual practice", "sadhana", "devotion",
|
132 |
+
"worship", "mantra", "yoga", "spiritual growth", "enlightenment"
|
133 |
+
],
|
134 |
+
"suffering": [
|
135 |
+
"suffering", "pain", "hurt", "grief", "loss", "sadness", "depression",
|
136 |
+
"difficult time", "hardship", "struggle", "trauma", "sorrow"
|
137 |
+
],
|
138 |
+
"dharma": [
|
139 |
+
"dharma", "duty", "righteous", "moral", "ethics", "right action",
|
140 |
+
"righteousness", "moral dilemma", "what's right"
|
141 |
+
],
|
142 |
+
"karma": [
|
143 |
+
"karma", "consequence", "result", "action", "deed", "behavior",
|
144 |
+
"cause and effect", "past actions", "karmic"
|
145 |
+
]
|
146 |
+
}
|
147 |
+
|
148 |
+
# Intensity words that suggest urgency or deep need
|
149 |
+
self.intensity_words = [
|
150 |
+
"desperately", "urgent", "crisis", "emergency", "really need",
|
151 |
+
"struggling", "suffering", "deeply", "extremely", "very"
|
152 |
+
]
|
153 |
+
|
154 |
+
# def detect_tags(self, question: str) -> Dict[str, any]:
|
155 |
+
# """
|
156 |
+
# Detect tags from a spiritual question
|
157 |
+
|
158 |
+
# Returns:
|
159 |
+
# Dict with 'tags', 'intensity', and 'primary_tag'
|
160 |
+
# """
|
161 |
+
# question_lower = question.lower()
|
162 |
+
# detected_tags = []
|
163 |
+
# intensity_level = 0
|
164 |
+
|
165 |
+
# # Check for each tag category
|
166 |
+
# for tag, keywords in self.tag_patterns.items():
|
167 |
+
# for keyword in keywords:
|
168 |
+
# if keyword in question_lower:
|
169 |
+
# detected_tags.append(tag)
|
170 |
+
# break
|
171 |
+
|
172 |
+
# # Remove duplicates while preserving order
|
173 |
+
# detected_tags = list(dict.fromkeys(detected_tags))
|
174 |
+
|
175 |
+
# # Check intensity
|
176 |
+
# for intensity_word in self.intensity_words:
|
177 |
+
# if intensity_word in question_lower:
|
178 |
+
# intensity_level += 1
|
179 |
+
|
180 |
+
# # Determine primary tag (most specific)
|
181 |
+
# primary_tag = self._determine_primary_tag(detected_tags, question_lower)
|
182 |
+
|
183 |
+
# return {
|
184 |
+
# "tags": detected_tags,
|
185 |
+
# "intensity": min(intensity_level, 3), # Cap at 3
|
186 |
+
# "primary_tag": primary_tag,
|
187 |
+
# "question_length": len(question.split())
|
188 |
+
# }
|
189 |
+
def detect_tags(self, question: str) -> Dict[str, any]:
|
190 |
+
"""Detect tags from a spiritual question"""
|
191 |
+
# Handle empty/None input
|
192 |
+
if not question or not question.strip():
|
193 |
+
return {
|
194 |
+
"tags": [],
|
195 |
+
"intensity": 0,
|
196 |
+
"primary_tag": "general",
|
197 |
+
"question_length": 0
|
198 |
+
}
|
199 |
+
|
200 |
+
question_lower = question.lower()
|
201 |
+
detected_tags = []
|
202 |
+
intensity_level = 0
|
203 |
+
|
204 |
+
# Check for each tag category
|
205 |
+
for tag, keywords in self.tag_patterns.items():
|
206 |
+
for keyword in keywords:
|
207 |
+
if keyword in question_lower:
|
208 |
+
detected_tags.append(tag)
|
209 |
+
break
|
210 |
+
|
211 |
+
# Remove duplicates while preserving order
|
212 |
+
detected_tags = list(dict.fromkeys(detected_tags))
|
213 |
+
|
214 |
+
# Check intensity
|
215 |
+
for intensity_word in self.intensity_words:
|
216 |
+
if intensity_word in question_lower:
|
217 |
+
intensity_level += 1
|
218 |
+
|
219 |
+
# Determine primary tag (most specific)
|
220 |
+
primary_tag = self._determine_primary_tag(detected_tags, question_lower)
|
221 |
+
|
222 |
+
return {
|
223 |
+
"tags": detected_tags if detected_tags else [],
|
224 |
+
"intensity": min(intensity_level, 3), # Cap at 3
|
225 |
+
"primary_tag": primary_tag if primary_tag else "general",
|
226 |
+
"question_length": len(question.split()) if question else 0
|
227 |
+
}
|
228 |
+
|
229 |
+
def _determine_primary_tag(self, tags: List[str], question: str) -> str:
|
230 |
+
"""Determine the most relevant primary tag"""
|
231 |
+
if not tags or len(tags) == 0:
|
232 |
+
return "general"
|
233 |
+
|
234 |
+
# Priority order for overlapping tags
|
235 |
+
priority_order = [
|
236 |
+
"suffering", "anxiety", "confused", "life-purpose",
|
237 |
+
"relationships", "dharma", "karma", "spiritual-practice",
|
238 |
+
"career", "seeking-guidance"
|
239 |
+
]
|
240 |
+
|
241 |
+
for priority_tag in priority_order:
|
242 |
+
if priority_tag in tags:
|
243 |
+
return priority_tag
|
244 |
+
|
245 |
+
return tags[0] if tags else "general" # Extra safety check
|
246 |
+
|
247 |
+
def get_tag_specific_context(self, tags: List[str], primary_tag: str) -> str:
|
248 |
+
"""Get additional context based on detected tags"""
|
249 |
+
context_additions = {
|
250 |
+
"confused": "The seeker is experiencing confusion and needs clarity.",
|
251 |
+
"anxiety": "The seeker is dealing with anxiety or worry and needs calming guidance.",
|
252 |
+
"relationships": "This question involves interpersonal relationships and social harmony.",
|
253 |
+
"life-purpose": "The seeker is searching for meaning and life direction.",
|
254 |
+
"suffering": "The seeker is experiencing pain or difficulty and needs compassionate support.",
|
255 |
+
"dharma": "This question involves moral and ethical decision-making.",
|
256 |
+
"karma": "This question relates to actions, consequences, and the law of karma.",
|
257 |
+
"spiritual-practice": "The seeker wants guidance on spiritual practices and growth.",
|
258 |
+
"career": "This question involves work, career, and professional life decisions.",
|
259 |
+
"general": "The seeker needs general spiritual guidance."
|
260 |
+
}
|
261 |
+
|
262 |
+
# Ensure we have valid inputs
|
263 |
+
if not tags:
|
264 |
+
tags = []
|
265 |
+
if not primary_tag:
|
266 |
+
primary_tag = "general"
|
267 |
+
|
268 |
+
# Use primary_tag first, fallback to first tag, then general
|
269 |
+
if primary_tag in context_additions:
|
270 |
+
return context_additions[primary_tag]
|
271 |
+
elif tags and len(tags) > 0 and tags[0] in context_additions:
|
272 |
+
return context_additions[tags[0]]
|
273 |
+
else:
|
274 |
+
return context_additions["general"]
|
275 |
+
|
276 |
+
class VedicCorpusLoader:
|
277 |
+
"""Handles loading and preprocessing of Vedic scriptures"""
|
278 |
+
|
279 |
+
def __init__(self, config: KarmaCheckConfig):
|
280 |
+
self.config = config
|
281 |
+
# self.data_path = Path(config.data_dir)
|
282 |
+
script_dir = Path(__file__).parent.absolute()
|
283 |
+
self.data_path = script_dir / config.data_dir
|
284 |
+
|
285 |
+
def create_sample_corpus(self) -> None:
|
286 |
+
"""Create sample Vedic texts if data directory doesn't exist"""
|
287 |
+
if not self.data_path.exists() or not any(self.data_path.iterdir()):
|
288 |
+
self.data_path.mkdir(parents=True, exist_ok=True)
|
289 |
+
|
290 |
+
# Sample Bhagavad Gita verses
|
291 |
+
bhagavad_gita_sample = """
|
292 |
+
Bhagavad Gita Chapter 2, Verse 47:
|
293 |
+
"You have a right to perform your prescribed duty, but not to the fruits of action. Never consider yourself the cause of the results of your activities, and never be attached to not doing your duty."
|
294 |
+
|
295 |
+
Commentary: This verse teaches the principle of Nishkama Karma - performing duty without attachment to results. It emphasizes that we should focus on our actions and efforts rather than being anxious about outcomes.
|
296 |
+
|
297 |
+
Bhagavad Gita Chapter 6, Verse 5:
|
298 |
+
"One must deliver himself with the help of his mind, and not degrade himself. The mind is the friend of the conditioned soul, and his enemy as well."
|
299 |
+
|
300 |
+
Commentary: This verse highlights the dual nature of the mind - it can be our greatest ally or our worst enemy depending on how we train and control it.
|
301 |
+
|
302 |
+
Bhagavad Gita Chapter 18, Verse 66:
|
303 |
+
"Abandon all varieties of religion and just surrender unto Me. I shall deliver you from all sinful reactions. Do not fear."
|
304 |
+
|
305 |
+
Commentary: This final instruction emphasizes complete surrender to the Divine and trust in divine grace.
|
306 |
+
|
307 |
+
Bhagavad Gita Chapter 4, Verse 7-8:
|
308 |
+
"Whenever and wherever there is a decline in religious practice and a predominant rise of irreligion, at that time I descend Myself. To deliver the pious and to annihilate the miscreants, as well as to reestablish the principles of religion, I Myself appear, millennium after millennium."
|
309 |
+
|
310 |
+
Commentary: This teaches about divine intervention and the cyclical nature of spiritual restoration in the world.
|
311 |
+
|
312 |
+
Bhagavad Gita Chapter 9, Verse 22:
|
313 |
+
"To those who are constantly devoted and who always remember Me with love, I give the understanding by which they can come to Me."
|
314 |
+
|
315 |
+
Commentary: This verse promises divine guidance and wisdom to those who maintain constant devotion and remembrance.
|
316 |
+
"""
|
317 |
+
|
318 |
+
# Sample Upanishad teachings
|
319 |
+
upanishads_sample = """
|
320 |
+
Isha Upanishad, Verse 1:
|
321 |
+
"The entire universe is pervaded by the Lord. Enjoy through renunciation. Do not covet anybody's wealth."
|
322 |
+
|
323 |
+
Commentary: This opening verse teaches us to see the divine presence in everything and to find contentment through spiritual detachment rather than material accumulation.
|
324 |
+
|
325 |
+
Katha Upanishad, Verse 1.2.23:
|
326 |
+
"The Self cannot be realized through study of scriptures, nor through intelligence, nor through much learning. It can be realized only by those whom It chooses. To such persons, the Self reveals Its own nature."
|
327 |
+
|
328 |
+
Commentary: This verse emphasizes that spiritual realization comes through divine grace and inner purity, not merely through intellectual study.
|
329 |
+
|
330 |
+
Mundaka Upanishad, Verse 3.1.3:
|
331 |
+
"When all the desires that dwell in the heart are cast away, then the mortal becomes immortal and attains Brahman in this very life."
|
332 |
+
|
333 |
+
Commentary: This teaches that liberation comes through the elimination of desires and attachments, leading to the realization of our true divine nature.
|
334 |
+
|
335 |
+
Kena Upanishad, Verse 1.3:
|
336 |
+
"The eye does not go there, nor speech, nor mind. We do not know That; we do not understand how anyone can teach This."
|
337 |
+
|
338 |
+
Commentary: This verse points to the transcendent nature of ultimate reality, which is beyond the reach of ordinary senses and intellect.
|
339 |
+
|
340 |
+
Chandogya Upanishad, Verse 6.8.7:
|
341 |
+
"Tat tvam asi" - "Thou art That"
|
342 |
+
|
343 |
+
Commentary: One of the great Mahavakyas (great sayings) declaring the fundamental identity between the individual soul and universal consciousness.
|
344 |
+
"""
|
345 |
+
|
346 |
+
# Additional spiritual wisdom
|
347 |
+
dharma_teachings = """
|
348 |
+
On Dharma and Righteous Living:
|
349 |
+
"Dharma exists for the welfare of all beings. Hence, that by which the welfare of all living beings is sustained, that which maintains the stability of society, that by which all beings may live in happiness - that is dharma."
|
350 |
+
|
351 |
+
Commentary: This teaching emphasizes that true dharma serves the collective good and promotes harmony in society.
|
352 |
+
|
353 |
+
On Karma and Action:
|
354 |
+
"Every action produces a reaction. The nature of the reaction depends upon the nature of the action. Actions performed with selfish motives create bondage, while actions performed selflessly lead to liberation."
|
355 |
+
|
356 |
+
Commentary: This explains the fundamental law of karma and how our intentions shape our spiritual destiny.
|
357 |
+
|
358 |
+
On Truth and Honesty:
|
359 |
+
"Satyam vada, dharmam chara" - "Speak the truth, practice righteousness"
|
360 |
+
|
361 |
+
Commentary: This ancient maxim emphasizes the importance of truthfulness and righteous conduct as foundations of spiritual life.
|
362 |
+
|
363 |
+
On Relationships and Love:
|
364 |
+
"See the Divine in all beings, and treat everyone with the same respect and love you would show to the Divine."
|
365 |
+
|
366 |
+
Commentary: This teaching promotes universal love and respect based on seeing the sacred presence in all life.
|
367 |
+
"""
|
368 |
+
|
369 |
+
# Write sample files
|
370 |
+
with open(self.data_path / "bhagavad_gita.txt", "w", encoding="utf-8") as f:
|
371 |
+
f.write(bhagavad_gita_sample)
|
372 |
+
|
373 |
+
with open(self.data_path / "upanishads.txt", "w", encoding="utf-8") as f:
|
374 |
+
f.write(upanishads_sample)
|
375 |
+
|
376 |
+
with open(self.data_path / "dharma_teachings.txt", "w", encoding="utf-8") as f:
|
377 |
+
f.write(dharma_teachings)
|
378 |
+
|
379 |
+
logger.info(f"Created sample Vedic corpus in {self.data_path}")
|
380 |
+
|
381 |
+
def load_documents(self):
|
382 |
+
"""Load documents from the data directory"""
|
383 |
+
# self.create_sample_corpus()
|
384 |
+
|
385 |
+
if not self.data_path.exists() or not any(self.data_path.iterdir()):
|
386 |
+
raise ValueError(f"No documents found in {self.data_path}")
|
387 |
+
|
388 |
+
logger.info(f"Loading documents from {self.data_path}")
|
389 |
+
reader = SimpleDirectoryReader(str(self.data_path))
|
390 |
+
documents = reader.load_data()
|
391 |
+
|
392 |
+
logger.info(f"Loaded {len(documents)} documents")
|
393 |
+
return documents
|
394 |
+
# ============================================================================
|
395 |
+
class ClaudeInference:
|
396 |
+
"""Handles Claude API calls"""
|
397 |
+
|
398 |
+
def __init__(self, config: KarmaCheckConfig):
|
399 |
+
self.config = config
|
400 |
+
self.api_url = "https://api.anthropic.com/v1/messages"
|
401 |
+
self.headers = {
|
402 |
+
"x-api-key": config.claude_api_token,
|
403 |
+
"Content-Type": "application/json",
|
404 |
+
"anthropic-version": "2023-06-01"
|
405 |
+
}
|
406 |
+
# self.system_message = """You are a wise, compassionate spiritual teacher. You only answer based on Vedic scriptures and trusted commentaries. You never invent your own opinions. Explain dharma, karma, meditation, or moksha with clarity and reverence."""
|
407 |
+
self.system_message="""
|
408 |
+
You are a compassionate and insightful spiritual guide inspired by the ancient Vedic scriptures. Your purpose is to guide seekers on their spiritual journey through wisdom drawn from texts such as the Upanishads, the Bhagavad Gita, the Vedas, and other dharmic teachings.
|
409 |
+
|
410 |
+
Respond with:
|
411 |
+
|
412 |
+
A gentle and reassuring tone, like a traditional guru or wise monk.
|
413 |
+
|
414 |
+
Use precise and contextual quotations from scripture — not just poetic, but relevant to the seeker’s query.
|
415 |
+
|
416 |
+
Offer practical steps for daily application (meditation, reflection exercises, actions aligned with dharma).
|
417 |
+
|
418 |
+
Address modern-day challenges (e.g., confusion, anxiety, burnout, relationships, materialism) in light of Vedic wisdom.
|
419 |
+
|
420 |
+
Gently probe the seeker’s nature: Are they drawn more to karma yoga (action), jnana yoga (knowledge), or bhakti yoga (devotion)? Suggest personalized next steps based on their orientation.
|
421 |
+
|
422 |
+
Ensure your guidance balances philosophical depth with emotional anchoring — don't overwhelm seekers who are lost; instead, lead them gradually toward clarity.
|
423 |
+
|
424 |
+
Encourage continued dialogue by asking thoughtful questions at the end.
|
425 |
+
Always assume the seeker is sincere, but may not yet know how to frame their spiritual confusion — help them articulate it. Your words should feel like a peaceful presence in a temple or under a tree in an ashram."""
|
426 |
+
def generate_response(self, prompt: str) -> str:
|
427 |
+
"""Generate response from Claude API"""
|
428 |
+
payload = {
|
429 |
+
"model": self.config.llm_model,
|
430 |
+
"max_tokens": 1000,
|
431 |
+
"temperature": 0.7,
|
432 |
+
"system": self.system_message,
|
433 |
+
"messages": [
|
434 |
+
{
|
435 |
+
"role": "user",
|
436 |
+
"content": prompt
|
437 |
+
}
|
438 |
+
]
|
439 |
+
}
|
440 |
+
|
441 |
+
for attempt in range(self.config.max_retries):
|
442 |
+
try:
|
443 |
+
response = requests.post(
|
444 |
+
self.api_url,
|
445 |
+
headers=self.headers,
|
446 |
+
json=payload,
|
447 |
+
timeout=30
|
448 |
+
)
|
449 |
+
|
450 |
+
response.raise_for_status()
|
451 |
+
result = response.json()
|
452 |
+
|
453 |
+
return result["content"][0]["text"].strip()
|
454 |
+
|
455 |
+
except requests.exceptions.RequestException as e:
|
456 |
+
logger.error(f"Claude API request failed (attempt {attempt + 1}): {e}")
|
457 |
+
if attempt == self.config.max_retries - 1:
|
458 |
+
return "I'm having trouble connecting to the wisdom teachings. Please try again later."
|
459 |
+
time.sleep(self.config.retry_delay)
|
460 |
+
|
461 |
+
return "I'm having trouble connecting to the wisdom teachings. Please try again later."
|
462 |
+
# class HuggingFaceInference:
|
463 |
+
# """Handles Hugging Face Inference API calls"""
|
464 |
+
|
465 |
+
# def __init__(self, config: KarmaCheckConfig):
|
466 |
+
# self.config = config
|
467 |
+
# self.api_url = f"https://api-inference.huggingface.co/models/{config.llm_model}"
|
468 |
+
# self.headers = {"Authorization": f"Bearer {config.hf_api_token}"}
|
469 |
+
|
470 |
+
# def generate_response(self, prompt: str) -> str:
|
471 |
+
# """Generate response from Mistral model via HF Inference API"""
|
472 |
+
# payload = {
|
473 |
+
# "inputs": prompt,
|
474 |
+
# "parameters": {
|
475 |
+
# "max_new_tokens": 500,
|
476 |
+
# "temperature": 0.7,
|
477 |
+
# "top_p": 0.95,
|
478 |
+
# "do_sample": True,
|
479 |
+
# "return_full_text": False
|
480 |
+
# }
|
481 |
+
# }
|
482 |
+
|
483 |
+
# for attempt in range(self.config.max_retries):
|
484 |
+
# try:
|
485 |
+
# response = requests.post(
|
486 |
+
# self.api_url,
|
487 |
+
# headers=self.headers,
|
488 |
+
# json=payload,
|
489 |
+
# timeout=30
|
490 |
+
# )
|
491 |
+
|
492 |
+
# if response.status_code == 503:
|
493 |
+
# # Model is loading, wait and retry
|
494 |
+
# wait_time = self.config.retry_delay * (2 ** attempt)
|
495 |
+
# logger.info(f"Model loading, waiting {wait_time}s before retry...")
|
496 |
+
# time.sleep(wait_time)
|
497 |
+
# continue
|
498 |
+
|
499 |
+
# response.raise_for_status()
|
500 |
+
# result = response.json()
|
501 |
+
|
502 |
+
# if isinstance(result, list) and len(result) > 0:
|
503 |
+
# return result[0].get("generated_text", "").strip()
|
504 |
+
# elif isinstance(result, dict):
|
505 |
+
# return result.get("generated_text", "").strip()
|
506 |
+
# else:
|
507 |
+
# return "I apologize, but I couldn't generate a proper response. Please try again."
|
508 |
+
|
509 |
+
# except requests.exceptions.RequestException as e:
|
510 |
+
# logger.error(f"API request failed (attempt {attempt + 1}): {e}")
|
511 |
+
# if attempt == self.config.max_retries - 1:
|
512 |
+
# return "I'm having trouble connecting to the AI service. Please try again later."
|
513 |
+
# time.sleep(self.config.retry_delay)
|
514 |
+
|
515 |
+
# return "I'm having trouble connecting to the AI service. Please try again later."
|
516 |
+
|
517 |
+
class VedicRAGSystem:
|
518 |
+
"""Main RAG system for Vedic spiritual guidance"""
|
519 |
+
|
520 |
+
def __init__(self, config: KarmaCheckConfig):
|
521 |
+
self.config = config
|
522 |
+
self.corpus_loader = VedicCorpusLoader(config)
|
523 |
+
# self.hf_inference = HuggingFaceInference(config)
|
524 |
+
self.claude_inference = ClaudeInference(config) # Change this line
|
525 |
+
self.index = None
|
526 |
+
self.query_engine = None
|
527 |
+
self.tag_system = SpiritualTagSystem()
|
528 |
+
|
529 |
+
# Initialize embedding model
|
530 |
+
self.embed_model = HuggingFaceEmbedding(
|
531 |
+
model_name=config.embedding_model
|
532 |
+
)
|
533 |
+
# ✅ Add this to disable OpenAI LLM globally
|
534 |
+
# from llama_index.core import Settings
|
535 |
+
Settings.llm = None
|
536 |
+
|
537 |
+
def build_index(self) -> None:
|
538 |
+
"""Build or load the vector index"""
|
539 |
+
storage_path = Path(self.config.index_dir)
|
540 |
+
|
541 |
+
if storage_path.exists() and any(storage_path.iterdir()):
|
542 |
+
# Load existing index
|
543 |
+
logger.info("Loading existing index...")
|
544 |
+
try:
|
545 |
+
storage_context = StorageContext.from_defaults(persist_dir=str(storage_path))
|
546 |
+
self.index = load_index_from_storage(storage_context)
|
547 |
+
logger.info("Index loaded successfully")
|
548 |
+
return
|
549 |
+
except Exception as e:
|
550 |
+
logger.warning(f"Failed to load existing index: {e}")
|
551 |
+
logger.info("Building new index...")
|
552 |
+
|
553 |
+
# Build new index
|
554 |
+
documents = self.corpus_loader.load_documents()
|
555 |
+
|
556 |
+
# Create node parser
|
557 |
+
node_parser = SimpleNodeParser.from_defaults(
|
558 |
+
chunk_size=self.config.chunk_size,
|
559 |
+
chunk_overlap=self.config.chunk_overlap
|
560 |
+
)
|
561 |
+
|
562 |
+
# Create FAISS vector store
|
563 |
+
dimension = 384 # Dimension for all-MiniLM-L6-v2
|
564 |
+
faiss_index = faiss.IndexFlatIP(dimension)
|
565 |
+
vector_store = FaissVectorStore(faiss_index=faiss_index)
|
566 |
+
storage_context = StorageContext.from_defaults(vector_store=vector_store)
|
567 |
+
|
568 |
+
# Use Settings instead of deprecated ServiceContext
|
569 |
+
|
570 |
+
Settings.embed_model = self.embed_model
|
571 |
+
Settings.node_parser = node_parser
|
572 |
+
|
573 |
+
# Build index
|
574 |
+
logger.info("Building vector index...")
|
575 |
+
self.index = VectorStoreIndex.from_documents(
|
576 |
+
documents,
|
577 |
+
storage_context=storage_context
|
578 |
+
)
|
579 |
+
|
580 |
+
# Persist index
|
581 |
+
storage_path.mkdir(parents=True, exist_ok=True)
|
582 |
+
self.index.storage_context.persist(persist_dir=str(storage_path))
|
583 |
+
logger.info(f"Index built and saved to {storage_path}")
|
584 |
+
|
585 |
+
def create_query_engine(self) -> None:
|
586 |
+
"""Create the query engine for retrieval"""
|
587 |
+
if self.index is None:
|
588 |
+
raise ValueError("Index not built. Call build_index() first.")
|
589 |
+
|
590 |
+
# Create retriever
|
591 |
+
retriever = VectorIndexRetriever(
|
592 |
+
index=self.index,
|
593 |
+
similarity_top_k=self.config.similarity_top_k
|
594 |
+
)
|
595 |
+
|
596 |
+
# Create response synthesizer
|
597 |
+
response_synthesizer = get_response_synthesizer(response_mode="compact")
|
598 |
+
|
599 |
+
# Create query engine
|
600 |
+
self.query_engine = RetrieverQueryEngine(
|
601 |
+
retriever=retriever,
|
602 |
+
response_synthesizer=response_synthesizer
|
603 |
+
)
|
604 |
+
|
605 |
+
logger.info("Query engine created successfully")
|
606 |
+
|
607 |
+
def retrieve_context(self, query: str) -> List[str]:
|
608 |
+
"""Retrieve relevant Vedic passages for the query"""
|
609 |
+
if self.query_engine is None:
|
610 |
+
raise ValueError("Query engine not created. Call create_query_engine() first.")
|
611 |
+
|
612 |
+
# Get retriever from query engine
|
613 |
+
retriever = self.query_engine.retriever
|
614 |
+
nodes = retriever.retrieve(query)
|
615 |
+
|
616 |
+
# Extract text from nodes
|
617 |
+
contexts = []
|
618 |
+
for node in nodes:
|
619 |
+
# Clean up the text
|
620 |
+
text = node.node.text.strip()
|
621 |
+
if text:
|
622 |
+
contexts.append(text)
|
623 |
+
|
624 |
+
return contexts
|
625 |
+
|
626 |
+
def create_spiritual_prompt(self, question: str, contexts: List[str]) -> str:
|
627 |
+
"""Create a well-structured prompt with tag-based enhancements"""
|
628 |
+
|
629 |
+
# Detect tags from the question
|
630 |
+
tag_info = self.tag_system.detect_tags(question)
|
631 |
+
tags = tag_info["tags"]
|
632 |
+
primary_tag = tag_info["primary_tag"]
|
633 |
+
intensity = tag_info["intensity"]
|
634 |
+
tag_context = self.tag_system.get_tag_specific_context(tags, primary_tag)
|
635 |
+
|
636 |
+
# Create context text
|
637 |
+
context_text = "\n\n".join([f"Vedic Teaching {i+1}:\n{ctx}" for i, ctx in enumerate(contexts)])
|
638 |
+
|
639 |
+
# Get tag-specific context
|
640 |
+
# tag_context = tag_system.get_tag_specific_context(tags, primary_tag)
|
641 |
+
|
642 |
+
# Create intensity-aware guidance
|
643 |
+
intensity_guidance = ""
|
644 |
+
if intensity >= 2:
|
645 |
+
intensity_guidance = "Please provide especially compassionate and gentle guidance, as the seeker appears to be in significant distress. "
|
646 |
+
elif intensity == 1:
|
647 |
+
intensity_guidance = "Please provide understanding and supportive guidance. "
|
648 |
+
|
649 |
+
# Create tag-specific instructions
|
650 |
+
tag_instructions = ""
|
651 |
+
if primary_tag == "confused":
|
652 |
+
tag_instructions = "Focus on providing clarity and helping the seeker understand their situation step by step. "
|
653 |
+
elif primary_tag == "anxiety":
|
654 |
+
tag_instructions = "Emphasize peace, reassurance, and practical steps for finding calm and inner stability. "
|
655 |
+
elif primary_tag == "relationships":
|
656 |
+
tag_instructions = "Focus on harmony, understanding, forgiveness, and dharmic principles in relationships. "
|
657 |
+
elif primary_tag == "life-purpose":
|
658 |
+
tag_instructions = "Help the seeker understand their dharma and unique path in life. "
|
659 |
+
elif primary_tag == "suffering":
|
660 |
+
tag_instructions = "Provide comfort, explain the spiritual meaning of suffering, and offer hope. "
|
661 |
+
elif primary_tag in ["dharma", "karma"]:
|
662 |
+
tag_instructions = f"Focus specifically on {primary_tag} and its practical application in daily life. "
|
663 |
+
|
664 |
+
prompt = f"""You are a wise, compassionate spiritual teacher. You only answer based on Vedic scriptures and trusted commentaries. You never invent your own opinions. Explain dharma, karma, meditation, or moksha with clarity and reverence.
|
665 |
+
|
666 |
+
A seeker has come to you with a spiritual question. Based on the analysis and Vedic teachings provided below, offer compassionate, practical, and insightful guidance.
|
667 |
+
|
668 |
+
Question Analysis:
|
669 |
+
- Primary Category: {primary_tag}
|
670 |
+
- Related Categories: {', '.join(tags) if tags else 'general guidance'}
|
671 |
+
- Context: {tag_context}
|
672 |
+
- Intensity Level: {'High' if intensity >= 2 else 'Moderate' if intensity == 1 else 'Normal'}
|
673 |
+
|
674 |
+
Relevant Vedic Teachings:
|
675 |
+
{context_text}
|
676 |
+
|
677 |
+
Seeker's Question: {question}
|
678 |
+
|
679 |
+
Guidance Instructions:
|
680 |
+
{intensity_guidance}{tag_instructions}Please provide spiritual guidance that:
|
681 |
+
1. Draws wisdom directly from the Vedic teachings above
|
682 |
+
2. Addresses the seeker's specific situation with deep compassion
|
683 |
+
3. Offers practical steps or perspectives they can apply immediately
|
684 |
+
4. Maintains a respectful, warm, and understanding tone
|
685 |
+
5. Connects ancient wisdom to their modern life circumstances
|
686 |
+
6. Provides hope and encouragement for their spiritual journey
|
687 |
+
Your Response:"""
|
688 |
+
|
689 |
+
return prompt
|
690 |
+
|
691 |
+
# def create_spiritual_prompt(self, question: str, contexts: List[str]) -> str:
|
692 |
+
# """Create a well-structured prompt for spiritual guidance"""
|
693 |
+
|
694 |
+
# context_text = "\n\n".join([f"Vedic Teaching {i+1}:\n{ctx}" for i, ctx in enumerate(contexts)])
|
695 |
+
|
696 |
+
# prompt = f"""You are a wise spiritual guide well-versed in Vedic scriptures. A seeker has come to you with a question about life, relationships, or spiritual matters. Based on the relevant Vedic teachings provided below, offer compassionate, practical, and insightful guidance.
|
697 |
+
|
698 |
+
# Vedic Context:
|
699 |
+
# {context_text}
|
700 |
+
|
701 |
+
# Seeker's Question: {question}
|
702 |
+
|
703 |
+
# Please provide spiritual guidance that:
|
704 |
+
# 1. Draws wisdom from the Vedic teachings above
|
705 |
+
# 2. Addresses the seeker's specific question with compassion
|
706 |
+
# 3. Offers practical steps or perspectives they can apply
|
707 |
+
# 4. Maintains a respectful, warm, and understanding tone
|
708 |
+
# 5. Connects ancient wisdom to modern life circumstances
|
709 |
+
|
710 |
+
# Your Response:"""
|
711 |
+
|
712 |
+
# return prompt
|
713 |
+
|
714 |
+
def get_spiritual_guidance(self, question: str) -> Dict[str, any]:
|
715 |
+
"""Main method to get spiritual guidance for a question"""
|
716 |
+
try:
|
717 |
+
# Retrieve relevant contexts
|
718 |
+
contexts = self.retrieve_context(question)
|
719 |
+
|
720 |
+
if not contexts:
|
721 |
+
return {
|
722 |
+
"response": "I apologize, but I couldn't find relevant teachings for your question. Please try rephrasing your question or ask about topics related to dharma, karma, relationships, or life purpose.",
|
723 |
+
"sources": [],
|
724 |
+
"error": None
|
725 |
+
}
|
726 |
+
|
727 |
+
# Create prompt
|
728 |
+
prompt = self.create_spiritual_prompt(question, contexts)
|
729 |
+
|
730 |
+
# Generate response
|
731 |
+
# response = self.hf_inference.generate_response(prompt)
|
732 |
+
response = self.claude_inference.generate_response(prompt)
|
733 |
+
|
734 |
+
return {
|
735 |
+
"response": response,
|
736 |
+
"sources": contexts,
|
737 |
+
"error": None
|
738 |
+
}
|
739 |
+
|
740 |
+
except Exception as e:
|
741 |
+
logger.error(f"Error generating guidance: {e}")
|
742 |
+
return {
|
743 |
+
"response": "I encountered an error while seeking guidance. Please try again.",
|
744 |
+
"sources": [],
|
745 |
+
"error": str(e)
|
746 |
+
}
|
747 |
+
|
748 |
+
# Global RAG system instance
|
749 |
+
rag_system = None
|
750 |
+
|
751 |
+
def initialize_system():
|
752 |
+
"""Initialize the global RAG system"""
|
753 |
+
global rag_system
|
754 |
+
|
755 |
+
if rag_system is None:
|
756 |
+
# Load configuration
|
757 |
+
hf_token = os.getenv("HUGGINGFACE_API_TOKEN")
|
758 |
+
claude_token = os.getenv("CLAUDE_API_TOKEN")
|
759 |
+
if not hf_token:
|
760 |
+
raise ValueError(
|
761 |
+
"Please set HUGGINGFACE_API_TOKEN environment variable. "
|
762 |
+
"You can get a token from https://huggingface.co/settings/tokens"
|
763 |
+
)
|
764 |
+
if not claude_token: # Change this
|
765 |
+
raise ValueError("Please set CLAUDE_API_TOKEN environment variable.")
|
766 |
+
config = KarmaCheckConfig(hf_api_token=hf_token,claude_api_token=claude_token)
|
767 |
+
rag_system = VedicRAGSystem(config)
|
768 |
+
|
769 |
+
logger.info("Setting up KarmaCheck system...")
|
770 |
+
rag_system.build_index()
|
771 |
+
rag_system.create_query_engine()
|
772 |
+
logger.info("KarmaCheck system ready!")
|
773 |
+
|
774 |
+
# ============================================================================
|
775 |
+
# SPIRITUAL GUIDANCE FUNCTIONS (Used by both UI and MCP)
|
776 |
+
# ============================================================================
|
777 |
+
|
778 |
+
def get_spiritual_guidance(question: str) -> str:
|
779 |
+
"""
|
780 |
+
Provide spiritual and ethical guidance based on Vedic principles for life questions.
|
781 |
+
|
782 |
+
Args:
|
783 |
+
question: A question about life, relationships, career, purpose, ethics, or spiritual matters
|
784 |
+
|
785 |
+
Returns:
|
786 |
+
Spiritual guidance with practical wisdom from Vedic scriptures
|
787 |
+
"""
|
788 |
+
try:
|
789 |
+
initialize_system()
|
790 |
+
result = rag_system.get_spiritual_guidance(question)
|
791 |
+
|
792 |
+
if result["sources"]:
|
793 |
+
guidance = result["response"]
|
794 |
+
# Add source information for context
|
795 |
+
sources_summary = f"\n\n📚 Based on {len(result['sources'])} relevant Vedic teachings"
|
796 |
+
return guidance + sources_summary
|
797 |
+
else:
|
798 |
+
return result["response"]
|
799 |
+
|
800 |
+
except Exception as e:
|
801 |
+
logger.error(f"Error in get_spiritual_guidance: {e}")
|
802 |
+
return "I apologize, but I encountered an error while seeking guidance. Please try again or rephrase your question."
|
803 |
+
|
804 |
+
def find_vedic_quotes(topic: str) -> str:
|
805 |
+
"""
|
806 |
+
Find relevant quotes and teachings from Vedic scriptures on specific topics.
|
807 |
+
|
808 |
+
Args:
|
809 |
+
topic: A spiritual or ethical topic (e.g., "karma", "dharma", "relationships", "purpose")
|
810 |
+
|
811 |
+
Returns:
|
812 |
+
Relevant Vedic quotes and their explanations
|
813 |
+
"""
|
814 |
+
try:
|
815 |
+
initialize_system()
|
816 |
+
|
817 |
+
# Create a query focused on finding quotes
|
818 |
+
query = f"quotes and teachings about {topic} from Vedic scriptures"
|
819 |
+
contexts = rag_system.retrieve_context(query)
|
820 |
+
|
821 |
+
if not contexts:
|
822 |
+
return f"I couldn't find specific Vedic quotes about '{topic}'. Try topics like dharma, karma, relationships, truth, or duty."
|
823 |
+
|
824 |
+
# Format the quotes nicely
|
825 |
+
quotes_text = f"📜 **Vedic Wisdom on {topic.title()}:**\n\n"
|
826 |
+
for i, context in enumerate(contexts[:3], 1):
|
827 |
+
# Clean and format each quote
|
828 |
+
clean_context = context.strip()
|
829 |
+
quotes_text += f"**Teaching {i}:**\n{clean_context}\n\n"
|
830 |
+
|
831 |
+
return quotes_text
|
832 |
+
|
833 |
+
except Exception as e:
|
834 |
+
logger.error(f"Error in find_vedic_quotes: {e}")
|
835 |
+
return "I encountered an error while searching for quotes. Please try again."
|
836 |
+
|
837 |
+
def explain_concept(concept: str) -> str:
|
838 |
+
"""
|
839 |
+
Explain spiritual and philosophical concepts from a Vedic perspective.
|
840 |
+
|
841 |
+
Args:
|
842 |
+
concept: A spiritual concept to explain (e.g., "karma", "dharma", "moksha", "atman")
|
843 |
+
|
844 |
+
Returns:
|
845 |
+
Clear explanation of the concept with Vedic context
|
846 |
+
"""
|
847 |
+
try:
|
848 |
+
initialize_system()
|
849 |
+
|
850 |
+
# Create a query focused on explaining the concept
|
851 |
+
query = f"meaning and explanation of {concept} in Vedic philosophy and spirituality"
|
852 |
+
contexts = rag_system.retrieve_context(query)
|
853 |
+
|
854 |
+
if not contexts:
|
855 |
+
return f"I couldn't find detailed information about '{concept}'. Try concepts like karma, dharma, atman, moksha, or samsara."
|
856 |
+
|
857 |
+
# Create explanation prompt
|
858 |
+
context_text = "\n\n".join(contexts[:3])
|
859 |
+
prompt = f"""Based on the following Vedic teachings, provide a clear and accessible explanation of the concept '{concept}':
|
860 |
+
|
861 |
+
Vedic Context:
|
862 |
+
{context_text}
|
863 |
+
|
864 |
+
Please explain:
|
865 |
+
1. What {concept} means in Vedic philosophy
|
866 |
+
2. How it applies to daily life
|
867 |
+
3. Any practical understanding for modern seekers
|
868 |
+
|
869 |
+
Explanation:"""
|
870 |
+
|
871 |
+
# response = rag_system.hf_inference.generate_response(prompt)
|
872 |
+
response = rag_system.claude_inference.generate_response(prompt)
|
873 |
+
return f"🕉️ **Understanding '{concept.title()}' in Vedic Philosophy:**\n\n{response}"
|
874 |
+
|
875 |
+
except Exception as e:
|
876 |
+
logger.error(f"Error in explain_concept: {e}")
|
877 |
+
return "I encountered an error while explaining the concept. Please try again."
|
878 |
+
|
879 |
+
def daily_wisdom() -> str:
|
880 |
+
"""
|
881 |
+
Get a daily spiritual insight or teaching from Vedic scriptures.
|
882 |
+
|
883 |
+
Returns:
|
884 |
+
A meaningful spiritual teaching for daily reflection
|
885 |
+
"""
|
886 |
+
try:
|
887 |
+
initialize_system()
|
888 |
+
|
889 |
+
# Get a random spiritual teaching
|
890 |
+
import random
|
891 |
+
wisdom_topics = [
|
892 |
+
"daily spiritual practice", "inner peace", "righteous living",
|
893 |
+
"mind control", "devotion", "service to others", "truthfulness",
|
894 |
+
"detachment", "spiritual growth", "divine love"
|
895 |
+
]
|
896 |
+
|
897 |
+
topic = random.choice(wisdom_topics)
|
898 |
+
contexts = rag_system.retrieve_context(f"teaching about {topic}")
|
899 |
+
|
900 |
+
if contexts:
|
901 |
+
# Pick a random context for variety
|
902 |
+
selected_context = random.choice(contexts[:3])
|
903 |
+
return f"🌅 **Daily Wisdom:**\n\n{selected_context}\n\n💫 *Reflect on this teaching throughout your day.*"
|
904 |
+
else:
|
905 |
+
return "🕉️ **Daily Wisdom:**\n\nPerform your duty without attachment to results. Focus on your actions, not the outcomes. This is the path to inner peace."
|
906 |
+
|
907 |
+
except Exception as e:
|
908 |
+
logger.error(f"Error in daily_wisdom: {e}")
|
909 |
+
return "🕉️ **Daily Wisdom:**\n\nIn every situation, seek to act with compassion, truth, and righteousness."
|
910 |
+
|
911 |
+
def analyze_dilemma(situation: str) -> str:
|
912 |
+
"""
|
913 |
+
Analyze ethical dilemmas using dharmic principles from Vedic teachings.
|
914 |
+
|
915 |
+
Args:
|
916 |
+
situation: Description of an ethical dilemma or difficult decision
|
917 |
+
|
918 |
+
Returns:
|
919 |
+
Analysis and guidance based on dharmic principles
|
920 |
+
"""
|
921 |
+
try:
|
922 |
+
initialize_system()
|
923 |
+
|
924 |
+
# Create specific query for ethical analysis
|
925 |
+
query = f"dharmic principles for ethical decisions and moral dilemmas: {situation}"
|
926 |
+
contexts = rag_system.retrieve_context(query)
|
927 |
+
|
928 |
+
if not contexts:
|
929 |
+
# Fallback to general dharma teachings
|
930 |
+
contexts = rag_system.retrieve_context("dharma righteous action ethical decisions")
|
931 |
+
|
932 |
+
if contexts:
|
933 |
+
context_text = "\n\n".join(contexts[:3])
|
934 |
+
prompt = f"""As a spiritual guide versed in dharmic principles, analyze this ethical situation:
|
935 |
+
|
936 |
+
Situation: {situation}
|
937 |
+
|
938 |
+
Relevant Dharmic Teachings:
|
939 |
+
{context_text}
|
940 |
+
|
941 |
+
Please provide:
|
942 |
+
1. Key dharmic principles that apply to this situation
|
943 |
+
2. Different perspectives to consider
|
944 |
+
3. Guidance for making a righteous decision
|
945 |
+
4. Practical steps for moving forward
|
946 |
+
|
947 |
+
Analysis:"""
|
948 |
+
|
949 |
+
# response = rag_system.hf_inference.generate_response(prompt)
|
950 |
+
response = rag_system.claude_inference.generate_response(prompt)
|
951 |
+
return f"⚖️ **Dharmic Analysis:**\n\n{response}"
|
952 |
+
else:
|
953 |
+
return "⚖️ **Dharmic Analysis:**\n\nWhen facing ethical dilemmas, consider: What action serves the highest good? What would be most truthful and compassionate? What aligns with your dharma (righteous duty)? Choose the path that minimizes harm and promotes welfare for all."
|
954 |
+
|
955 |
+
except Exception as e:
|
956 |
+
logger.error(f"Error in analyze_dilemma: {e}")
|
957 |
+
return "I encountered an error while analyzing the dilemma. Please try again with a clear description of your situation."
|
958 |
+
|
959 |
+
# ============================================================================
|
960 |
+
# MCP SERVER IMPLEMENTATION
|
961 |
+
# ============================================================================
|
962 |
+
|
963 |
+
if MCP_AVAILABLE:
|
964 |
+
app = Server("karmacheck")
|
965 |
+
|
966 |
+
@app.list_tools()
|
967 |
+
async def handle_list_tools() -> list[types.Tool]:
|
968 |
+
"""List available tools for MCP clients"""
|
969 |
+
return [
|
970 |
+
types.Tool(
|
971 |
+
name="get_spiritual_guidance",
|
972 |
+
description="Provide spiritual and ethical guidance based on Vedic principles for life questions",
|
973 |
+
inputSchema={
|
974 |
+
"type": "object",
|
975 |
+
"properties": {
|
976 |
+
"question": {
|
977 |
+
"type": "string",
|
978 |
+
"description": "A question about life, relationships, career, purpose, ethics, or spiritual matters"
|
979 |
+
}
|
980 |
+
},
|
981 |
+
"required": ["question"]
|
982 |
+
}
|
983 |
+
),
|
984 |
+
types.Tool(
|
985 |
+
name="find_vedic_quotes",
|
986 |
+
description="Find relevant quotes and teachings from Vedic scriptures on specific topics",
|
987 |
+
inputSchema={
|
988 |
+
"type": "object",
|
989 |
+
"properties": {
|
990 |
+
"topic": {
|
991 |
+
"type": "string",
|
992 |
+
"description": "A spiritual or ethical topic (e.g., 'karma', 'dharma', 'relationships', 'purpose')"
|
993 |
+
}
|
994 |
+
},
|
995 |
+
"required": ["topic"]
|
996 |
+
}
|
997 |
+
),
|
998 |
+
types.Tool(
|
999 |
+
name="explain_concept",
|
1000 |
+
description="Explain spiritual and philosophical concepts from a Vedic perspective",
|
1001 |
+
inputSchema={
|
1002 |
+
"type": "object",
|
1003 |
+
"properties": {
|
1004 |
+
"concept": {
|
1005 |
+
"type": "string",
|
1006 |
+
"description": "A spiritual concept to explain (e.g., 'karma', 'dharma', 'moksha', 'atman')"
|
1007 |
+
}
|
1008 |
+
},
|
1009 |
+
"required": ["concept"]
|
1010 |
+
}
|
1011 |
+
),
|
1012 |
+
types.Tool(
|
1013 |
+
name="daily_wisdom",
|
1014 |
+
description="Get a daily spiritual insight or teaching from Vedic scriptures",
|
1015 |
+
inputSchema={
|
1016 |
+
"type": "object",
|
1017 |
+
"properties": {},
|
1018 |
+
"required": []
|
1019 |
+
}
|
1020 |
+
),
|
1021 |
+
types.Tool(
|
1022 |
+
name="analyze_dilemma",
|
1023 |
+
description="Analyze ethical dilemmas using dharmic principles from Vedic teachings",
|
1024 |
+
inputSchema={
|
1025 |
+
"type": "object",
|
1026 |
+
"properties": {
|
1027 |
+
"situation": {
|
1028 |
+
"type": "string",
|
1029 |
+
"description": "Description of an ethical dilemma or difficult decision"
|
1030 |
+
}
|
1031 |
+
},
|
1032 |
+
"required": ["situation"]
|
1033 |
+
}
|
1034 |
+
)
|
1035 |
+
]
|
1036 |
+
|
1037 |
+
@app.call_tool()
|
1038 |
+
async def handle_call_tool(name: str, arguments: dict) -> list[types.TextContent]:
|
1039 |
+
"""Handle tool calls from MCP clients"""
|
1040 |
+
try:
|
1041 |
+
if name == "get_spiritual_guidance":
|
1042 |
+
question = arguments.get("question", "")
|
1043 |
+
result = get_spiritual_guidance(question)
|
1044 |
+
return [types.TextContent(type="text", text=result)]
|
1045 |
+
|
1046 |
+
elif name == "find_vedic_quotes":
|
1047 |
+
topic = arguments.get("topic", "")
|
1048 |
+
result = find_vedic_quotes(topic)
|
1049 |
+
return [types.TextContent(type="text", text=result)]
|
1050 |
+
|
1051 |
+
elif name == "explain_concept":
|
1052 |
+
concept = arguments.get("concept", "")
|
1053 |
+
result = explain_concept(concept)
|
1054 |
+
return [types.TextContent(type="text", text=result)]
|
1055 |
+
|
1056 |
+
elif name == "daily_wisdom":
|
1057 |
+
result = daily_wisdom()
|
1058 |
+
return [types.TextContent(type="text", text=result)]
|
1059 |
+
|
1060 |
+
elif name == "analyze_dilemma":
|
1061 |
+
situation = arguments.get("situation", "")
|
1062 |
+
result = analyze_dilemma(situation)
|
1063 |
+
return [types.TextContent(type="text", text=result)]
|
1064 |
+
|
1065 |
+
else:
|
1066 |
+
return [types.TextContent(type="text", text=f"Unknown tool: {name}")]
|
1067 |
+
|
1068 |
+
except Exception as e:
|
1069 |
+
error_msg = f"Error executing {name}: {str(e)}"
|
1070 |
+
logger.error(error_msg)
|
1071 |
+
return [types.TextContent(type="text", text=error_msg)]
|
1072 |
+
|
1073 |
+
# ============================================================================
|
1074 |
+
# GRADIO UI FUNCTIONS
|
1075 |
+
# ============================================================================
|
1076 |
+
|
1077 |
+
def process_question_ui(question: str) -> Tuple[str, str]:
|
1078 |
+
"""Process a spiritual question for the Gradio UI"""
|
1079 |
+
if not question.strip():
|
1080 |
+
return "Please ask a question about life, relationships, or spiritual matters.", ""
|
1081 |
+
|
1082 |
+
# Use the spiritual guidance function
|
1083 |
+
response = get_spiritual_guidance(question)
|
1084 |
+
|
1085 |
+
# Get detailed sources for UI
|
1086 |
+
try:
|
1087 |
+
initialize_system()
|
1088 |
+
result = rag_system.get_spiritual_guidance(question)
|
1089 |
+
|
1090 |
+
sources_text = ""
|
1091 |
+
if result["sources"]:
|
1092 |
+
sources_text = "**📚 Relevant Vedic Teachings:**\n\n"
|
1093 |
+
for i, source in enumerate(result["sources"][:3], 1):
|
1094 |
+
# Truncate long sources for UI
|
1095 |
+
truncated_source = source[:400] + "..." if len(source) > 400 else source
|
1096 |
+
sources_text += f"**{i}.** {truncated_source}\n\n"
|
1097 |
+
except:
|
1098 |
+
sources_text = ""
|
1099 |
+
|
1100 |
+
return response, sources_text
|
1101 |
+
|
1102 |
+
def create_interface() -> gr.Blocks:
|
1103 |
+
"""Create the Gradio interface with tag system"""
|
1104 |
+
|
1105 |
+
# Custom CSS for better styling
|
1106 |
+
css = """
|
1107 |
+
.container {
|
1108 |
+
max-width: 900px;
|
1109 |
+
margin: auto;
|
1110 |
+
}
|
1111 |
+
.header {
|
1112 |
+
text-align: center;
|
1113 |
+
margin-bottom: 30px;
|
1114 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
1115 |
+
-webkit-background-clip: text;
|
1116 |
+
-webkit-text-fill-color: transparent;
|
1117 |
+
background-clip: text;
|
1118 |
+
}
|
1119 |
+
.question-box {
|
1120 |
+
margin-bottom: 20px;
|
1121 |
+
}
|
1122 |
+
.response-box {
|
1123 |
+
margin-top: 20px;
|
1124 |
+
border-radius: 10px;
|
1125 |
+
}
|
1126 |
+
.examples {
|
1127 |
+
margin-top: 20px;
|
1128 |
+
padding: 15px;
|
1129 |
+
background-color: #f8f9fa;
|
1130 |
+
border-radius: 10px;
|
1131 |
+
border-left: 4px solid #667eea;
|
1132 |
+
}
|
1133 |
+
.tag-section {
|
1134 |
+
margin-top: 15px;
|
1135 |
+
padding: 10px;
|
1136 |
+
background-color: #f0f8ff;
|
1137 |
+
border-radius: 8px;
|
1138 |
+
border-left: 3px solid #667eea;
|
1139 |
+
}
|
1140 |
+
"""
|
1141 |
+
|
1142 |
+
# Create interface
|
1143 |
+
with gr.Blocks(css=css, title="🕉️ KarmaCheck - Spiritual Guidance", theme=gr.themes.Soft()) as interface:
|
1144 |
+
|
1145 |
+
gr.Markdown(
|
1146 |
+
"""
|
1147 |
+
# 🕉️ KarmaCheck - Spiritual Guidance & MCP Server
|
1148 |
+
|
1149 |
+
**Welcome to KarmaCheck** - Your AI-powered spiritual companion that provides guidance based on ancient Vedic wisdom.
|
1150 |
+
Ask questions about life, relationships, purpose, ethics, or any spiritual matters.
|
1151 |
+
|
1152 |
+
*Now with intelligent tag detection and enhanced responses!*
|
1153 |
+
|
1154 |
+
---
|
1155 |
+
|
1156 |
+
*"यदा यदा हि धर्मस्य ग्लानिर्भवति भारत।
|
1157 |
+
अभ्युत्थानमधर्मस्य तदात्मानं सृजाम्यहम्॥"*
|
1158 |
+
|
1159 |
+
*"Whenever there is a decline in righteousness, O Bharata, I manifest Myself."* - Bhagavad Gita 4.7
|
1160 |
+
""",
|
1161 |
+
elem_classes=["header"]
|
1162 |
+
)
|
1163 |
+
|
1164 |
+
with gr.Row():
|
1165 |
+
with gr.Column(scale=2):
|
1166 |
+
question_input = gr.Textbox(
|
1167 |
+
label="🙏 Your Spiritual Question",
|
1168 |
+
placeholder="Ask about life challenges, relationships, purpose, dharma, karma, or any spiritual matter...",
|
1169 |
+
lines=3,
|
1170 |
+
elem_classes=["question-box"]
|
1171 |
+
)
|
1172 |
+
|
1173 |
+
with gr.Row():
|
1174 |
+
submit_btn = gr.Button("🔮 Seek Guidance", variant="primary", size="lg")
|
1175 |
+
clear_btn = gr.Button("🗑️ Clear", variant="secondary")
|
1176 |
+
|
1177 |
+
with gr.Row():
|
1178 |
+
with gr.Column():
|
1179 |
+
response_output = gr.Textbox(
|
1180 |
+
label="🌟 Spiritual Guidance",
|
1181 |
+
lines=10,
|
1182 |
+
elem_classes=["response-box"],
|
1183 |
+
interactive=False
|
1184 |
+
)
|
1185 |
+
|
1186 |
+
with gr.Row():
|
1187 |
+
with gr.Column():
|
1188 |
+
sources_output = gr.Textbox(
|
1189 |
+
label="📚 Source Teachings",
|
1190 |
+
lines=8,
|
1191 |
+
elem_classes=["response-box"],
|
1192 |
+
interactive=False
|
1193 |
+
)
|
1194 |
+
|
1195 |
+
# Quick action buttons for common queries (existing)
|
1196 |
+
with gr.Row():
|
1197 |
+
daily_wisdom_btn = gr.Button("🌅 Daily Wisdom", variant="secondary", size="sm")
|
1198 |
+
explain_karma_btn = gr.Button("🔄 Explain Karma", variant="secondary", size="sm")
|
1199 |
+
explain_dharma_btn = gr.Button("⚖️ Explain Dharma", variant="secondary", size="sm")
|
1200 |
+
|
1201 |
+
# NEW: Tag-based spiritual topic buttons
|
1202 |
+
with gr.Row():
|
1203 |
+
gr.HTML('<h3 style="text-align: left; color: #667eea; margin: 10px 0;">🏷️ Quick Spiritual Topics</h3>')
|
1204 |
+
# NEW: Tag-based spiritual topic buttons (without problematic markdown)
|
1205 |
+
# gr.Markdown("---") # Just a simple separator
|
1206 |
+
with gr.Row():
|
1207 |
+
purpose_btn = gr.Button("🎯 Life Purpose", variant="secondary", size="sm")
|
1208 |
+
anxiety_btn = gr.Button("😰 Anxiety Help", variant="secondary", size="sm")
|
1209 |
+
relationship_btn = gr.Button("💕 Relationships", variant="secondary", size="sm")
|
1210 |
+
suffering_btn = gr.Button("💔 Dealing with Suffering", variant="secondary", size="sm")
|
1211 |
+
|
1212 |
+
with gr.Row():
|
1213 |
+
confused_btn = gr.Button("❓ Feeling Confused", variant="secondary", size="sm")
|
1214 |
+
practice_btn = gr.Button("🧘 Spiritual Practice", variant="secondary", size="sm")
|
1215 |
+
career_btn = gr.Button("💼 Career Guidance", variant="secondary", size="sm")
|
1216 |
+
moral_btn = gr.Button("⚖️ Moral Dilemmas", variant="secondary", size="sm")
|
1217 |
+
|
1218 |
+
# MCP Server Info
|
1219 |
+
with gr.Accordion("🔧 MCP Server Integration", open=False):
|
1220 |
+
gr.Markdown(
|
1221 |
+
"""
|
1222 |
+
### Claude Desktop Integration
|
1223 |
+
|
1224 |
+
This app also runs as an MCP server! Add this to your Claude Desktop MCP settings:
|
1225 |
+
|
1226 |
+
```json
|
1227 |
+
{
|
1228 |
+
"karmacheck": {
|
1229 |
+
"command": "python",
|
1230 |
+
"args": ["path/to/karma_check.py", "--mcp"],
|
1231 |
+
"env": {"CLAUDE_API_TOKEN": "your_claude_token_here"}
|
1232 |
+
}
|
1233 |
+
}
|
1234 |
+
```
|
1235 |
+
|
1236 |
+
**Available MCP Tools:**
|
1237 |
+
- `get_spiritual_guidance(question)` - Main spiritual guidance with tag detection
|
1238 |
+
- `find_vedic_quotes(topic)` - Find quotes on specific topics
|
1239 |
+
- `explain_concept(concept)` - Explain spiritual concepts
|
1240 |
+
- `daily_wisdom()` - Get daily spiritual insight
|
1241 |
+
- `analyze_dilemma(situation)` - Analyze ethical dilemmas
|
1242 |
+
"""
|
1243 |
+
)
|
1244 |
+
|
1245 |
+
# Example questions
|
1246 |
+
with gr.Accordion("💡 Example Questions", open=True):
|
1247 |
+
gr.Markdown(
|
1248 |
+
"""
|
1249 |
+
### Try These Questions:
|
1250 |
+
|
1251 |
+
**🎯 Life Purpose & Direction:**
|
1252 |
+
- "How can I find my life's true purpose?"
|
1253 |
+
- "I feel lost and confused about my career path. What should I do?"
|
1254 |
+
- "How do I know if I'm following my dharma?"
|
1255 |
+
|
1256 |
+
**💕 Relationships & Family:**
|
1257 |
+
- "I'm struggling with a difficult relationship. How should I respond?"
|
1258 |
+
- "How can I deal with family conflicts while maintaining harmony?"
|
1259 |
+
- "What does love mean from a spiritual perspective?"
|
1260 |
+
|
1261 |
+
**😰 Personal Growth & Anxiety:**
|
1262 |
+
- "How can I overcome anxiety and find inner peace?"
|
1263 |
+
- "What is the spiritual significance of suffering?"
|
1264 |
+
- "How do I develop detachment without becoming indifferent?"
|
1265 |
+
|
1266 |
+
**⚖️ Ethics & Decision Making:**
|
1267 |
+
- "I'm facing an ethical dilemma at work. What should I do?"
|
1268 |
+
- "How do I balance personal desires with duty to others?"
|
1269 |
+
- "What does it mean to live righteously in modern times?"
|
1270 |
+
|
1271 |
+
**🧘 Spiritual Practice:**
|
1272 |
+
- "How should I start a spiritual practice?"
|
1273 |
+
- "What is the meaning of karma and how does it work?"
|
1274 |
+
- "How can I cultivate devotion and surrender?"
|
1275 |
+
"""
|
1276 |
+
)
|
1277 |
+
|
1278 |
+
# Set up interactions for main functionality
|
1279 |
+
submit_btn.click(
|
1280 |
+
fn=process_question_ui,
|
1281 |
+
inputs=[question_input],
|
1282 |
+
outputs=[response_output, sources_output]
|
1283 |
+
)
|
1284 |
+
|
1285 |
+
question_input.submit(
|
1286 |
+
fn=process_question_ui,
|
1287 |
+
inputs=[question_input],
|
1288 |
+
outputs=[response_output, sources_output]
|
1289 |
+
)
|
1290 |
+
|
1291 |
+
clear_btn.click(
|
1292 |
+
fn=lambda: ("", "", ""),
|
1293 |
+
outputs=[question_input, response_output, sources_output]
|
1294 |
+
)
|
1295 |
+
|
1296 |
+
# Quick action button functions (existing)
|
1297 |
+
def get_daily_wisdom_ui():
|
1298 |
+
wisdom = daily_wisdom()
|
1299 |
+
return wisdom, ""
|
1300 |
+
|
1301 |
+
def explain_karma_ui():
|
1302 |
+
explanation = explain_concept("karma")
|
1303 |
+
return explanation, ""
|
1304 |
+
|
1305 |
+
def explain_dharma_ui():
|
1306 |
+
explanation = explain_concept("dharma")
|
1307 |
+
return explanation, ""
|
1308 |
+
|
1309 |
+
# Tag-based question functions
|
1310 |
+
def ask_purpose_question():
|
1311 |
+
question = "I feel lost and don't know my life's purpose. How can I find my dharma and calling in life?"
|
1312 |
+
response, sources = process_question_ui(question)
|
1313 |
+
return question, response, sources
|
1314 |
+
|
1315 |
+
def ask_anxiety_question():
|
1316 |
+
question = "I'm struggling with anxiety and constant worry. How can I find inner peace according to Vedic teachings?"
|
1317 |
+
response, sources = process_question_ui(question)
|
1318 |
+
return question, response, sources
|
1319 |
+
|
1320 |
+
def ask_relationship_question():
|
1321 |
+
question = "I'm having conflicts in my relationships. How should I handle difficult people with dharmic principles?"
|
1322 |
+
response, sources = process_question_ui(question)
|
1323 |
+
return question, response, sources
|
1324 |
+
|
1325 |
+
def ask_suffering_question():
|
1326 |
+
question = "I'm going through a very difficult time and suffering. What is the spiritual meaning of suffering?"
|
1327 |
+
response, sources = process_question_ui(question)
|
1328 |
+
return question, response, sources
|
1329 |
+
|
1330 |
+
def ask_confused_question():
|
1331 |
+
question = "I feel completely confused about life and spirituality. Where do I even begin my spiritual journey?"
|
1332 |
+
response, sources = process_question_ui(question)
|
1333 |
+
return question, response, sources
|
1334 |
+
|
1335 |
+
def ask_practice_question():
|
1336 |
+
question = "How should I start and maintain a spiritual practice? What does the Bhagavad Gita teach about this?"
|
1337 |
+
response, sources = process_question_ui(question)
|
1338 |
+
return question, response, sources
|
1339 |
+
|
1340 |
+
def ask_career_question():
|
1341 |
+
question = "I'm unhappy with my career and don't know if I should change paths. How do I make dharmic career decisions?"
|
1342 |
+
response, sources = process_question_ui(question)
|
1343 |
+
return question, response, sources
|
1344 |
+
|
1345 |
+
def ask_moral_question():
|
1346 |
+
question = "I'm facing a moral dilemma where I don't know what's right. How do I understand dharma in difficult situations?"
|
1347 |
+
response, sources = process_question_ui(question)
|
1348 |
+
return question, response, sources
|
1349 |
+
|
1350 |
+
# Set up existing button handlers
|
1351 |
+
daily_wisdom_btn.click(
|
1352 |
+
fn=get_daily_wisdom_ui,
|
1353 |
+
outputs=[response_output, sources_output]
|
1354 |
+
)
|
1355 |
+
|
1356 |
+
explain_karma_btn.click(
|
1357 |
+
fn=explain_karma_ui,
|
1358 |
+
outputs=[response_output, sources_output]
|
1359 |
+
)
|
1360 |
+
|
1361 |
+
explain_dharma_btn.click(
|
1362 |
+
fn=explain_dharma_ui,
|
1363 |
+
outputs=[response_output, sources_output]
|
1364 |
+
)
|
1365 |
+
|
1366 |
+
# Set up NEW tag-based button handlers
|
1367 |
+
purpose_btn.click(
|
1368 |
+
fn=ask_purpose_question,
|
1369 |
+
outputs=[question_input, response_output, sources_output]
|
1370 |
+
)
|
1371 |
+
|
1372 |
+
anxiety_btn.click(
|
1373 |
+
fn=ask_anxiety_question,
|
1374 |
+
outputs=[question_input, response_output, sources_output]
|
1375 |
+
)
|
1376 |
+
|
1377 |
+
relationship_btn.click(
|
1378 |
+
fn=ask_relationship_question,
|
1379 |
+
outputs=[question_input, response_output, sources_output]
|
1380 |
+
)
|
1381 |
+
|
1382 |
+
suffering_btn.click(
|
1383 |
+
fn=ask_suffering_question,
|
1384 |
+
outputs=[question_input, response_output, sources_output]
|
1385 |
+
)
|
1386 |
+
|
1387 |
+
confused_btn.click(
|
1388 |
+
fn=ask_confused_question,
|
1389 |
+
outputs=[question_input, response_output, sources_output]
|
1390 |
+
)
|
1391 |
+
|
1392 |
+
practice_btn.click(
|
1393 |
+
fn=ask_practice_question,
|
1394 |
+
outputs=[question_input, response_output, sources_output]
|
1395 |
+
)
|
1396 |
+
|
1397 |
+
career_btn.click(
|
1398 |
+
fn=ask_career_question,
|
1399 |
+
outputs=[question_input, response_output, sources_output]
|
1400 |
+
)
|
1401 |
+
|
1402 |
+
moral_btn.click(
|
1403 |
+
fn=ask_moral_question,
|
1404 |
+
outputs=[question_input, response_output, sources_output]
|
1405 |
+
)
|
1406 |
+
|
1407 |
+
# Footer
|
1408 |
+
gr.Markdown(
|
1409 |
+
"""
|
1410 |
+
---
|
1411 |
+
|
1412 |
+
### 🙏 About KarmaCheck
|
1413 |
+
|
1414 |
+
KarmaCheck combines ancient Vedic wisdom with modern AI to provide spiritual guidance for contemporary life.
|
1415 |
+
The system uses RAG (Retrieval-Augmented Generation) to find relevant teachings from scriptures like the
|
1416 |
+
Bhagavad Gita and Upanishads, then provides contextual guidance through advanced language models.
|
1417 |
+
|
1418 |
+
**✨ Enhanced Features:**
|
1419 |
+
- 🔮 Spiritual guidance based on Vedic principles
|
1420 |
+
- 📚 Direct quotes from sacred texts
|
1421 |
+
- 🏷️ **NEW**: Intelligent tag detection for personalized responses
|
1422 |
+
- 🤖 MCP server for Claude Desktop integration
|
1423 |
+
- 🌟 Daily wisdom and concept explanations
|
1424 |
+
- ⚖️ Ethical dilemma analysis
|
1425 |
+
- 🎯 Quick spiritual topic buttons
|
1426 |
+
|
1427 |
+
**🏷️ Tag System:** KarmaCheck now automatically detects the type of spiritual question you're asking
|
1428 |
+
(anxiety, relationships, life purpose, etc.) and provides more targeted, compassionate guidance.
|
1429 |
+
|
1430 |
+
*"सर्वे भवन्तु सुखिनः सर्वे सन्तु निरामयाः।
|
1431 |
+
सर्वे भद्राणि पश्यन्तु मा कश्चिद्दुःखभाग्भवेत्॥"*
|
1432 |
+
|
1433 |
+
*"May all beings be happy, may all beings be healthy.
|
1434 |
+
May all beings experience prosperity, may none suffer."*
|
1435 |
+
|
1436 |
+
---
|
1437 |
+
|
1438 |
+
Built with ❤️ using Gradio, LlamaIndex, Claude API, and Hugging Face.
|
1439 |
+
|
1440 |
+
"""
|
1441 |
+
)
|
1442 |
+
|
1443 |
+
return interface
|
1444 |
+
|
1445 |
+
# def create_interface() -> gr.Interface:
|
1446 |
+
# """Create the Gradio interface"""
|
1447 |
+
|
1448 |
+
# # Custom CSS for better styling
|
1449 |
+
# css = """
|
1450 |
+
# .container {
|
1451 |
+
# max-width: 900px;
|
1452 |
+
# margin: auto;
|
1453 |
+
# }
|
1454 |
+
# .header {
|
1455 |
+
# text-align: center;
|
1456 |
+
# margin-bottom: 30px;
|
1457 |
+
# background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
1458 |
+
# -webkit-background-clip: text;
|
1459 |
+
# -webkit-text-fill-color: transparent;
|
1460 |
+
# background-clip: text;
|
1461 |
+
# }
|
1462 |
+
# .question-box {
|
1463 |
+
# margin-bottom: 20px;
|
1464 |
+
# }
|
1465 |
+
# .response-box {
|
1466 |
+
# margin-top: 20px;
|
1467 |
+
# border-radius: 10px;
|
1468 |
+
# }
|
1469 |
+
# .examples {
|
1470 |
+
# margin-top: 20px;
|
1471 |
+
# padding: 15px;
|
1472 |
+
# background-color: #f8f9fa;
|
1473 |
+
# border-radius: 10px;
|
1474 |
+
# border-left: 4px solid #667eea;
|
1475 |
+
# }
|
1476 |
+
# """
|
1477 |
+
|
1478 |
+
# # Create interface
|
1479 |
+
# with gr.Blocks(css=css, title="🕉️ KarmaCheck - Spiritual Guidance", theme=gr.themes.Soft()) as interface:
|
1480 |
+
|
1481 |
+
# gr.Markdown(
|
1482 |
+
# """
|
1483 |
+
# # 🕉️ KarmaCheck - Spiritual Guidance & MCP Server
|
1484 |
+
|
1485 |
+
# **Welcome to KarmaCheck** - Your AI-powered spiritual companion that provides guidance based on ancient Vedic wisdom.
|
1486 |
+
# Ask questions about life, relationships, purpose, ethics, or any spiritual matters.
|
1487 |
+
|
1488 |
+
# *Now also available as an MCP server for Claude Desktop integration!*
|
1489 |
+
|
1490 |
+
# ---
|
1491 |
+
|
1492 |
+
# *"यदा यदा हि धर्मस्य ग्लानिर्भवति भारत।
|
1493 |
+
# अभ्युत्थानमधर्मस्य तदात्मानं सृजाम्यहम्॥"*
|
1494 |
+
|
1495 |
+
# *"Whenever there is a decline in righteousness, O Bharata, I manifest Myself."* - Bhagavad Gita 4.7
|
1496 |
+
# """,
|
1497 |
+
# elem_classes=["header"]
|
1498 |
+
# )
|
1499 |
+
|
1500 |
+
# with gr.Row():
|
1501 |
+
# with gr.Column(scale=2):
|
1502 |
+
# question_input = gr.Textbox(
|
1503 |
+
# label="🙏 Your Spiritual Question",
|
1504 |
+
# placeholder="Ask about life challenges, relationships, purpose, dharma, karma, or any spiritual matter...",
|
1505 |
+
# lines=3,
|
1506 |
+
# elem_classes=["question-box"]
|
1507 |
+
# )
|
1508 |
+
|
1509 |
+
# with gr.Row():
|
1510 |
+
# submit_btn = gr.Button("🔮 Seek Guidance", variant="primary", size="lg")
|
1511 |
+
# clear_btn = gr.Button("🗑️ Clear", variant="secondary")
|
1512 |
+
|
1513 |
+
# with gr.Row():
|
1514 |
+
# with gr.Column():
|
1515 |
+
# response_output = gr.Textbox(
|
1516 |
+
# label="🌟 Spiritual Guidance",
|
1517 |
+
# lines=10,
|
1518 |
+
# elem_classes=["response-box"],
|
1519 |
+
# interactive=False
|
1520 |
+
# )
|
1521 |
+
|
1522 |
+
# with gr.Row():
|
1523 |
+
# with gr.Column():
|
1524 |
+
# sources_output = gr.Textbox(
|
1525 |
+
# label="📚 Source Teachings",
|
1526 |
+
# lines=8,
|
1527 |
+
# elem_classes=["response-box"],
|
1528 |
+
# interactive=False
|
1529 |
+
# )
|
1530 |
+
|
1531 |
+
# # MCP Server Info
|
1532 |
+
# with gr.Accordion("🔧 MCP Server Integration", open=False):
|
1533 |
+
# gr.Markdown(
|
1534 |
+
# """
|
1535 |
+
# ### Claude Desktop Integration
|
1536 |
+
|
1537 |
+
# This app also runs as an MCP server! Add this to your Claude Desktop MCP settings:
|
1538 |
+
|
1539 |
+
# ```json
|
1540 |
+
# {
|
1541 |
+
# "karmacheck": {
|
1542 |
+
# "command": "python",
|
1543 |
+
# "args": ["path/to/karma_check.py", "--mcp"],
|
1544 |
+
# "env": {"HUGGINGFACE_API_TOKEN": "your_hf_token_here"}
|
1545 |
+
# }
|
1546 |
+
# }
|
1547 |
+
# ```
|
1548 |
+
|
1549 |
+
# **Available MCP Tools:**
|
1550 |
+
# - `get_spiritual_guidance(question)` - Main spiritual guidance
|
1551 |
+
# - `find_vedic_quotes(topic)` - Find quotes on specific topics
|
1552 |
+
# - `explain_concept(concept)` - Explain spiritual concepts
|
1553 |
+
# - `daily_wisdom()` - Get daily spiritual insight
|
1554 |
+
# - `analyze_dilemma(situation)` - Analyze ethical dilemmas
|
1555 |
+
# """
|
1556 |
+
# )
|
1557 |
+
|
1558 |
+
# # Example questions
|
1559 |
+
# with gr.Accordion("💡 Example Questions", open=True):
|
1560 |
+
# gr.Markdown(
|
1561 |
+
# """
|
1562 |
+
# ### Try These Questions:
|
1563 |
+
|
1564 |
+
# **Life Purpose & Direction:**
|
1565 |
+
# - "How can I find my life's true purpose?"
|
1566 |
+
# - "I feel lost and confused about my career path. What should I do?"
|
1567 |
+
# - "How do I know if I'm following my dharma?"
|
1568 |
+
|
1569 |
+
# **Relationships & Family:**
|
1570 |
+
# - "I'm struggling with a difficult relationship. How should I respond?"
|
1571 |
+
# - "How can I deal with family conflicts while maintaining harmony?"
|
1572 |
+
# - "What does love mean from a spiritual perspective?"
|
1573 |
+
|
1574 |
+
# **Personal Growth:**
|
1575 |
+
# - "How can I overcome anxiety and find inner peace?"
|
1576 |
+
# - "What is the spiritual significance of suffering?"
|
1577 |
+
# - "How do I develop detachment without becoming indifferent?"
|
1578 |
+
|
1579 |
+
# **Ethics & Decision Making:**
|
1580 |
+
# - "I'm facing an ethical dilemma at work. What should I do?"
|
1581 |
+
# - "How do I balance personal desires with duty to others?"
|
1582 |
+
# - "What does it mean to live righteously in modern times?"
|
1583 |
+
|
1584 |
+
# **Spiritual Practice:**
|
1585 |
+
# - "How should I start a spiritual practice?"
|
1586 |
+
# - "What is the meaning of karma and how does it work?"
|
1587 |
+
# - "How can I cultivate devotion and surrender?"
|
1588 |
+
# """
|
1589 |
+
# )
|
1590 |
+
|
1591 |
+
# # Quick action buttons for common queries
|
1592 |
+
# with gr.Row():
|
1593 |
+
# daily_wisdom_btn = gr.Button("🌅 Daily Wisdom", variant="secondary")
|
1594 |
+
# explain_karma_btn = gr.Button("🔄 Explain Karma", variant="secondary")
|
1595 |
+
# explain_dharma_btn = gr.Button("⚖️ Explain Dharma", variant="secondary")
|
1596 |
+
|
1597 |
+
# # Set up interactions
|
1598 |
+
# submit_btn.click(
|
1599 |
+
# fn=process_question_ui,
|
1600 |
+
# inputs=[question_input],
|
1601 |
+
# outputs=[response_output, sources_output]
|
1602 |
+
# )
|
1603 |
+
|
1604 |
+
# question_input.submit(
|
1605 |
+
# fn=process_question_ui,
|
1606 |
+
# inputs=[question_input],
|
1607 |
+
# outputs=[response_output, sources_output]
|
1608 |
+
# )
|
1609 |
+
|
1610 |
+
# clear_btn.click(
|
1611 |
+
# fn=lambda: ("", "", ""),
|
1612 |
+
# outputs=[question_input, response_output, sources_output]
|
1613 |
+
# )
|
1614 |
+
|
1615 |
+
# # Quick action button functions
|
1616 |
+
# def get_daily_wisdom_ui():
|
1617 |
+
# wisdom = daily_wisdom()
|
1618 |
+
# return wisdom, ""
|
1619 |
+
|
1620 |
+
# def explain_karma_ui():
|
1621 |
+
# explanation = explain_concept("karma")
|
1622 |
+
# return explanation, ""
|
1623 |
+
|
1624 |
+
# def explain_dharma_ui():
|
1625 |
+
# explanation = explain_concept("dharma")
|
1626 |
+
# return explanation, ""
|
1627 |
+
|
1628 |
+
# def create_tag_interface_additions():
|
1629 |
+
|
1630 |
+
# # Quick tag buttons for common spiritual topics
|
1631 |
+
# with gr.Row():
|
1632 |
+
# gr.Markdown("### 🏷️ Quick Spiritual Topics")
|
1633 |
+
|
1634 |
+
# with gr.Row():
|
1635 |
+
# purpose_btn = gr.Button("🎯 Life Purpose", variant="secondary", size="sm")
|
1636 |
+
# anxiety_btn = gr.Button("😰 Anxiety Help", variant="secondary", size="sm")
|
1637 |
+
# relationship_btn = gr.Button("💕 Relationships", variant="secondary", size="sm")
|
1638 |
+
# dharma_btn = gr.Button("⚖️ Dharma Questions", variant="secondary", size="sm")
|
1639 |
+
|
1640 |
+
# with gr.Row():
|
1641 |
+
# karma_btn = gr.Button("🔄 Understanding Karma", variant="secondary", size="sm")
|
1642 |
+
# suffering_btn = gr.Button("💔 Dealing with Suffering", variant="secondary", size="sm")
|
1643 |
+
# practice_btn = gr.Button("🧘 Spiritual Practice", variant="secondary", size="sm")
|
1644 |
+
# confused_btn = gr.Button("❓ Feeling Confused", variant="secondary", size="sm")
|
1645 |
+
|
1646 |
+
# return {
|
1647 |
+
# 'purpose_btn': purpose_btn,
|
1648 |
+
# 'anxiety_btn': anxiety_btn,
|
1649 |
+
# 'relationship_btn': relationship_btn,
|
1650 |
+
# 'dharma_btn': dharma_btn,
|
1651 |
+
# 'karma_btn': karma_btn,
|
1652 |
+
# 'suffering_btn': suffering_btn,
|
1653 |
+
# 'practice_btn': practice_btn,
|
1654 |
+
# 'confused_btn': confused_btn
|
1655 |
+
# }
|
1656 |
+
|
1657 |
+
# def setup_tag_button_handlers(buttons, question_input, response_output, sources_output):
|
1658 |
+
# """Setup click handlers for tag buttons"""
|
1659 |
+
|
1660 |
+
# def ask_purpose_question():
|
1661 |
+
# question = "I feel lost and don't know my life's purpose. How can I find my dharma and calling in life?"
|
1662 |
+
# response, sources = process_question_ui(question)
|
1663 |
+
# return question, response, sources
|
1664 |
+
|
1665 |
+
# def ask_anxiety_question():
|
1666 |
+
# question = "I'm struggling with anxiety and constant worry. How can I find inner peace according to Vedic teachings?"
|
1667 |
+
# response, sources = process_question_ui(question)
|
1668 |
+
# return question, response, sources
|
1669 |
+
|
1670 |
+
# def ask_relationship_question():
|
1671 |
+
# question = "I'm having conflicts in my relationships. How should I handle difficult people with dharmic principles?"
|
1672 |
+
# response, sources = process_question_ui(question)
|
1673 |
+
# return question, response, sources
|
1674 |
+
|
1675 |
+
# def ask_dharma_question():
|
1676 |
+
# question = "I'm facing a moral dilemma and don't know what's right. How do I understand my dharma?"
|
1677 |
+
# response, sources = process_question_ui(question)
|
1678 |
+
# return question, response, sources
|
1679 |
+
|
1680 |
+
# def ask_karma_question():
|
1681 |
+
# question = "I want to understand karma better. How does it work in daily life and relationships?"
|
1682 |
+
# response, sources = process_question_ui(question)
|
1683 |
+
# return question, response, sources
|
1684 |
+
|
1685 |
+
# def ask_suffering_question():
|
1686 |
+
# question = "I'm going through a very difficult time and suffering. What is the spiritual meaning of suffering?"
|
1687 |
+
# response, sources = process_question_ui(question)
|
1688 |
+
# return question, response, sources
|
1689 |
+
|
1690 |
+
# def ask_practice_question():
|
1691 |
+
# question = "How should I start and maintain a spiritual practice? What does the Bhagavad Gita teach about this?"
|
1692 |
+
# response, sources = process_question_ui(question)
|
1693 |
+
# return question, response, sources
|
1694 |
+
|
1695 |
+
# def ask_confused_question():
|
1696 |
+
# question = "I feel completely confused about life and spirituality. Where do I even begin my spiritual journey?"
|
1697 |
+
# response, sources = process_question_ui(question)
|
1698 |
+
# return question, response, sources
|
1699 |
+
|
1700 |
+
# # Set up click handlers
|
1701 |
+
# buttons['purpose_btn'].click(
|
1702 |
+
# fn=ask_purpose_question,
|
1703 |
+
# outputs=[question_input, response_output, sources_output]
|
1704 |
+
# )
|
1705 |
+
|
1706 |
+
# buttons['anxiety_btn'].click(
|
1707 |
+
# fn=ask_anxiety_question,
|
1708 |
+
# outputs=[question_input, response_output, sources_output]
|
1709 |
+
# )
|
1710 |
+
|
1711 |
+
# buttons['relationship_btn'].click(
|
1712 |
+
# fn=ask_relationship_question,
|
1713 |
+
# outputs=[question_input, response_output, sources_output]
|
1714 |
+
# )
|
1715 |
+
|
1716 |
+
# buttons['dharma_btn'].click(
|
1717 |
+
# fn=ask_dharma_question,
|
1718 |
+
# outputs=[question_input, response_output, sources_output]
|
1719 |
+
# )
|
1720 |
+
|
1721 |
+
# buttons['karma_btn'].click(
|
1722 |
+
# fn=ask_karma_question,
|
1723 |
+
# outputs=[question_input, response_output, sources_output]
|
1724 |
+
# )
|
1725 |
+
|
1726 |
+
# buttons['suffering_btn'].click(
|
1727 |
+
# fn=ask_suffering_question,
|
1728 |
+
# outputs=[question_input, response_output, sources_output]
|
1729 |
+
# )
|
1730 |
+
|
1731 |
+
# buttons['practice_btn'].click(
|
1732 |
+
# fn=ask_practice_question,
|
1733 |
+
# outputs=[question_input, response_output, sources_output]
|
1734 |
+
# )
|
1735 |
+
|
1736 |
+
# buttons['confused_btn'].click(
|
1737 |
+
# fn=ask_confused_question,
|
1738 |
+
# outputs=[question_input, response_output, sources_output]
|
1739 |
+
# )
|
1740 |
+
|
1741 |
+
# daily_wisdom_btn.click(
|
1742 |
+
# fn=get_daily_wisdom_ui,
|
1743 |
+
# outputs=[response_output, sources_output]
|
1744 |
+
# )
|
1745 |
+
|
1746 |
+
# explain_karma_btn.click(
|
1747 |
+
# fn=explain_karma_ui,
|
1748 |
+
# outputs=[response_output, sources_output]
|
1749 |
+
# )
|
1750 |
+
|
1751 |
+
# explain_dharma_btn.click(
|
1752 |
+
# fn=explain_dharma_ui,
|
1753 |
+
# outputs=[response_output, sources_output]
|
1754 |
+
# )
|
1755 |
+
|
1756 |
+
# # Footer
|
1757 |
+
# gr.Markdown(
|
1758 |
+
# """
|
1759 |
+
# ---
|
1760 |
+
|
1761 |
+
# ### 🙏 About KarmaCheck
|
1762 |
+
|
1763 |
+
# KarmaCheck combines ancient Vedic wisdom with modern AI to provide spiritual guidance for contemporary life.
|
1764 |
+
# The system uses RAG (Retrieval-Augmented Generation) to find relevant teachings from scriptures like the
|
1765 |
+
# Bhagavad Gita and Upanishads, then provides contextual guidance through advanced language models.
|
1766 |
+
|
1767 |
+
# **Features:**
|
1768 |
+
# - 🔮 Spiritual guidance based on Vedic principles
|
1769 |
+
# - 📚 Direct quotes from sacred texts
|
1770 |
+
# - 🤖 MCP server for Claude Desktop integration
|
1771 |
+
# - 🌟 Daily wisdom and concept explanations
|
1772 |
+
# - ⚖️ Ethical dilemma analysis
|
1773 |
+
|
1774 |
+
# *"सर्वे भवन्तु सुखिनः सर्वे सन्तु निरामयाः।
|
1775 |
+
# सर्वे भद्राणि पश्यन्तु मा कश्चिद्दुःखभाग्भवेत्॥"*
|
1776 |
+
|
1777 |
+
# *"May all beings be happy, may all beings be healthy.
|
1778 |
+
# May all beings experience prosperity, may none suffer."*
|
1779 |
+
|
1780 |
+
# ---
|
1781 |
+
|
1782 |
+
# Built with ❤️ using Gradio, LlamaIndex, and Hugging Face
|
1783 |
+
# """
|
1784 |
+
# )
|
1785 |
+
|
1786 |
+
# return interface
|
1787 |
+
|
1788 |
+
async def run_mcp_server():
|
1789 |
+
"""Run the MCP server"""
|
1790 |
+
if not MCP_AVAILABLE:
|
1791 |
+
print("❌ MCP not available. Install with: pip install mcp")
|
1792 |
+
return
|
1793 |
+
|
1794 |
+
logger.info("🔧 Starting KarmaCheck MCP Server...")
|
1795 |
+
|
1796 |
+
# Initialize the system for MCP
|
1797 |
+
try:
|
1798 |
+
initialize_system()
|
1799 |
+
logger.info("✅ KarmaCheck system initialized for MCP")
|
1800 |
+
except Exception as e:
|
1801 |
+
logger.error(f"❌ Failed to initialize system: {e}")
|
1802 |
+
return
|
1803 |
+
|
1804 |
+
# Import MCP server utilities
|
1805 |
+
from mcp.server.stdio import stdio_server
|
1806 |
+
|
1807 |
+
async with stdio_server() as (read_stream, write_stream):
|
1808 |
+
await app.run(
|
1809 |
+
read_stream,
|
1810 |
+
write_stream,
|
1811 |
+
InitializationOptions(
|
1812 |
+
server_name="karmacheck",
|
1813 |
+
server_version="1.0.0",
|
1814 |
+
capabilities=app.get_capabilities(
|
1815 |
+
notification_options=NotificationOptions(),
|
1816 |
+
experimental_capabilities={},
|
1817 |
+
),
|
1818 |
+
),
|
1819 |
+
)
|
1820 |
+
|
1821 |
+
def main():
|
1822 |
+
"""Main entry point"""
|
1823 |
+
# Check for MCP mode
|
1824 |
+
if "--mcp" in sys.argv:
|
1825 |
+
if not MCP_AVAILABLE:
|
1826 |
+
print("❌ MCP not installed. Install with: pip install mcp")
|
1827 |
+
sys.exit(1)
|
1828 |
+
|
1829 |
+
# Run MCP server
|
1830 |
+
asyncio.run(run_mcp_server())
|
1831 |
+
return
|
1832 |
+
|
1833 |
+
try:
|
1834 |
+
# Check for required environment variable
|
1835 |
+
hf_token = os.getenv("HUGGINGFACE_API_TOKEN")
|
1836 |
+
if not hf_token:
|
1837 |
+
print("\n" + "="*70)
|
1838 |
+
print("🚨 SETUP REQUIRED:")
|
1839 |
+
print("1. Get a Claude API token: https://console.anthropic.com/")
|
1840 |
+
print("2. Create a .env file with: CLAUDE_API_TOKEN=your_token_here")
|
1841 |
+
print("3. Or set environment variable: export CLAUDE_API_TOKEN=your_token")
|
1842 |
+
# print("1. Get a Hugging Face API token: https://huggingface.co/settings/tokens")
|
1843 |
+
# print("2. Create a .env file with: HUGGINGFACE_API_TOKEN=your_token_here")
|
1844 |
+
# print("3. Or set environment variable: export HUGGINGFACE_API_TOKEN=your_token")
|
1845 |
+
print("\n📋 For Claude Desktop MCP integration:")
|
1846 |
+
print("4. Install MCP: pip install mcp")
|
1847 |
+
print("5. Add this to your Claude Desktop MCP settings:")
|
1848 |
+
print("""
|
1849 |
+
{
|
1850 |
+
"karmacheck": {
|
1851 |
+
"command": "python",
|
1852 |
+
"args": ["path/to/karma_check.py", "--mcp"],
|
1853 |
+
"env": {"HUGGINGFACE_API_TOKEN": "your_token_here"}
|
1854 |
+
}
|
1855 |
+
}""")
|
1856 |
+
print("="*70)
|
1857 |
+
return
|
1858 |
+
|
1859 |
+
# Initialize the system
|
1860 |
+
logger.info("🕉️ Initializing KarmaCheck...")
|
1861 |
+
initialize_system()
|
1862 |
+
|
1863 |
+
# Create and launch interface
|
1864 |
+
interface = create_interface()
|
1865 |
+
|
1866 |
+
logger.info("🚀 Launching KarmaCheck Gradio interface...")
|
1867 |
+
logger.info("📱 Web UI: http://localhost:7860")
|
1868 |
+
|
1869 |
+
if MCP_AVAILABLE:
|
1870 |
+
logger.info("🔧 MCP Server: Ready for Claude Desktop integration")
|
1871 |
+
logger.info(" Use --mcp flag to run in MCP server mode")
|
1872 |
+
else:
|
1873 |
+
logger.info("⚠️ MCP not installed. Install with 'pip install mcp' for Claude Desktop integration")
|
1874 |
+
|
1875 |
+
# Launch Gradio interface
|
1876 |
+
interface.launch(
|
1877 |
+
share=True, # Creates public URL for sharing
|
1878 |
+
server_name="127.0.0.1", # Localhost access
|
1879 |
+
server_port=7860,
|
1880 |
+
show_error=True,
|
1881 |
+
inbrowser=True # Automatically opens browser
|
1882 |
+
)
|
1883 |
+
|
1884 |
+
except Exception as e:
|
1885 |
+
logger.error(f"❌ Application error: {e}")
|
1886 |
+
print(f"\n❌ Error: {e}")
|
1887 |
+
print("\n💡 Troubleshooting:")
|
1888 |
+
print("- Ensure HUGGINGFACE_API_TOKEN is set correctly")
|
1889 |
+
print("- Check your internet connection")
|
1890 |
+
print("- Verify all dependencies are installed: pip install -r requirements.txt")
|
1891 |
+
|
1892 |
+
if __name__ == "__main__":
|
1893 |
+
main()
|
requirements.txt
ADDED
Binary file (434 Bytes). View file
|
|
start.bat
ADDED
Binary file (932 Bytes). View file
|
|
start.sh
ADDED
Binary file (910 Bytes). View file
|
|
storage/default__vector_store.json
ADDED
Binary file (24.6 kB). View file
|
|
storage/docstore.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"docstore/metadata": {"ad2bddc1-18cd-4ca7-98d2-9c66f07d12de": {"doc_hash": "c48d32f6e658fef8faa2792588189e7e496f577f5bfc5a5cb07744771de83795"}, "d9e0f86e-7096-4963-917b-68a03489293d": {"doc_hash": "f0e65547cab02d4764ca33f27132feaa24f50f426b87f8edc3a1aef1d6be1477"}, "85b34051-fb9f-487f-b1be-63e16a9ee90b": {"doc_hash": "7a504b7acaa7a52b0f31b55928d6b515e792dd21c8934075f5f75162f6eda9a2"}, "5eaf8bd3-d701-437b-bf58-7bb609a04855": {"doc_hash": "e0aaa1da20e54a0235dd912047deb7dd24e580a81b941fdbc2e871f030b763b8", "ref_doc_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de"}, "1bfbea62-357e-44d7-9592-46bb78631ce3": {"doc_hash": "a5201e93dcb1c83786d87e541d8fc4f5e033df45d3890a7f8ab227e0ce6cd467", "ref_doc_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de"}, "9d83f571-9ba5-43c3-b848-caf3d9a865a5": {"doc_hash": "ccbb27b7956dc48b134b614dfd9b46cfad1a419846ef56958630c9dd51f4e57b", "ref_doc_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de"}, "9b560e61-d3b9-40f9-adbf-d2c7fa7e8f31": {"doc_hash": "53b68ce35ee9c5b3b140784dc10e47bd22d5e51909cff5559510002384fca5eb", "ref_doc_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de"}, "d33da1de-24bb-47b5-b722-b8247b8bbd0b": {"doc_hash": "4cf9d0c71dd327d4258b6aea366672147ca529ccf4c01fcb581ea7c78869ceb1", "ref_doc_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de"}, "ce4f0a05-6efa-409e-9489-3846cccf22e0": {"doc_hash": "2566bcd56278b5fa4a875a75b2a8fe84a83ea3bc6c815595162f3d1518d8ff92", "ref_doc_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de"}, "1d02f8b1-7248-4e8c-9e3b-7a9942ca8b69": {"doc_hash": "59e023756a2516581822cde3841965f462e14eceebee9645f4d26c6cd033e3e3", "ref_doc_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de"}, "26861f35-1920-4675-a9fa-90ab733ae51d": {"doc_hash": "70f6784f86d75ffacfee353e13014e543378f22844735eeb4c4e8aa06f11061f", "ref_doc_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de"}, "7107627a-d1ee-406b-9be3-664551dadd24": {"doc_hash": "442d5733218db8d39f33ebf0f2ac62d6d83dd174ab0ce114eb68edb1a501033e", "ref_doc_id": "d9e0f86e-7096-4963-917b-68a03489293d"}, "43d3d377-b087-46d2-a762-f328854a22a8": {"doc_hash": "61efce2f1d4a852c9723c07b1218551d1a48fba4bdc7eab3d3d1e37b51dbcab3", "ref_doc_id": "d9e0f86e-7096-4963-917b-68a03489293d"}, "fa754bc1-bd7c-4ce5-8ca8-3bf6769293f4": {"doc_hash": "ea2fd841d72b766dea00e9b7f3a097a990bc3d491d5df305a374bb66882bb50a", "ref_doc_id": "d9e0f86e-7096-4963-917b-68a03489293d"}, "3721e277-b47a-4f95-a874-034a2d081dc2": {"doc_hash": "557c0e8c2d7b5e887f935515b6c6009b7f606e2366539313c730fb6704d8b286", "ref_doc_id": "d9e0f86e-7096-4963-917b-68a03489293d"}, "e9db7036-fc30-47e3-bec0-dec33d5207d2": {"doc_hash": "ffb38303cdc87b99d8fa4f3622015cb083ebc33f0306b734779273d67933f6bd", "ref_doc_id": "85b34051-fb9f-487f-b1be-63e16a9ee90b"}, "a0c899c4-83a1-40c4-b116-4444b7cd88d2": {"doc_hash": "7e79ddad5424245002185b5548015dba7ff54333322bd13f6ec82b640ea57f90", "ref_doc_id": "85b34051-fb9f-487f-b1be-63e16a9ee90b"}, "2b544526-41fb-4ee0-b3a9-b4262d9b537b": {"doc_hash": "ce1410ddf63830dd3287a3ec0611a4f76800d548a31c435e22bae7c3e28c4b65", "ref_doc_id": "85b34051-fb9f-487f-b1be-63e16a9ee90b"}, "58090c0a-33d2-4d6d-8133-9a1236c2e57a": {"doc_hash": "74e902332ecc3f6e53c5d29bca1f9e08d3b9138f80023ca602a80cbc06b961e6", "ref_doc_id": "85b34051-fb9f-487f-b1be-63e16a9ee90b"}}, "docstore/data": {"5eaf8bd3-d701-437b-bf58-7bb609a04855": {"__data__": {"id_": "5eaf8bd3-d701-437b-bf58-7bb609a04855", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "c48d32f6e658fef8faa2792588189e7e496f577f5bfc5a5cb07744771de83795", "class_name": "RelatedNodeInfo"}, "3": {"node_id": "1bfbea62-357e-44d7-9592-46bb78631ce3", "node_type": "1", "metadata": {}, "hash": "c1a13d4d5acf660b3584843234a07841040688f2850a54c4e55dd5141d78e091", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "Bhagavad Gita Chapter 1, Verse 28-29:\r\n\u0905\u0930\u094d\u091c\u0941\u0928 \u0909\u0935\u093e\u091a - \u0926\u0943\u0937\u094d\u091f\u094d\u0935\u0947\u092e\u0902 \u0938\u094d\u0935\u091c\u0928\u0902 \u0915\u0943\u0937\u094d\u0923 \u092f\u0941\u092f\u0941\u0924\u094d\u0938\u0941\u0902 \u0938\u092e\u0941\u092a\u0938\u094d\u0925\u093f\u0924\u092e\u094d\u0964\r\n\u0938\u0940\u0926\u0928\u094d\u0924\u093f \u092e\u092e \u0917\u093e\u0924\u094d\u0930\u093e\u0923\u093f \u092e\u0941\u0916\u0902 \u091a \u092a\u0930\u093f\u0936\u0941\u0937\u094d\u092f\u0924\u093f\u0965\r\n\r\n\"Arjuna said: O Krishna, seeing my own people arrayed for battle and eager to fight, my limbs grow weak and my mouth becomes dry.\"\r\n\r\nCommentary: This verse captures the universal human experience of anxiety when facing difficult decisions or conflicts. Arjuna's physical symptoms - weakness and dry mouth - are the same stress responses we experience today when confronted with challenging situations. This teaches us that even great warriors and spiritual seekers face moments of doubt and anxiety.\r\n\r\nKeywords: anxiety, stress, difficult decisions, fear, overwhelming situations, physical symptoms of worry\r\n\r\n---\r\n\r\nBhagavad Gita Chapter 2, Verse 11-12:\r\n\u0936\u094d\u0930\u0940\u092d\u0917\u0935\u093e\u0928\u0941\u0935\u093e\u091a - \u0905\u0936\u094b\u091a\u094d\u092f\u093e\u0928\u0928\u094d\u0935\u0936\u094b\u091a\u0938\u094d\u0924\u094d\u0935\u0902 \u092a\u094d\u0930\u091c\u094d\u091e\u093e\u0935\u093e\u0926\u093e\u0902\u0936\u094d\u091a \u092d\u093e\u0937\u0938\u0947\u0964\r\n\u0917\u0924\u093e\u0938\u0942\u0928\u0917\u0924\u093e\u0938\u0942\u0902\u0936\u094d\u091a \u0928\u093e\u0928\u0941\u0936\u094b\u091a\u0928\u094d\u0924\u093f \u092a\u0923\u094d\u0921\u093f\u0924\u093e\u0903\u0965\r\n\r\n\"The Supreme Lord said: While speaking learned words, you are mourning for what is not worthy of grief. Those who are wise lament neither for the living nor for the dead.\"\r\n\r\nCommentary: Krishna teaches about the eternal nature of the soul and the futility of excessive grief over temporary circumstances. This doesn't mean being emotionless, but rather understanding the deeper reality beyond surface appearances. In modern terms, this helps us deal with loss, change, and life transitions with greater equanimity.", "mimetype": "text/plain", "start_char_idx": 0, "end_char_idx": 1419, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "1bfbea62-357e-44d7-9592-46bb78631ce3": {"__data__": {"id_": "1bfbea62-357e-44d7-9592-46bb78631ce3", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "c48d32f6e658fef8faa2792588189e7e496f577f5bfc5a5cb07744771de83795", "class_name": "RelatedNodeInfo"}, "2": {"node_id": "5eaf8bd3-d701-437b-bf58-7bb609a04855", "node_type": "1", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "e0aaa1da20e54a0235dd912047deb7dd24e580a81b941fdbc2e871f030b763b8", "class_name": "RelatedNodeInfo"}, "3": {"node_id": "9d83f571-9ba5-43c3-b848-caf3d9a865a5", "node_type": "1", "metadata": {}, "hash": "92623e4a87429bbcf0b0397c7e76473962841282390af2a6f7ffbbf476b98c77", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "This doesn't mean being emotionless, but rather understanding the deeper reality beyond surface appearances. In modern terms, this helps us deal with loss, change, and life transitions with greater equanimity.\r\n\r\nKeywords: grief, loss, wise perspective, death, change, emotional balance, letting go\r\n\r\n---\r\n\r\nBhagavad Gita Chapter 2, Verse 47:\r\n\u0915\u0930\u094d\u092e\u0923\u094d\u092f\u0947\u0935\u093e\u0927\u093f\u0915\u093e\u0930\u0938\u094d\u0924\u0947 \u092e\u093e \u092b\u0932\u0947\u0937\u0941 \u0915\u0926\u093e\u091a\u0928\u0964\r\n\u092e\u093e \u0915\u0930\u094d\u092e\u092b\u0932\u0939\u0947\u0924\u0941\u0930\u094d\u092d\u0942\u0930\u094d\u092e\u093e \u0924\u0947 \u0938\u0919\u094d\u0917\u094b\u093d\u0938\u094d\u0924\u094d\u0935\u0915\u0930\u094d\u092e\u0923\u093f\u0965\r\n\r\n\"You have a right to perform your prescribed duty, but not to the fruits of action. Never consider yourself the cause of the results of your activities, and never be attached to not doing your duty.\"\r\n\r\nCommentary: This is the foundational principle of Karma Yoga - performing action without attachment to results. In modern life, this means doing your best at work, in relationships, and in personal growth, while releasing anxiety about outcomes. Focus on the process, not the results. This reduces stress and increases effectiveness.\r\n\r\nKeywords: duty, work, action without attachment, letting go of results, stress reduction, focus on process\r\n\r\n---\r\n\r\nBhagavad Gita Chapter 2, Verse 62-63:\r\n\u0927\u094d\u092f\u093e\u092f\u0924\u094b \u0935\u093f\u0937\u092f\u093e\u0928\u094d\u092a\u0941\u0902\u0938\u0903 \u0938\u0919\u094d\u0917\u0938\u094d\u0924\u0947\u0937\u0942\u092a\u091c\u093e\u092f\u0924\u0947\u0964\r\n\u0938\u0919\u094d\u0917\u093e\u0924\u094d\u0938\u091e\u094d\u091c\u093e\u092f\u0924\u0947 \u0915\u093e\u092e\u0903 \u0915\u093e\u092e\u093e\u0924\u094d\u0915\u094d\u0930\u094b\u0927\u094b\u093d\u092d\u093f\u091c\u093e\u092f\u0924\u0947\u0965\r\n\r\n\"While contemplating the objects of the senses, a person develops attachment for them, and from such attachment lust develops, and from lust anger arises.\"\r\n\r\nCommentary: This verse explains the psychology of desire and how it leads to suffering. When we constantly think about what we want - material possessions, relationships, status - we develop attachment. This attachment breeds craving, and when we don't get what we want, frustration and anger arise.", "mimetype": "text/plain", "start_char_idx": 1210, "end_char_idx": 2879, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "9d83f571-9ba5-43c3-b848-caf3d9a865a5": {"__data__": {"id_": "9d83f571-9ba5-43c3-b848-caf3d9a865a5", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "c48d32f6e658fef8faa2792588189e7e496f577f5bfc5a5cb07744771de83795", "class_name": "RelatedNodeInfo"}, "2": {"node_id": "1bfbea62-357e-44d7-9592-46bb78631ce3", "node_type": "1", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "a5201e93dcb1c83786d87e541d8fc4f5e033df45d3890a7f8ab227e0ce6cd467", "class_name": "RelatedNodeInfo"}, "3": {"node_id": "9b560e61-d3b9-40f9-adbf-d2c7fa7e8f31", "node_type": "1", "metadata": {}, "hash": "ca393b0e7b0c72137d01b1f51a70a94975c21ee3cf1bfbc00be977b1e27c0505", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "When we constantly think about what we want - material possessions, relationships, status - we develop attachment. This attachment breeds craving, and when we don't get what we want, frustration and anger arise. The solution is mindful awareness of our thought patterns.\r\n\r\nKeywords: desire, attachment, anger, frustration, mindfulness, mental patterns, craving\r\n\r\n---\r\n\r\nBhagavad Gita Chapter 3, Verse 8:\r\n\u0928\u093f\u092f\u0924\u0902 \u0915\u0941\u0930\u0941 \u0915\u0930\u094d\u092e \u0924\u094d\u0935\u0902 \u0915\u0930\u094d\u092e \u091c\u094d\u092f\u093e\u092f\u094b \u0939\u094d\u092f\u0915\u0930\u094d\u092e\u0923\u0903\u0964\r\n\u0936\u0930\u0940\u0930\u092f\u093e\u0924\u094d\u0930\u093e\u092a\u093f \u091a \u0924\u0947 \u0928 \u092a\u094d\u0930\u0938\u093f\u0926\u094d\u0927\u094d\u092f\u0947\u0926\u0915\u0930\u094d\u092e\u0923\u0903\u0965\r\n\r\n\"Perform your prescribed duty, for action is better than inaction. A man cannot even maintain his physical body without work.\"\r\n\r\nCommentary: This verse emphasizes the importance of purposeful action over paralysis or inactivity. In modern terms, this addresses procrastination, depression, and the tendency to withdraw from life's responsibilities. Even small, consistent actions are better than being overwhelmed into inaction.\r\n\r\nKeywords: action vs inaction, procrastination, depression, responsibility, purposeful living, consistent effort\r\n\r\n---\r\n\r\nBhagavad Gita Chapter 3, Verse 21:\r\n\u092f\u0926\u094d\u092f\u0926\u093e\u091a\u0930\u0924\u093f \u0936\u094d\u0930\u0947\u0937\u094d\u0920\u0938\u094d\u0924\u0924\u094d\u0924\u0926\u0947\u0935\u0947\u0924\u0930\u094b \u091c\u0928\u0903\u0964\r\n\u0938 \u092f\u0924\u094d\u092a\u094d\u0930\u092e\u093e\u0923\u0902 \u0915\u0941\u0930\u0941\u0924\u0947 \u0932\u094b\u0915\u0938\u094d\u0924\u0926\u0928\u0941\u0935\u0930\u094d\u0924\u0924\u0947\u0965\r\n\r\n\"Whatever action a great person performs, common people follow. And whatever standards such leaders set by exemplary acts, all the world pursues.\"\r\n\r\nCommentary: This teaches about the responsibility of leadership and influence. Everyone is a leader in some capacity - as a parent, colleague, friend, or community member. Our actions ripple outward and influence others. Therefore, we should strive to be examples of the values we want to see in the world.", "mimetype": "text/plain", "start_char_idx": 2668, "end_char_idx": 4288, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "9b560e61-d3b9-40f9-adbf-d2c7fa7e8f31": {"__data__": {"id_": "9b560e61-d3b9-40f9-adbf-d2c7fa7e8f31", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "c48d32f6e658fef8faa2792588189e7e496f577f5bfc5a5cb07744771de83795", "class_name": "RelatedNodeInfo"}, "2": {"node_id": "9d83f571-9ba5-43c3-b848-caf3d9a865a5", "node_type": "1", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "ccbb27b7956dc48b134b614dfd9b46cfad1a419846ef56958630c9dd51f4e57b", "class_name": "RelatedNodeInfo"}, "3": {"node_id": "d33da1de-24bb-47b5-b722-b8247b8bbd0b", "node_type": "1", "metadata": {}, "hash": "5b083e22a1b7d700e5cd018ae27916f3df6a35fc1809e838de34b41292dbbfb0", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "Everyone is a leader in some capacity - as a parent, colleague, friend, or community member. Our actions ripple outward and influence others. Therefore, we should strive to be examples of the values we want to see in the world.\r\n\r\nKeywords: leadership, influence, example, responsibility, role model, social impact, integrity\r\n\r\n---\r\n\r\nBhagavad Gita Chapter 4, Verse 18:\r\n\u0915\u0930\u094d\u092e\u0923\u094d\u092f\u0915\u0930\u094d\u092e \u092f\u0903 \u092a\u0936\u094d\u092f\u0947\u0926\u0915\u0930\u094d\u092e\u0923\u093f \u091a \u0915\u0930\u094d\u092e \u092f\u0903\u0964\r\n\u0938 \u092c\u0941\u0926\u094d\u0927\u093f\u092e\u093e\u0928\u094d\u092e\u0928\u0941\u0937\u094d\u092f\u0947\u0937\u0941 \u0938 \u092f\u0941\u0915\u094d\u0924\u0903 \u0915\u0943\u0924\u094d\u0938\u094d\u0928\u0915\u0930\u094d\u092e\u0915\u0943\u0924\u094d\u0965\r\n\r\n\"One who can see inaction in action, and action in inaction, is intelligent among humans and is in the transcendental position, although engaged in all sorts of activities.\"\r\n\r\nCommentary: This verse points to a profound understanding of action and non-action. The wise person performs necessary duties without ego-involvement, maintaining inner stillness even while being active. This is the secret of working without stress - being fully engaged yet internally detached.\r\n\r\nKeywords: intelligent action, inner stillness, working without stress, transcendence, balance, ego-free action\r\n\r\n---\r\n\r\nBhagavad Gita Chapter 6, Verse 5:\r\n\u0909\u0926\u094d\u0927\u0930\u0947\u0926\u093e\u0924\u094d\u092e\u0928\u093e\u0924\u094d\u092e\u093e\u0928\u0902 \u0928\u093e\u0924\u094d\u092e\u093e\u0928\u092e\u0935\u0938\u093e\u0926\u092f\u0947\u0924\u094d\u0964\r\n\u0906\u0924\u094d\u092e\u0948\u0935 \u0939\u094d\u092f\u093e\u0924\u094d\u092e\u0928\u094b \u092c\u0928\u094d\u0927\u0941\u0930\u093e\u0924\u094d\u092e\u0948\u0935 \u0930\u093f\u092a\u0941\u0930\u093e\u0924\u094d\u092e\u0928\u0903\u0965\r\n\r\n\"One must deliver oneself with the help of one's mind, and not degrade oneself. The mind is the friend of the conditioned soul, and his enemy as well.\"\r\n\r\nCommentary: This verse emphasizes personal responsibility for spiritual and psychological development. Your mind can be your greatest ally or your worst enemy, depending on how you train it.", "mimetype": "text/plain", "start_char_idx": 4061, "end_char_idx": 5586, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "d33da1de-24bb-47b5-b722-b8247b8bbd0b": {"__data__": {"id_": "d33da1de-24bb-47b5-b722-b8247b8bbd0b", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "c48d32f6e658fef8faa2792588189e7e496f577f5bfc5a5cb07744771de83795", "class_name": "RelatedNodeInfo"}, "2": {"node_id": "9b560e61-d3b9-40f9-adbf-d2c7fa7e8f31", "node_type": "1", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "53b68ce35ee9c5b3b140784dc10e47bd22d5e51909cff5559510002384fca5eb", "class_name": "RelatedNodeInfo"}, "3": {"node_id": "ce4f0a05-6efa-409e-9489-3846cccf22e0", "node_type": "1", "metadata": {}, "hash": "f853589eed204e9daa36d1845a3b626ef84a25e79f5373e5a51857cf2084df03", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "Commentary: This verse emphasizes personal responsibility for spiritual and psychological development. Your mind can be your greatest ally or your worst enemy, depending on how you train it. Through practices like meditation, positive thinking, and self-awareness, you can make your mind your friend rather than your enemy.\r\n\r\nKeywords: self-help, mind control, mental training, meditation, self-awareness, personal responsibility, inner work\r\n\r\n---\r\n\r\nBhagavad Gita Chapter 6, Verse 17:\r\n\u092f\u0941\u0915\u094d\u0924\u093e\u0939\u093e\u0930\u0935\u093f\u0939\u093e\u0930\u0938\u094d\u092f \u092f\u0941\u0915\u094d\u0924\u091a\u0947\u0937\u094d\u091f\u0938\u094d\u092f \u0915\u0930\u094d\u092e\u0938\u0941\u0964\r\n\u092f\u0941\u0915\u094d\u0924\u0938\u094d\u0935\u092a\u094d\u0928\u093e\u0935\u092c\u094b\u0927\u0938\u094d\u092f \u092f\u094b\u0917\u094b \u092d\u0935\u0924\u093f \u0926\u0941\u0903\u0916\u0939\u093e\u0965\r\n\r\n\"He who is moderate in his eating, sleeping, recreation and work can mitigate all material suffering by practicing the yoga system.\"\r\n\r\nCommentary: This verse teaches the importance of balance and moderation in daily life. Extremes in any area - whether eating, sleeping, working, or playing - create suffering. A balanced lifestyle is itself a spiritual practice that reduces suffering and supports inner peace.\r\n\r\nKeywords: balance, moderation, healthy lifestyle, work-life balance, reducing suffering, practical spirituality\r\n\r\n---\r\n\r\nBhagavad Gita Chapter 6, Verse 26:\r\n\u092f\u0924\u094b \u092f\u0924\u094b \u0928\u093f\u0936\u094d\u091a\u0930\u0924\u093f \u092e\u0928\u0936\u094d\u091a\u091e\u094d\u091a\u0932\u092e\u0938\u094d\u0925\u093f\u0930\u092e\u094d\u0964\r\n\u0924\u0924\u0938\u094d\u0924\u0924\u094b \u0928\u093f\u092f\u092e\u094d\u092f\u0948\u0924\u0926\u093e\u0924\u094d\u092e\u0928\u094d\u092f\u0947\u0935 \u0935\u0936\u0902 \u0928\u092f\u0947\u0924\u094d\u0965\r\n\r\n\"Whenever the restless and unsteady mind wanders away from the focus of meditation, one should gently bring it back and fix it on the Self.\"\r\n\r\nCommentary: This is perhaps the most practical instruction for meditation and mindfulness. The mind will wander - this is normal and expected. The practice is in gently, without judgment, bringing attention back to your chosen focus. This applies not just to formal meditation but to staying present throughout daily life.", "mimetype": "text/plain", "start_char_idx": 5396, "end_char_idx": 7085, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "ce4f0a05-6efa-409e-9489-3846cccf22e0": {"__data__": {"id_": "ce4f0a05-6efa-409e-9489-3846cccf22e0", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "c48d32f6e658fef8faa2792588189e7e496f577f5bfc5a5cb07744771de83795", "class_name": "RelatedNodeInfo"}, "2": {"node_id": "d33da1de-24bb-47b5-b722-b8247b8bbd0b", "node_type": "1", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "4cf9d0c71dd327d4258b6aea366672147ca529ccf4c01fcb581ea7c78869ceb1", "class_name": "RelatedNodeInfo"}, "3": {"node_id": "1d02f8b1-7248-4e8c-9e3b-7a9942ca8b69", "node_type": "1", "metadata": {}, "hash": "50a86bb50978047f59a439d65323a4ecc2a2782e146e5d63106f2c4d6549e767", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "The mind will wander - this is normal and expected. The practice is in gently, without judgment, bringing attention back to your chosen focus. This applies not just to formal meditation but to staying present throughout daily life.\r\n\r\nKeywords: meditation, mindfulness, wandering mind, gentle attention, staying present, mental discipline\r\n\r\n---\r\n\r\nBhagavad Gita Chapter 9, Verse 22:\r\n\u0905\u0928\u0928\u094d\u092f\u093e\u0936\u094d\u091a\u093f\u0928\u094d\u0924\u092f\u0928\u094d\u0924\u094b \u092e\u093e\u0902 \u092f\u0947 \u091c\u0928\u093e\u0903 \u092a\u0930\u094d\u092f\u0941\u092a\u093e\u0938\u0924\u0947\u0964\r\n\u0924\u0947\u0937\u093e\u0902 \u0928\u093f\u0924\u094d\u092f\u093e\u092d\u093f\u092f\u0941\u0915\u094d\u0924\u093e\u0928\u093e\u0902 \u092f\u094b\u0917\u0915\u094d\u0937\u0947\u092e\u0902 \u0935\u0939\u093e\u092e\u094d\u092f\u0939\u092e\u094d\u0965\r\n\r\n\"To those who are constantly devoted and who always remember Me with love, I give the understanding by which they can come to Me.\"\r\n\r\nCommentary: This verse speaks to the power of consistent spiritual practice and devotion. When we maintain regular connection with the divine through prayer, meditation, or contemplation, wisdom and guidance naturally arise. This doesn't require blind faith, but rather consistent practice and openness.\r\n\r\nKeywords: devotion, regular practice, spiritual consistency, divine guidance, prayer, meditation, wisdom\r\n\r\n---\r\n\r\nBhagavad Gita Chapter 12, Verse 13-14:\r\n\u0905\u0926\u094d\u0935\u0947\u0937\u094d\u091f\u093e \u0938\u0930\u094d\u0935\u092d\u0942\u0924\u093e\u0928\u093e\u0902 \u092e\u0948\u0924\u094d\u0930\u0903 \u0915\u0930\u0941\u0923 \u090f\u0935 \u091a\u0964\r\n\u0928\u093f\u0930\u094d\u092e\u092e\u094b \u0928\u093f\u0930\u0939\u0919\u094d\u0915\u093e\u0930\u0903 \u0938\u092e\u0926\u0941\u0903\u0916\u0938\u0941\u0916\u0903 \u0915\u094d\u0937\u092e\u0940\u0965\r\n\r\n\"One who is not envious but who is a kind friend to all living entities, who does not think himself a proprietor and is free from false ego, who is equal in both happiness and distress, who is tolerant...\"\r\n\r\nCommentary: This verse describes the qualities of a spiritually mature person. Such a person has moved beyond petty jealousies and ego-driven conflicts. They maintain equanimity in success and failure, treating all beings with kindness. This is an ideal to aspire toward in our relationships and daily interactions.", "mimetype": "text/plain", "start_char_idx": 6854, "end_char_idx": 8532, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "1d02f8b1-7248-4e8c-9e3b-7a9942ca8b69": {"__data__": {"id_": "1d02f8b1-7248-4e8c-9e3b-7a9942ca8b69", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "c48d32f6e658fef8faa2792588189e7e496f577f5bfc5a5cb07744771de83795", "class_name": "RelatedNodeInfo"}, "2": {"node_id": "ce4f0a05-6efa-409e-9489-3846cccf22e0", "node_type": "1", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "2566bcd56278b5fa4a875a75b2a8fe84a83ea3bc6c815595162f3d1518d8ff92", "class_name": "RelatedNodeInfo"}, "3": {"node_id": "26861f35-1920-4675-a9fa-90ab733ae51d", "node_type": "1", "metadata": {}, "hash": "500b1b542878777d60fcd23451f979d5a330539155c71886c1e792973a011047", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "Such a person has moved beyond petty jealousies and ego-driven conflicts. They maintain equanimity in success and failure, treating all beings with kindness. This is an ideal to aspire toward in our relationships and daily interactions.\r\n\r\nKeywords: non-envy, kindness, humility, equanimity, tolerance, spiritual maturity, good relationships\r\n\r\n---\r\n\r\nBhagavad Gita Chapter 15, Verse 7:\r\n\u092e\u092e\u0948\u0935\u093e\u0902\u0936\u094b \u091c\u0940\u0935\u0932\u094b\u0915\u0947 \u091c\u0940\u0935\u092d\u0942\u0924\u0903 \u0938\u0928\u093e\u0924\u0928\u0903\u0964\r\n\u092e\u0928\u0903\u0937\u0937\u094d\u0920\u093e\u0928\u0940\u0928\u094d\u0926\u094d\u0930\u093f\u092f\u093e\u0923\u093f \u092a\u094d\u0930\u0915\u0943\u0924\u093f\u0938\u094d\u0925\u093e\u0928\u093f \u0915\u0930\u094d\u0937\u0924\u093f\u0965\r\n\r\n\"The living entities in this conditioned world are My eternal fragmental parts. Due to conditioned life, they are struggling very hard with the six senses, which include the mind.\"\r\n\r\nCommentary: This verse teaches that all beings are essentially divine at their core. Our struggles come from identification with the body and mind rather than our true spiritual nature. Understanding this helps develop compassion for others and patience with our own spiritual journey. Everyone is doing their best given their level of consciousness.\r\n\r\nKeywords: divine nature, true self, compassion, spiritual journey, patience with others, essential divinity\r\n\r\n---\r\n\r\nBhagavad Gita Chapter 18, Verse 58:\r\n\u092e\u091a\u094d\u091a\u093f\u0924\u094d\u0924\u0903 \u0938\u0930\u094d\u0935\u0926\u0941\u0930\u094d\u0917\u093e\u0923\u093f \u092e\u0924\u094d\u092a\u094d\u0930\u0938\u093e\u0926\u093e\u0924\u094d\u0924\u0930\u093f\u0937\u094d\u092f\u0938\u093f\u0964\r\n\u0905\u0925 \u091a\u0947\u0924\u094d\u0924\u094d\u0935\u092e\u0939\u0919\u094d\u0915\u093e\u0930\u093e\u0928\u094d\u0928 \u0936\u094d\u0930\u094b\u0937\u094d\u092f\u0938\u093f \u0935\u093f\u0928\u0919\u094d\u0915\u094d\u0937\u094d\u092f\u0938\u093f\u0965\r\n\r\n\"If you become conscious of Me, you will pass over all the obstacles of conditioned life by My grace. But if you do not work in such consciousness but act through false ego, you will be lost.\"\r\n\r\nCommentary: This verse speaks to the difference between ego-driven action and surrendered action. When we act from ego, we create more problems and suffering.", "mimetype": "text/plain", "start_char_idx": 8296, "end_char_idx": 9906, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "26861f35-1920-4675-a9fa-90ab733ae51d": {"__data__": {"id_": "26861f35-1920-4675-a9fa-90ab733ae51d", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "ad2bddc1-18cd-4ca7-98d2-9c66f07d12de", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "c48d32f6e658fef8faa2792588189e7e496f577f5bfc5a5cb07744771de83795", "class_name": "RelatedNodeInfo"}, "2": {"node_id": "1d02f8b1-7248-4e8c-9e3b-7a9942ca8b69", "node_type": "1", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "59e023756a2516581822cde3841965f462e14eceebee9645f4d26c6cd033e3e3", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "Commentary: This verse speaks to the difference between ego-driven action and surrendered action. When we act from ego, we create more problems and suffering. When we act with surrender to a higher purpose or divine will, obstacles naturally resolve. This is about aligning with life rather than fighting against it.\r\n\r\nKeywords: divine consciousness, surrender, ego vs higher self, overcoming obstacles, grace, alignment with life\r\n\r\n---\r\n\r\nBhagavad Gita Chapter 18, Verse 66:\r\n\u0938\u0930\u094d\u0935\u0927\u0930\u094d\u092e\u093e\u0928\u094d\u092a\u0930\u093f\u0924\u094d\u092f\u091c\u094d\u092f \u092e\u093e\u092e\u0947\u0915\u0902 \u0936\u0930\u0923\u0902 \u0935\u094d\u0930\u091c\u0964\r\n\u0905\u0939\u0902 \u0924\u094d\u0935\u093e\u0902 \u0938\u0930\u094d\u0935\u092a\u093e\u092a\u0947\u092d\u094d\u092f\u094b \u092e\u094b\u0915\u094d\u0937\u092f\u093f\u0937\u094d\u092f\u093e\u092e\u093f \u092e\u093e \u0936\u0941\u091a\u0903\u0965\r\n\r\n\"Abandon all varieties of religion and just surrender unto Me. I shall deliver you from all sinful reactions. Do not fear.\"\r\n\r\nCommentary: This final instruction of the Gita emphasizes complete trust and surrender to the divine. It doesn't mean abandoning ethical behavior, but rather releasing the ego's need to control everything. When we surrender our fears and anxieties to a higher power, we find peace and guidance. This is about trust in life's process.\r\n\r\nKeywords: surrender, trust, letting go of control, divine protection, overcoming fear, spiritual peace", "mimetype": "text/plain", "start_char_idx": 9748, "end_char_idx": 10882, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "7107627a-d1ee-406b-9be3-664551dadd24": {"__data__": {"id_": "7107627a-d1ee-406b-9be3-664551dadd24", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\dharma_teachings.txt", "file_name": "dharma_teachings.txt", "file_type": "text/plain", "file_size": 8467, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "d9e0f86e-7096-4963-917b-68a03489293d", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\dharma_teachings.txt", "file_name": "dharma_teachings.txt", "file_type": "text/plain", "file_size": 8467, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "f0e65547cab02d4764ca33f27132feaa24f50f426b87f8edc3a1aef1d6be1477", "class_name": "RelatedNodeInfo"}, "3": {"node_id": "43d3d377-b087-46d2-a762-f328854a22a8", "node_type": "1", "metadata": {}, "hash": "7a39f84937f736c7c6a78890046b476ab126c70a907a0b4cb0aee6716f35a2ee", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "On Work and Career Dharma:\r\n\"One's dharma in work is not determined by external success or society's expectations, but by the intersection of one's natural talents, life circumstances, and what serves the greater good. A person may be called to be a teacher, a business leader, a parent, or a service worker - each path is equally sacred when performed with the right intention.\"\r\n\r\nCommentary: In modern times, career confusion often arises from chasing external validation rather than understanding our authentic calling. Dharmic career choices consider: What am I naturally good at? What does the world need? What brings me genuine fulfillment? What allows me to serve others? The answers to these questions point toward your dharma.\r\n\r\nKeywords: career calling, authentic work, natural talents, serving others, right livelihood, dharmic career choices\r\n\r\n---\r\n\r\nOn Relationships and Marriage:\r\n\"In relationships, dharma means treating the other person as a divine being worthy of respect, while maintaining your own integrity and boundaries. Love is not possession or control, but rather creating space for both people to grow spiritually. When conflicts arise, ask: 'How can I respond in a way that honors both of us?'\"\r\n\r\nCommentary: Modern relationships often suffer from ego-based patterns - trying to control, change, or possess the other person. Dharmic relationships are based on mutual respect, spiritual growth, and service. This doesn't mean being passive or having no boundaries, but rather approaching conflicts with wisdom and compassion.\r\n\r\nKeywords: dharmic relationships, mutual respect, spiritual growth together, healthy boundaries, resolving conflicts\r\n\r\n---\r\n\r\nOn Parenting and Family Dharma:\r\n\"A parent's dharma is not to live vicariously through their children or force them into predetermined paths, but to provide love, guidance, and opportunities for the child to discover their own divine nature and unique gifts. Discipline should come from love, not anger. Teaching should come from example, not just words.\"\r\n\r\nCommentary: Modern parenting often becomes about achievement and status rather than character development and spiritual growth. Dharmic parenting focuses on helping children develop wisdom, compassion, and self-knowledge. This means supporting their natural inclinations while teaching important values and life skills.", "mimetype": "text/plain", "start_char_idx": 0, "end_char_idx": 2363, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "43d3d377-b087-46d2-a762-f328854a22a8": {"__data__": {"id_": "43d3d377-b087-46d2-a762-f328854a22a8", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\dharma_teachings.txt", "file_name": "dharma_teachings.txt", "file_type": "text/plain", "file_size": 8467, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "d9e0f86e-7096-4963-917b-68a03489293d", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\dharma_teachings.txt", "file_name": "dharma_teachings.txt", "file_type": "text/plain", "file_size": 8467, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "f0e65547cab02d4764ca33f27132feaa24f50f426b87f8edc3a1aef1d6be1477", "class_name": "RelatedNodeInfo"}, "2": {"node_id": "7107627a-d1ee-406b-9be3-664551dadd24", "node_type": "1", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\dharma_teachings.txt", "file_name": "dharma_teachings.txt", "file_type": "text/plain", "file_size": 8467, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "442d5733218db8d39f33ebf0f2ac62d6d83dd174ab0ce114eb68edb1a501033e", "class_name": "RelatedNodeInfo"}, "3": {"node_id": "fa754bc1-bd7c-4ce5-8ca8-3bf6769293f4", "node_type": "1", "metadata": {}, "hash": "3f5f37cfb1db2a240920b2ad07925991d8812b17d1503bd8e34673bf9a9363e3", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "Dharmic parenting focuses on helping children develop wisdom, compassion, and self-knowledge. This means supporting their natural inclinations while teaching important values and life skills.\r\n\r\nKeywords: dharmic parenting, child's unique gifts, character development, loving discipline, spiritual growth in children\r\n\r\n---\r\n\r\nOn Money and Material Possessions:\r\n\"Wealth is a tool for dharma, not the goal of life. Money should be earned through honest means, used for genuine needs and the welfare of others, and never allowed to become a source of pride or security. The wealthy have a greater responsibility to serve society. The poor should not feel ashamed, as material wealth does not determine spiritual worth.\"\r\n\r\nCommentary: In a materialistic society, it's easy to lose perspective about money. Dharmic relationship with wealth means: earning honestly, spending wisely, saving appropriately, and giving generously. Money should serve life's higher purposes, not become life's primary purpose. Both poverty and wealth present spiritual challenges and opportunities.\r\n\r\nKeywords: dharmic wealth, honest earning, generous giving, money as tool, spiritual worth beyond wealth\r\n\r\n---\r\n\r\nOn Mental Health and Anxiety:\r\n\"Anxiety often arises from the ego-mind's attempt to control the uncontrollable. The dharmic response to anxiety is not suppression or indulgence, but rather understanding its root causes and responding with appropriate action. Practice surrender to what you cannot control, while taking responsible action in areas where you have influence.\"\r\n\r\nCommentary: Modern anxiety often stems from information overload, social comparison, and disconnection from meaning and purpose. Dharmic approaches to mental health include: regular spiritual practice, service to others, connection with nature, healthy lifestyle choices, and seeking appropriate help when needed. Mental health is part of overall spiritual health.\r\n\r\nKeywords: managing anxiety dharmically, surrender and action, spiritual approaches to mental health, finding meaning\r\n\r\n---\r\n\r\nOn Social Media and Technology:\r\n\"Technology should serve dharma, not distract from it. Use social media and digital tools to connect meaningfully with others, learn valuable knowledge, and spread positive influence. Avoid using technology for ego-gratification, comparison with others, or escape from present-moment awareness. Take regular breaks from digital devices to maintain inner peace.\"\r\n\r\nCommentary: Modern technology can either support or hinder spiritual growth.", "mimetype": "text/plain", "start_char_idx": 2172, "end_char_idx": 4710, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "fa754bc1-bd7c-4ce5-8ca8-3bf6769293f4": {"__data__": {"id_": "fa754bc1-bd7c-4ce5-8ca8-3bf6769293f4", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\dharma_teachings.txt", "file_name": "dharma_teachings.txt", "file_type": "text/plain", "file_size": 8467, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "d9e0f86e-7096-4963-917b-68a03489293d", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\dharma_teachings.txt", "file_name": "dharma_teachings.txt", "file_type": "text/plain", "file_size": 8467, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "f0e65547cab02d4764ca33f27132feaa24f50f426b87f8edc3a1aef1d6be1477", "class_name": "RelatedNodeInfo"}, "2": {"node_id": "43d3d377-b087-46d2-a762-f328854a22a8", "node_type": "1", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\dharma_teachings.txt", "file_name": "dharma_teachings.txt", "file_type": "text/plain", "file_size": 8467, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "61efce2f1d4a852c9723c07b1218551d1a48fba4bdc7eab3d3d1e37b51dbcab3", "class_name": "RelatedNodeInfo"}, "3": {"node_id": "3721e277-b47a-4f95-a874-034a2d081dc2", "node_type": "1", "metadata": {}, "hash": "853203f8f12372606ffe3a177f9c1f11b5d1678d5dfdc3d79b43bb9c96b72b4d", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "Avoid using technology for ego-gratification, comparison with others, or escape from present-moment awareness. Take regular breaks from digital devices to maintain inner peace.\"\r\n\r\nCommentary: Modern technology can either support or hinder spiritual growth. Dharmic use of technology means being intentional about consumption, avoiding addiction patterns, and using these tools to enhance rather than replace real human connection. Social media should inspire and inform, not create jealousy and superficiality.\r\n\r\nKeywords: dharmic technology use, intentional social media, digital wellness, avoiding comparison, present moment awareness\r\n\r\n---\r\n\r\nOn Environmental Responsibility:\r\n\"The Earth is our mother, and dharma includes caring for the environment as we would care for our own mother. This means consuming mindfully, reducing waste, supporting sustainable practices, and considering the environmental impact of our choices. Environmental destruction is a form of violence that affects all beings.\"\r\n\r\nCommentary: Environmental dharma is increasingly important in modern times. This includes personal choices (reducing consumption, choosing sustainable products, conserving resources) and collective action (supporting environmentally responsible policies and businesses). Caring for the planet is caring for future generations and all life forms.\r\n\r\nKeywords: environmental dharma, sustainable living, caring for Earth, mindful consumption, collective responsibility\r\n\r\n---\r\n\r\nOn Dealing with Injustice and Social Issues:\r\n\"When witnessing injustice, dharma calls us to respond with both compassion and appropriate action. This may mean speaking truth to power, supporting those who are oppressed, or working for systemic change. However, the response should come from love rather than hatred, seeking to transform rather than destroy.\"\r\n\r\nCommentary: Social dharma means not remaining passive in the face of injustice, while also ensuring that our responses are skillful and constructive. This might involve volunteering, donating, protesting peacefully, supporting just causes, or simply treating all people with dignity regardless of their background. The goal is positive transformation, not violent revolution.\r\n\r\nKeywords: social dharma, responding to injustice, compassionate action, social responsibility, peaceful change\r\n\r\n---\r\n\r\nOn Aging and Death:\r\n\"Aging is a natural part of life's journey, each stage offering unique opportunities for growth and service. Instead of fighting the aging process or fearing death, dharma teaches us to embrace each stage with grace, continue learning and growing, and prepare for death as a spiritual transition rather than an ending.\"", "mimetype": "text/plain", "start_char_idx": 4453, "end_char_idx": 7141, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "3721e277-b47a-4f95-a874-034a2d081dc2": {"__data__": {"id_": "3721e277-b47a-4f95-a874-034a2d081dc2", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\dharma_teachings.txt", "file_name": "dharma_teachings.txt", "file_type": "text/plain", "file_size": 8467, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "d9e0f86e-7096-4963-917b-68a03489293d", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\dharma_teachings.txt", "file_name": "dharma_teachings.txt", "file_type": "text/plain", "file_size": 8467, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "f0e65547cab02d4764ca33f27132feaa24f50f426b87f8edc3a1aef1d6be1477", "class_name": "RelatedNodeInfo"}, "2": {"node_id": "fa754bc1-bd7c-4ce5-8ca8-3bf6769293f4", "node_type": "1", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\dharma_teachings.txt", "file_name": "dharma_teachings.txt", "file_type": "text/plain", "file_size": 8467, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "ea2fd841d72b766dea00e9b7f3a097a990bc3d491d5df305a374bb66882bb50a", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "Instead of fighting the aging process or fearing death, dharma teaches us to embrace each stage with grace, continue learning and growing, and prepare for death as a spiritual transition rather than an ending.\"\r\n\r\nCommentary: Modern culture often fears aging and denies death, but dharmic perspective sees these as natural parts of life's cycle. This includes: staying physically and mentally active, sharing wisdom with younger generations, letting go of ego-driven ambitions, deepening spiritual practice, and facing mortality with curiosity rather than terror.\r\n\r\nKeywords: dharmic aging, embracing life stages, preparing for death, spiritual transition, sharing wisdom\r\n\r\n---\r\n\r\nOn Finding Life Purpose:\r\n\"Life purpose is not a single career or achievement, but rather a way of being that serves both your own growth and the welfare of others. Your dharma may express differently in different life stages - as a student, parent, professional, elder. The key is to remain attuned to how you can best serve in your current circumstances.\"\r\n\r\nCommentary: Many people struggle with finding their \"one true purpose,\" but dharmic perspective suggests that purpose evolves throughout life. The consistent thread is serving the highest good through your unique gifts and circumstances. This might mean raising children, creating art, running a business, volunteering, or simply being a source of kindness in daily interactions.\r\n\r\nKeywords: evolving life purpose, serving through unique gifts, purpose in different life stages, highest good", "mimetype": "text/plain", "start_char_idx": 6931, "end_char_idx": 8467, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "e9db7036-fc30-47e3-bec0-dec33d5207d2": {"__data__": {"id_": "e9db7036-fc30-47e3-bec0-dec33d5207d2", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\upanishads.txt", "file_name": "upanishads.txt", "file_type": "text/plain", "file_size": 6019, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "85b34051-fb9f-487f-b1be-63e16a9ee90b", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\upanishads.txt", "file_name": "upanishads.txt", "file_type": "text/plain", "file_size": 6019, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "7a504b7acaa7a52b0f31b55928d6b515e792dd21c8934075f5f75162f6eda9a2", "class_name": "RelatedNodeInfo"}, "3": {"node_id": "a0c899c4-83a1-40c4-b116-4444b7cd88d2", "node_type": "1", "metadata": {}, "hash": "4b483e9c80d5bcfabad0d4663003c869c082994c5c9cd38d61c4808e2a0f357d", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "Mandukya Upanishad, Verse 2:\r\n\u0938\u0930\u094d\u0935\u0902 \u0939\u094d\u092f\u0947\u0924\u0926\u094d \u092c\u094d\u0930\u0939\u094d\u092e\u093e\u092f\u092e\u093e\u0924\u094d\u092e\u093e \u092c\u094d\u0930\u0939\u094d\u092e \u0938\u094b\u093d\u092f\u092e\u093e\u0924\u094d\u092e\u093e \u091a\u0924\u0941\u0937\u094d\u092a\u093e\u0924\u094d\u0965\r\n\r\n\"All this is indeed Brahman. This Self is Brahman, and this Self has four quarters.\"\r\n\r\nCommentary: This fundamental teaching establishes that all of reality is one consciousness appearing in different forms. The four quarters refer to waking, dreaming, deep sleep, and the transcendent state. Understanding this helps us realize that beneath all apparent differences - between people, situations, experiences - there is one underlying unity.\r\n\r\nKeywords: unity consciousness, one reality, different states of consciousness, fundamental truth, non-duality\r\n\r\n---\r\n\r\nIsha Upanishad, Verse 1:\r\n\u0908\u0936\u093e\u0935\u093e\u0938\u094d\u092f\u092e\u093f\u0926\u0902 \u0938\u0930\u094d\u0935\u0902 \u092f\u0924\u094d\u0915\u093f\u091e\u094d\u091a \u091c\u0917\u0924\u094d\u092f\u093e\u0902 \u091c\u0917\u0924\u094d\u0964\r\n\u0924\u0947\u0928 \u0924\u094d\u092f\u0915\u094d\u0924\u0947\u0928 \u092d\u0941\u091e\u094d\u091c\u0940\u0925\u093e \u092e\u093e \u0917\u0943\u0927\u0903 \u0915\u0938\u094d\u092f\u0938\u094d\u0935\u093f\u0926\u094d\u0927\u0928\u092e\u094d\u0965\r\n\r\n\"The entire universe is pervaded by the Lord. Enjoy through renunciation. Do not covet anybody's wealth.\"\r\n\r\nCommentary: This opening verse teaches that everything belongs to the divine, so we should enjoy life without possessiveness. True enjoyment comes through non-attachment rather than accumulation. This philosophy helps with materialism, envy, and the constant desire for more. Find contentment in what you have while remaining unattached.", "mimetype": "text/plain", "start_char_idx": 0, "end_char_idx": 1221, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "a0c899c4-83a1-40c4-b116-4444b7cd88d2": {"__data__": {"id_": "a0c899c4-83a1-40c4-b116-4444b7cd88d2", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\upanishads.txt", "file_name": "upanishads.txt", "file_type": "text/plain", "file_size": 6019, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "85b34051-fb9f-487f-b1be-63e16a9ee90b", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\upanishads.txt", "file_name": "upanishads.txt", "file_type": "text/plain", "file_size": 6019, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "7a504b7acaa7a52b0f31b55928d6b515e792dd21c8934075f5f75162f6eda9a2", "class_name": "RelatedNodeInfo"}, "2": {"node_id": "e9db7036-fc30-47e3-bec0-dec33d5207d2", "node_type": "1", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\upanishads.txt", "file_name": "upanishads.txt", "file_type": "text/plain", "file_size": 6019, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "ffb38303cdc87b99d8fa4f3622015cb083ebc33f0306b734779273d67933f6bd", "class_name": "RelatedNodeInfo"}, "3": {"node_id": "2b544526-41fb-4ee0-b3a9-b4262d9b537b", "node_type": "1", "metadata": {}, "hash": "1e811b9143df35d32e40a5d0d560556c5723ba7881af846d62a29f0418f35b30", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "True enjoyment comes through non-attachment rather than accumulation. This philosophy helps with materialism, envy, and the constant desire for more. Find contentment in what you have while remaining unattached.\r\n\r\nKeywords: divine presence everywhere, enjoying without possessing, contentment, non-attachment, freedom from envy\r\n\r\n---\r\n\r\nKatha Upanishad, Verse 1.2.23:\r\n\u0928\u093e\u092f\u092e\u093e\u0924\u094d\u092e\u093e \u092a\u094d\u0930\u0935\u091a\u0928\u0947\u0928 \u0932\u092d\u094d\u092f\u094b \u0928 \u092e\u0947\u0927\u092f\u093e \u0928 \u092c\u0939\u0941\u0928\u093e \u0936\u094d\u0930\u0941\u0924\u0947\u0928\u0964\r\n\u092f\u092e\u0947\u0935\u0948\u0937 \u0935\u0943\u0923\u0941\u0924\u0947 \u0924\u0947\u0928 \u0932\u092d\u094d\u092f\u0938\u094d\u0924\u0938\u094d\u092f\u0948\u0937 \u0906\u0924\u094d\u092e\u093e \u0935\u093f\u0935\u0943\u0923\u0941\u0924\u0947 \u0924\u0928\u0942\u0902 \u0938\u094d\u0935\u093e\u092e\u094d\u0965\r\n\r\n\"The Self cannot be realized through study of scriptures, nor through intelligence, nor through much learning. It can be realized only by those whom It chooses. To such persons, the Self reveals Its own nature.\"\r\n\r\nCommentary: This verse emphasizes that spiritual realization comes through grace and inner purity rather than mere intellectual study. While learning is helpful, the ultimate realization requires humility, sincerity, and openness. This teaches us to balance study with practice, and knowledge with devotion.\r\n\r\nKeywords: spiritual realization, grace, inner purity, humility, beyond intellect, heart knowledge\r\n\r\n---\r\n\r\nKatha Upanishad, Verse 1.3.14:\r\n\u0909\u0924\u094d\u0924\u093f\u0937\u094d\u0920\u0924 \u091c\u093e\u0917\u094d\u0930\u0924 \u092a\u094d\u0930\u093e\u092a\u094d\u092f \u0935\u0930\u093e\u0928\u094d\u0928\u093f\u092c\u094b\u0927\u0924\u0964\r\n\u0915\u094d\u0937\u0941\u0930\u0938\u094d\u092f \u0927\u093e\u0930\u093e \u0928\u093f\u0936\u093f\u0924\u093e \u0926\u0941\u0930\u0924\u094d\u092f\u092f\u093e \u0926\u0941\u0930\u094d\u0917\u0902 \u092a\u0925\u0938\u094d\u0924\u0924\u094d\u0915\u0935\u092f\u094b \u0935\u0926\u0928\u094d\u0924\u093f\u0965\r\n\r\n\"Arise! Awake! Approach the great teachers and learn. The path is sharp as the edge of a razor, difficult to traverse - so declare the wise.\"\r\n\r\nCommentary: This famous verse calls us to spiritual awakening and emphasizes the importance of finding qualified guidance.", "mimetype": "text/plain", "start_char_idx": 1010, "end_char_idx": 2526, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "2b544526-41fb-4ee0-b3a9-b4262d9b537b": {"__data__": {"id_": "2b544526-41fb-4ee0-b3a9-b4262d9b537b", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\upanishads.txt", "file_name": "upanishads.txt", "file_type": "text/plain", "file_size": 6019, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "85b34051-fb9f-487f-b1be-63e16a9ee90b", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\upanishads.txt", "file_name": "upanishads.txt", "file_type": "text/plain", "file_size": 6019, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "7a504b7acaa7a52b0f31b55928d6b515e792dd21c8934075f5f75162f6eda9a2", "class_name": "RelatedNodeInfo"}, "2": {"node_id": "a0c899c4-83a1-40c4-b116-4444b7cd88d2", "node_type": "1", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\upanishads.txt", "file_name": "upanishads.txt", "file_type": "text/plain", "file_size": 6019, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "7e79ddad5424245002185b5548015dba7ff54333322bd13f6ec82b640ea57f90", "class_name": "RelatedNodeInfo"}, "3": {"node_id": "58090c0a-33d2-4d6d-8133-9a1236c2e57a", "node_type": "1", "metadata": {}, "hash": "6890f131d55edd83140096a704ae14d8625285744644f7fc44ced32d9a0d8e9e", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "The path is sharp as the edge of a razor, difficult to traverse - so declare the wise.\"\r\n\r\nCommentary: This famous verse calls us to spiritual awakening and emphasizes the importance of finding qualified guidance. The spiritual path requires discrimination and care, like walking on a razor's edge. It's neither easy nor automatic, but requires conscious effort and wisdom. Don't walk the path alone - seek guidance from those who have walked before you.\r\n\r\nKeywords: spiritual awakening, seeking guidance, discrimination, conscious effort, finding teachers, spiritual path\r\n\r\n---\r\n\r\nMundaka Upanishad, Verse 3.1.3:\r\n\u092f\u0926\u093e \u0938\u0930\u094d\u0935\u0947 \u092a\u094d\u0930\u092e\u0941\u091a\u094d\u092f\u0928\u094d\u0924\u0947 \u0915\u093e\u092e\u093e \u092f\u0947\u093d\u0938\u094d\u092f \u0939\u0943\u0926\u093f \u0936\u094d\u0930\u093f\u0924\u093e\u0903\u0964\r\n\u0905\u0925 \u092e\u0930\u094d\u0924\u094d\u092f\u094b\u093d\u092e\u0943\u0924\u094b \u092d\u0935\u0924\u094d\u092f\u0924\u094d\u0930 \u092c\u094d\u0930\u0939\u094d\u092e \u0938\u092e\u0936\u094d\u0928\u0941\u0924\u0947\u0965\r\n\r\n\"When all the desires that dwell in the heart are cast away, then the mortal becomes immortal and attains Brahman in this very life.\"\r\n\r\nCommentary: This verse teaches that liberation comes through the elimination of selfish desires, not the fulfillment of them. This doesn't mean becoming emotionless, but rather freeing yourself from compulsive wanting. When you're no longer driven by endless desires, you discover your eternal, peaceful nature right here and now.\r\n\r\nKeywords: desire elimination, freedom from wanting, inner peace, liberation in this life, eternal nature\r\n\r\n---\r\n\r\nChandogya Upanishad, Verse 6.8.7:\r\n\u0938 \u092f \u090f\u0937\u094b\u093d\u0923\u093f\u092e\u0948\u0924\u0926\u093e\u0924\u094d\u092e\u094d\u092f\u092e\u093f\u0926\u0902 \u0938\u0930\u094d\u0935\u0902 \u0924\u0924\u094d\u0938\u0924\u094d\u092f\u0902 \u0938 \u0906\u0924\u094d\u092e\u093e \u0924\u0924\u094d\u0924\u094d\u0935\u092e\u0938\u093f \u0936\u094d\u0935\u0947\u0924\u0915\u0947\u0924\u094b\u0965\r\n\r\n\"That which is the subtlest of all is the Self of all this. It is the True. It is the Self, and thou, O Svetaketu, art That.\"", "mimetype": "text/plain", "start_char_idx": 2313, "end_char_idx": 3843, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}, "58090c0a-33d2-4d6d-8133-9a1236c2e57a": {"__data__": {"id_": "58090c0a-33d2-4d6d-8133-9a1236c2e57a", "embedding": null, "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\upanishads.txt", "file_name": "upanishads.txt", "file_type": "text/plain", "file_size": 6019, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {"1": {"node_id": "85b34051-fb9f-487f-b1be-63e16a9ee90b", "node_type": "4", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\upanishads.txt", "file_name": "upanishads.txt", "file_type": "text/plain", "file_size": 6019, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "7a504b7acaa7a52b0f31b55928d6b515e792dd21c8934075f5f75162f6eda9a2", "class_name": "RelatedNodeInfo"}, "2": {"node_id": "2b544526-41fb-4ee0-b3a9-b4262d9b537b", "node_type": "1", "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\upanishads.txt", "file_name": "upanishads.txt", "file_type": "text/plain", "file_size": 6019, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}, "hash": "ce1410ddf63830dd3287a3ec0611a4f76800d548a31c435e22bae7c3e28c4b65", "class_name": "RelatedNodeInfo"}}, "metadata_template": "{key}: {value}", "metadata_separator": "\n", "text": "It is the True. It is the Self, and thou, O Svetaketu, art That.\"\r\n\r\nCommentary: \"Tat tvam asi\" - \"Thou art That\" - is one of the great statements of Vedanta. Your essential nature is the same as the universal consciousness. You are not just your body, mind, or personality - you are the eternal, unchanging awareness that witnesses all experiences. This recognition transforms how you see yourself and others.\r\n\r\nKeywords: true identity, eternal self, \"Thou art That\", universal consciousness, self-realization\r\n\r\n---\r\n\r\nPrashna Upanishad, Verse 4.5:\r\n\u092f\u094b \u0935\u0948 \u0924\u0902 \u092a\u0930\u0902 \u092c\u094d\u0930\u0939\u094d\u092e \u0935\u0947\u0926 \u092c\u094d\u0930\u0939\u094d\u092e\u0948\u0935 \u092d\u0935\u0924\u093f \u0928\u093e\u0938\u094d\u092f\u093e\u092c\u094d\u0930\u0939\u094d\u092e\u0935\u093f\u0924\u094d\u0915\u0941\u0932\u0947 \u092d\u0935\u0924\u093f\u0965\r\n\r\n\"Whoever truly knows that Supreme Brahman becomes Brahman indeed. In his family, none is born who does not know Brahman.\"\r\n\r\nCommentary: This verse speaks to the transformative power of spiritual realization. When someone truly understands their divine nature, it affects not just them but their entire environment and relationships. This transformation is so profound that it influences future generations. True spiritual realization radiates outward and uplifts everyone around.\r\n\r\nKeywords: transformative realization, becoming what you know, spiritual influence, uplifting others, generational impact", "mimetype": "text/plain", "start_char_idx": 3778, "end_char_idx": 5003, "metadata_seperator": "\n", "text_template": "{metadata_str}\n\n{content}", "class_name": "TextNode"}, "__type__": "1"}}, "docstore/ref_doc_info": {"ad2bddc1-18cd-4ca7-98d2-9c66f07d12de": {"node_ids": ["5eaf8bd3-d701-437b-bf58-7bb609a04855", "1bfbea62-357e-44d7-9592-46bb78631ce3", "9d83f571-9ba5-43c3-b848-caf3d9a865a5", "9b560e61-d3b9-40f9-adbf-d2c7fa7e8f31", "d33da1de-24bb-47b5-b722-b8247b8bbd0b", "ce4f0a05-6efa-409e-9489-3846cccf22e0", "1d02f8b1-7248-4e8c-9e3b-7a9942ca8b69", "26861f35-1920-4675-a9fa-90ab733ae51d"], "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\bhagavad_gita.txt", "file_name": "bhagavad_gita.txt", "file_type": "text/plain", "file_size": 13128, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}}, "d9e0f86e-7096-4963-917b-68a03489293d": {"node_ids": ["7107627a-d1ee-406b-9be3-664551dadd24", "43d3d377-b087-46d2-a762-f328854a22a8", "fa754bc1-bd7c-4ce5-8ca8-3bf6769293f4", "3721e277-b47a-4f95-a874-034a2d081dc2"], "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\dharma_teachings.txt", "file_name": "dharma_teachings.txt", "file_type": "text/plain", "file_size": 8467, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}}, "85b34051-fb9f-487f-b1be-63e16a9ee90b": {"node_ids": ["e9db7036-fc30-47e3-bec0-dec33d5207d2", "a0c899c4-83a1-40c4-b116-4444b7cd88d2", "2b544526-41fb-4ee0-b3a9-b4262d9b537b", "58090c0a-33d2-4d6d-8133-9a1236c2e57a"], "metadata": {"file_path": "C:\\Users\\sister\\Desktop\\karma_check\\data\\upanishads.txt", "file_name": "upanishads.txt", "file_type": "text/plain", "file_size": 6019, "creation_date": "2025-06-05", "last_modified_date": "2025-06-08"}}}}
|
storage/graph_store.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"graph_dict": {}}
|
storage/image__vector_store.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"embedding_dict": {}, "text_id_to_ref_doc_id": {}, "metadata_dict": {}}
|
storage/index_store.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"index_store/data": {"840f0ea9-d06c-4165-b3e7-68b3b71bb0dc": {"__type__": "vector_store", "__data__": "{\"index_id\": \"840f0ea9-d06c-4165-b3e7-68b3b71bb0dc\", \"summary\": null, \"nodes_dict\": {\"0\": \"5eaf8bd3-d701-437b-bf58-7bb609a04855\", \"1\": \"1bfbea62-357e-44d7-9592-46bb78631ce3\", \"2\": \"9d83f571-9ba5-43c3-b848-caf3d9a865a5\", \"3\": \"9b560e61-d3b9-40f9-adbf-d2c7fa7e8f31\", \"4\": \"d33da1de-24bb-47b5-b722-b8247b8bbd0b\", \"5\": \"ce4f0a05-6efa-409e-9489-3846cccf22e0\", \"6\": \"1d02f8b1-7248-4e8c-9e3b-7a9942ca8b69\", \"7\": \"26861f35-1920-4675-a9fa-90ab733ae51d\", \"8\": \"7107627a-d1ee-406b-9be3-664551dadd24\", \"9\": \"43d3d377-b087-46d2-a762-f328854a22a8\", \"10\": \"fa754bc1-bd7c-4ce5-8ca8-3bf6769293f4\", \"11\": \"3721e277-b47a-4f95-a874-034a2d081dc2\", \"12\": \"e9db7036-fc30-47e3-bec0-dec33d5207d2\", \"13\": \"a0c899c4-83a1-40c4-b116-4444b7cd88d2\", \"14\": \"2b544526-41fb-4ee0-b3a9-b4262d9b537b\", \"15\": \"58090c0a-33d2-4d6d-8133-9a1236c2e57a\"}, \"doc_id_dict\": {}, \"embeddings_dict\": {}}"}}}
|