SolshineMisfit commited on
Commit
137d1ad
·
verified ·
1 Parent(s): b3ef8fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -589,7 +589,7 @@ with open("prompts.yaml", 'r') as stream:
589
  # Override CodeAgent run to automatically clear context periodically
590
  original_code_agent_run = CodeAgent.run
591
 
592
- def context_managed_run(self, query, max_steps=None, persist_conversation=None, stream=False, reset=False, additional_args=None):
593
  """Override to periodically clear conversation context after steps."""
594
  # Initialize step counter if not present
595
  if not hasattr(self, '_context_step_counter'):
@@ -624,10 +624,10 @@ def context_managed_run(self, query, max_steps=None, persist_conversation=None,
624
 
625
  print(f"Conversation history trimmed from {original_length} to {len(self.conversation)} messages")
626
 
627
- # Call the original run method with all parameters (including stream)
628
  return original_code_agent_run(
629
- self,
630
- query=query,
631
  max_steps=max_steps,
632
  persist_conversation=persist_conversation,
633
  stream=stream,
 
589
  # Override CodeAgent run to automatically clear context periodically
590
  original_code_agent_run = CodeAgent.run
591
 
592
+ def context_managed_run(self, task, max_steps=None, persist_conversation=None, stream=False, reset=False, additional_args=None):
593
  """Override to periodically clear conversation context after steps."""
594
  # Initialize step counter if not present
595
  if not hasattr(self, '_context_step_counter'):
 
624
 
625
  print(f"Conversation history trimmed from {original_length} to {len(self.conversation)} messages")
626
 
627
+ # Call the original run method with all parameters (as they were received)
628
  return original_code_agent_run(
629
+ self,
630
+ task,
631
  max_steps=max_steps,
632
  persist_conversation=persist_conversation,
633
  stream=stream,