Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -485,7 +485,7 @@ class IntelligentAgent:
|
|
| 485 |
attachments = []
|
| 486 |
|
| 487 |
# Common fields where attachments might be found
|
| 488 |
-
attachment_fields = ['
|
| 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"\
|
| 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}"
|
|
|
|
| 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}"
|