tatianija commited on
Commit
17da6b9
·
verified ·
1 Parent(s): 262876a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -485,7 +485,7 @@ class IntelligentAgent:
485
  attachments = []
486
 
487
  # Common fields where attachments might be found
488
- attachment_fields = ['attachments', 'files', 'media', 'resources', 'file_data', 'file_content']
489
 
490
  for field in attachment_fields:
491
  if field in question_data:
@@ -805,14 +805,14 @@ Answer:"""
805
  question_text = question_data.get('question', '')
806
 
807
  if self.debug:
808
- print(f"\n 1. Processing question with potential attachments and URLs: {question_text[:300]}...")
809
 
810
  try:
811
  # Detect and process URLs
812
  print(f"2. Detecting and processing URLs...")
813
  url_context = self._extract_and_process_urls(question_text)
814
 
815
- if self.debug and url_context:
816
  print(f"URL context: {url_context[:200]}...")
817
  except Exception as e:
818
  answer = f"Sorry, I encountered an error extracting URLs: {e}"
 
485
  attachments = []
486
 
487
  # Common fields where attachments might be found
488
+ attachment_fields = ['file_name']
489
 
490
  for field in attachment_fields:
491
  if field in question_data:
 
805
  question_text = question_data.get('question', '')
806
 
807
  if self.debug:
808
+ print(f"\n1. Processing question with potential attachments and URLs: {question_text[:300]}...")
809
 
810
  try:
811
  # Detect and process URLs
812
  print(f"2. Detecting and processing URLs...")
813
  url_context = self._extract_and_process_urls(question_text)
814
 
815
+ if self.debug:
816
  print(f"URL context: {url_context[:200]}...")
817
  except Exception as e:
818
  answer = f"Sorry, I encountered an error extracting URLs: {e}"