We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2c5d2e commit 4c3e138Copy full SHA for 4c3e138
script.py
@@ -87,7 +87,7 @@ def save_conversation_history(user_id, history):
87
def split_message(text, max_lines=3, max_chars_per_line=100):
88
"""Split a long message into smaller chunks for better WhatsApp readability."""
89
# First split by existing newlines
90
- paragraphs = text.split('\n')
+ paragraphs = text.split('\\n')
91
chunks = []
92
current_chunk = []
93
current_line_count = 0
@@ -319,4 +319,4 @@ def webhook():
319
320
if __name__ == '__main__':
321
# For development with webhook testing via ngrok
322
- app.run(debug=True, port=5001, host='0.0.0.0')
+ app.run(debug=True, port=5001, host='0.0.0.0')
0 commit comments