masadonline commited on
Commit
b08f27d
·
verified ·
1 Parent(s): e56bc9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -210,9 +210,12 @@ def start_conversation_monitor(client, index, embed_model, text_chunks):
210
  def poll_convo(convo_sid):
211
  while True:
212
  latest_msg = fetch_latest_incoming_message(client, convo_sid)
213
- print(f"Twilio SID: {convo_sid}")
214
  if latest_msg:
215
  msg_time = latest_msg["timestamp"]
 
 
 
216
  if convo_sid not in last_processed_timestamp or msg_time > last_processed_timestamp[convo_sid]:
217
  last_processed_timestamp[convo_sid] = msg_time
218
  question = latest_msg["body"]
 
210
  def poll_convo(convo_sid):
211
  while True:
212
  latest_msg = fetch_latest_incoming_message(client, convo_sid)
213
+ print(f"Twilio SID: {convo_sid}")
214
  if latest_msg:
215
  msg_time = latest_msg["timestamp"]
216
+ print(f"msg_time: {msg_time}")
217
+ print(f"last_processed_timestamp: {last_processed_timestamp}")
218
+ print(f"last_processed_timestamp[convo_sid]: {last_processed_timestamp[convo_sid]}")
219
  if convo_sid not in last_processed_timestamp or msg_time > last_processed_timestamp[convo_sid]:
220
  last_processed_timestamp[convo_sid] = msg_time
221
  question = latest_msg["body"]