masadonline commited on
Commit
b594dbc
·
verified ·
1 Parent(s): 71f4ee8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 {