tatianija commited on
Commit
60c173f
·
verified ·
1 Parent(s): 0d1df09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -493,7 +493,7 @@ class IntelligentAgent:
493
  code_files.append(file_path)
494
 
495
  if self.debug:
496
- print(f"Downloaded attachments: {len(image_files)} images, {len(audio_files)} audio, {len(code_files)} code files")
497
 
498
  return image_files, audio_files, code_files
499
 
@@ -763,16 +763,16 @@ Answer:"""
763
  attachment_context = self._process_attachments(image_files, audio_files, code_files)
764
 
765
  if self.debug and attachment_context:
766
- print(f"Attachment context: {attachment_context[:800]}...")
767
 
768
  # Decide whether to search
769
  if self._should_search(question_text, attachment_context):
770
  if self.debug:
771
- print("Using search-based approach")
772
  answer = self._answer_with_search(question_text, attachment_context)
773
  else:
774
  if self.debug:
775
- print("Using LLM-only approach")
776
  answer = self._answer_with_llm(question_text, attachment_context)
777
  print("here")
778
  print(answer)
@@ -792,7 +792,7 @@ Answer:"""
792
  answer = f"Sorry, I encountered an error: {e}"
793
 
794
  if self.debug:
795
- print(f"Agent returning answer: {answer[:100]}...")
796
  return answer
797
 
798
  def __call__(self, question: str, image_files: List[str] = None, audio_files: List[str] = None) -> str:
 
493
  code_files.append(file_path)
494
 
495
  if self.debug:
496
+ print(f"3. Found attachments: {len(image_files)} images, {len(audio_files)} audio, {len(code_files)} code files")
497
 
498
  return image_files, audio_files, code_files
499
 
 
763
  attachment_context = self._process_attachments(image_files, audio_files, code_files)
764
 
765
  if self.debug and attachment_context:
766
+ print(f"4. Attachment context: {attachment_context[:800]}...")
767
 
768
  # Decide whether to search
769
  if self._should_search(question_text, attachment_context):
770
  if self.debug:
771
+ print("5. Using search-based approach")
772
  answer = self._answer_with_search(question_text, attachment_context)
773
  else:
774
  if self.debug:
775
+ print("5. Using LLM-only approach")
776
  answer = self._answer_with_llm(question_text, attachment_context)
777
  print("here")
778
  print(answer)
 
792
  answer = f"Sorry, I encountered an error: {e}"
793
 
794
  if self.debug:
795
+ print(f"6. Agent returning answer: {answer[:100]}...")
796
  return answer
797
 
798
  def __call__(self, question: str, image_files: List[str] = None, audio_files: List[str] = None) -> str: