Update configuration settings: changed Ollama endpoint and model, added Bark and NTFY API details.

This commit is contained in:
tigeren 2025-08-30 18:09:05 +00:00
parent 7d3770dba3
commit fe7fa89573
5 changed files with 175 additions and 7 deletions

View File

@ -1,14 +1,15 @@
{
"ollama_endpoint": "http://localhost:11434",
"ollama_model": "llama2",
"ollama_endpoint": "http://192.168.2.245:11434",
"ollama_model": "goekdenizguelmez/JOSIEFIED-Qwen3:8b",
"silent_start": "20:00",
"silent_end": "12:00",
"min_interval": 3,
"max_interval": 180,
"bark_api_url": "",
"bark_device_key": "",
"ntfy_api_url": "",
"ntfy_topic": "",
"bark_api_url": "https://bark.xorbitlab.xyz",
"bark_device_key": "GmFrzGegxFexhNXXXYdzm3",
"ntfy_api_url": "https://ntfy.xorbitlab.xyz",
"ntfy_topic": "tigeren_msg",
"ntfy_access_token": "",
"templates_dir": "templates"
}
}

38
quick_test.py Executable file
View File

@ -0,0 +1,38 @@
#!/usr/bin/env python3
"""Quick test of the full notification pipeline."""
import asyncio
from config import Config
from template_manager import TemplateManager
from ollama_client import OllamaClient
from notification_client import NotificationClient
async def test_full_pipeline():
"""Test the complete pipeline from template to notification."""
config = Config()
print("🚀 Testing full notification pipeline...")
# Test template system
template_manager = TemplateManager()
prompt = template_manager.get_random_prompt()
print(f"📋 Selected template: {prompt}")
# Test Ollama response
async with OllamaClient(config) as ollama_client:
response = await ollama_client.generate_response(prompt)
if response:
print(f"🤖 Ollama response: {response[:200]}...")
# Test notification (will skip if no device key/topic)
async with NotificationClient(config) as notification_client:
success = await notification_client.send_notification(response)
if success:
print("✅ Notification pipeline working!")
else:
print("⚠️ Notification sent to available services")
else:
print("❌ Failed to get Ollama response")
if __name__ == "__main__":
asyncio.run(test_full_pipeline())

View File

@ -0,0 +1,52 @@
[
{
"name": "Daily Wisdom",
"prompt": "Share a brief piece of wisdom or insight for {day}, {date} at {time}",
"description": "Daily philosophical or practical wisdom"
},
{
"name": "Creative Prompt",
"prompt": "What's one creative thing you could do right now on this {weekday} {time_of_day}?",
"description": "Creative thinking and action prompts"
},
{
"name": "Mindful Moment",
"prompt": "Take a moment to notice three things around you at {time} on {date}",
"description": "Mindfulness and awareness exercises"
},
{
"name": "Gratitude Challenge",
"prompt": "Name one thing you're grateful for about this {time_of_day} on {month} {day_of_month}",
"description": "Gratitude practice with daily variations"
},
{
"name": "Energy Check",
"prompt": "How's your energy level right now at {time}? What's one small adjustment you could make?",
"description": "Energy and wellness check-ins"
},
{
"name": "Learning Question",
"prompt": "What's one thing you learned today or would like to learn this {weekday}?",
"description": "Continuous learning and curiosity prompts"
},
{
"name": "Nature Connection",
"prompt": "What's the weather like today ({date}) and how does it make you feel?",
"description": "Connecting with natural rhythms and environment"
},
{
"name": "Relationship Reflection",
"prompt": "Send a kind thought to someone at {time} today - who comes to mind and why?",
"description": "Social connection and relationship awareness"
},
{
"name": "Future Self",
"prompt": "What would your future self thank you for doing today ({date}) at {time_of_day}?",
"description": "Long-term thinking and future planning"
},
{
"name": "Micro-Adventure",
"prompt": "What's a tiny adventure you could have in the next hour starting from {time}?",
"description": "Encouraging small, spontaneous adventures"
}
]

View File

@ -0,0 +1,22 @@
[
{
"name": "Code Reflection",
"prompt": "What coding concept or practice have you been thinking about lately? Share your thoughts for {date} {time}",
"description": "Developer-focused reflection prompts"
},
{
"name": "Tech Curiosity",
"prompt": "What's one technology or tool you'd like to explore this {weekday}? What intrigues you about it?",
"description": "Technology curiosity and learning prompts"
},
{
"name": "Problem Solving",
"prompt": "Describe a problem you're currently working on at {time} and one approach you might try",
"description": "Problem-solving and debugging mindset prompts"
},
{
"name": "System Thinking",
"prompt": "Think about a system you interacted with today ({date}). How could it be improved?",
"description": "Systems thinking and improvement prompts"
}
]

55
test_connections.py Executable file
View File

@ -0,0 +1,55 @@
#!/usr/bin/env python3
"""Test script to verify all service connections."""
import asyncio
import logging
from config import Config
from ollama_client import OllamaClient
from notification_client import NotificationClient
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
async def test_all_services():
"""Test connections to all configured services."""
config = Config()
print("🔍 Testing service connections...")
print(f"Current config: {config.ollama_endpoint}")
print(f"Bark URL: {config.bark_api_url}")
print(f"Ntfy URL: {config.ntfy_api_url}")
# Test Ollama
print("\n🤖 Testing Ollama connection...")
async with OllamaClient(config) as ollama_client:
ollama_ok = await ollama_client.check_health()
if ollama_ok:
print("✅ Ollama service is accessible")
# Test a small prompt
test_prompt = "Hello, this is a test."
response = await ollama_client.generate_response(test_prompt)
if response:
print(f"✅ Ollama response: {response[:100]}...")
else:
print("❌ Failed to get response from Ollama")
else:
print("❌ Ollama service is not accessible")
# Test notification services
print("\n📱 Testing notification services...")
async with NotificationClient(config) as notification_client:
results = await notification_client.test_connections()
print("Bark connection:", "✅ Available" if results.get("bark") else "❌ Not configured/available")
print("Ntfy connection:", "✅ Available" if results.get("ntfy") else "❌ Not configured/available")
# If device key/topic not set, show guidance
if not config.bark_device_key:
print("💡 Bark device key not set - configure with: ./config_cli.py --set-bark-key YOUR_DEVICE_KEY")
if not config.ntfy_topic:
print("💡 Ntfy topic not set - configure with: ./config_cli.py --set-ntfy-topic YOUR_TOPIC")
if __name__ == "__main__":
asyncio.run(test_all_services())