Sborole commited on
Commit
531edca
·
verified ·
1 Parent(s): cf6a065

Update src/agent.py

Browse files
Files changed (1) hide show
  1. src/agent.py +4 -4
src/agent.py CHANGED
@@ -90,17 +90,17 @@ class BasicAgent():
90
  self.max_retries = 3
91
  self.base_delay = 5
92
 
93
- def run(self, question: str, file_path: str = ""):
94
  final_answer = None
95
  retry_count = 0
96
 
97
  question = f"Question: {question}"
98
- file_path = f"File: {file_path}"
99
- print(f"Starting Agent with question text: {question}, {file_path}")
100
  while True:
101
  try:
102
  # Run the agent
103
- steps = self.agent.run(question, file_path)
104
 
105
  # If steps is a string, convert it to a single-item list
106
  if isinstance(steps, str):
 
90
  self.max_retries = 3
91
  self.base_delay = 5
92
 
93
+ def run(self, question: str, file_content: str = ""):
94
  final_answer = None
95
  retry_count = 0
96
 
97
  question = f"Question: {question}"
98
+ context = f"Story content:\n{file_content}"
99
+ print(f"Starting Agent with question text: {question}, {file_content}")
100
  while True:
101
  try:
102
  # Run the agent
103
+ steps = self.agent.run(question, context)
104
 
105
  # If steps is a string, convert it to a single-item list
106
  if isinstance(steps, str):