Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -96,7 +96,7 @@ def generate_answer_with_groq(question, context):
|
|
96 |
|
97 |
# --- Twilio Functions ---
|
98 |
def get_latest_whatsapp_conversation_sid(client):
|
99 |
-
conversations = client.conversations.v1.conversations.list(limit=10
|
100 |
for convo in conversations:
|
101 |
try:
|
102 |
participants = client.conversations.v1.conversations(convo.sid).participants.list()
|
@@ -109,6 +109,7 @@ def get_latest_whatsapp_conversation_sid(client):
|
|
109 |
continue
|
110 |
return None
|
111 |
|
|
|
112 |
def fetch_latest_incoming_message(client, conversation_sid):
|
113 |
messages = client.conversations.v1.conversations(conversation_sid).messages.list(limit=10)
|
114 |
for msg in reversed(messages):
|
|
|
96 |
|
97 |
# --- Twilio Functions ---
|
98 |
def get_latest_whatsapp_conversation_sid(client):
|
99 |
+
conversations = client.conversations.v1.conversations.list(limit=10)
|
100 |
for convo in conversations:
|
101 |
try:
|
102 |
participants = client.conversations.v1.conversations(convo.sid).participants.list()
|
|
|
109 |
continue
|
110 |
return None
|
111 |
|
112 |
+
|
113 |
def fetch_latest_incoming_message(client, conversation_sid):
|
114 |
messages = client.conversations.v1.conversations(conversation_sid).messages.list(limit=10)
|
115 |
for msg in reversed(messages):
|