You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.error(f"Invalid response format, attempt {attempt+1}")
22
27
exceptExceptionase:
23
28
logger.error(f"API error on attempt {attempt+1}: {e}")
@@ -33,12 +38,12 @@ def bible_verse(verse):
33
38
"""Generate bible verse explanation and prayer with optimizations"""
34
39
35
40
# Primary prompts - more spiritual and engaging
36
-
explanation_prompt=f"""Write a powerful, heart-touching explanation of "{verse}" that makes people feel God's love personally. Connect it to real-life struggles, speak with warmth and hope, make it deeply encouraging and relatable. Use simple but profound language that touches both heart and soul. Keep it under 270 characters and make people want to share it. with some nice hashtags."""
37
-
prayer_prompt=f"""faith filled, spirit filled prayer based on "{verse}" that people can declare over their lives with confidence. Make it specific, personal, and powerful - like speaking directly to God as a loving Father. Include breakthrough, blessing, and transformation. Write it as a declaration of faith under 270 characters that builds expectation for God's goodness."""
41
+
explanation_prompt=f"""Write a powerful, heart-touching explanation of "{verse}" that makes people feel God's love personally. Connect it to real-life struggles, speak with warmth and hope, make it deeply encouraging and relatable. Use simple but profound language that touches both heart and soul. Keep it under 270 characters and make people want to share it. with some nice hashtags.eliminate any markdown formatting ,and use only plain text."""
42
+
prayer_prompt=f"""faith filled, spirit filled prayer based on "{verse}" that people can declare over their lives with confidence. Make it specific, personal, and powerful - like speaking directly to God as a loving Father. Include breakthrough, blessing, and transformation. Write it as a declaration of faith under 270 characters that builds expectation for God's goodness.eliminate any markdown formatting , and use only plain text."""
38
43
39
44
# Backup shorter prompts
40
-
short_explanation=f"""Explain "{verse}" in a way that makes people feel God's personal love and care for them. Make it encouraging, hopeful, and relatable to daily life. Use warm, simple language that touches the heart. Under 260 characters. with some nice hashtags."""
41
-
short_prayer=f"""Write a powerful prayer from "{verse}" that people can pray with bold faith. Make it personal, specific, and full of expectation for God's goodness. Under 260 characters."""
45
+
short_explanation=f"""Explain "{verse}" in a way that makes people feel God's personal love and care for them. Make it encouraging, hopeful, and relatable to daily life. Use warm, simple language that touches the heart. Under 260 characters. with some nice hashtags.eliminate any markdown formatting, and use only plain text."""
46
+
short_prayer=f"""Write a powerful prayer from "{verse}" that people can pray with bold faith. Make it personal, specific, and full of expectation for God's goodness. Under 260 characters.eliminate any markdown formatting, and use only plain text."""
42
47
43
48
# Get initial responses
44
49
explanation=get_ai_response(explanation_prompt)
@@ -48,20 +53,20 @@ def bible_verse(verse):
48
53
logger.warning("Failed to get AI response, returning fallback")
0 commit comments