Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -102,7 +102,7 @@ def generate_answer_with_groq(question, context):
|
|
102 |
# --- Twilio Functions ---
|
103 |
def fetch_latest_incoming_message(client, conversation_sid):
|
104 |
try:
|
105 |
-
messages = client.conversations.conversations(conversation_sid).messages.list()
|
106 |
for msg in reversed(messages):
|
107 |
if msg.author.startswith("whatsapp:"):
|
108 |
return {
|
|
|
102 |
# --- Twilio Functions ---
|
103 |
def fetch_latest_incoming_message(client, conversation_sid):
|
104 |
try:
|
105 |
+
messages = client.conversations.v1.conversations(conversation_sid).messages.list()
|
106 |
for msg in reversed(messages):
|
107 |
if msg.author.startswith("whatsapp:"):
|
108 |
return {
|