Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -606,7 +606,7 @@ class IntelligentAgent:
|
|
606 |
code_files.append(local_path)
|
607 |
|
608 |
if self.debug:
|
609 |
-
print(f"Processed file: {file_name} -> {'image' if is_image else 'audio' if is_audio else 'code'}")
|
610 |
|
611 |
except Exception as e:
|
612 |
if self.debug:
|
@@ -617,7 +617,7 @@ class IntelligentAgent:
|
|
617 |
|
618 |
return image_files, audio_files, code_files, excel_files
|
619 |
|
620 |
-
def _process_attachments(self, image_files: List[str], audio_files: List[str], code_files: List[str]) -> str:
|
621 |
"""
|
622 |
Process different types of attachments and return consolidated context.
|
623 |
"""
|
@@ -828,7 +828,7 @@ Answer with just "YES" only if your general knowledge is insufficient to answer
|
|
828 |
image_files, audio_files, code_files, excel_files = self._detect_and_process_direct_attachments(attachment_name, local_file_path)
|
829 |
|
830 |
# Process attachments to get context
|
831 |
-
attachment_context = self._process_attachments(image_files, audio_files, code_files)
|
832 |
|
833 |
if self.debug and attachment_context:
|
834 |
print(f"Attachment context: {attachment_context[:200]}...")
|
|
|
606 |
code_files.append(local_path)
|
607 |
|
608 |
if self.debug:
|
609 |
+
print(f"Processed file: {file_name} -> {'image' if is_image else 'audio' if is_audio else 'excel' if is_excel else 'code'}")
|
610 |
|
611 |
except Exception as e:
|
612 |
if self.debug:
|
|
|
617 |
|
618 |
return image_files, audio_files, code_files, excel_files
|
619 |
|
620 |
+
def _process_attachments(self, image_files: List[str], audio_files: List[str], excel_files: List[str], code_files: List[str]) -> str:
|
621 |
"""
|
622 |
Process different types of attachments and return consolidated context.
|
623 |
"""
|
|
|
828 |
image_files, audio_files, code_files, excel_files = self._detect_and_process_direct_attachments(attachment_name, local_file_path)
|
829 |
|
830 |
# Process attachments to get context
|
831 |
+
attachment_context = self._process_attachments(image_files, audio_files, excel_files, code_files)
|
832 |
|
833 |
if self.debug and attachment_context:
|
834 |
print(f"Attachment context: {attachment_context[:200]}...")
|