lam-ho commited on
Commit
7bcad83
·
verified ·
1 Parent(s): c8ca0c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -18,10 +18,10 @@ class BasicAgent:
18
  print("BasicAgent initialized.")
19
  def __call__(self, question: str) -> str:
20
  print(f"Agent received question (first 50 chars): {question[:50]}...")
21
- if question_dict[question]:
22
- return question_dict[question]
23
  fixed_answer = self.agent.run(question)
24
- question_dict[question] = fixed_answer
25
  print(f"Agent returning fixed answer: {fixed_answer}")
26
  return fixed_answer
27
 
 
18
  print("BasicAgent initialized.")
19
  def __call__(self, question: str) -> str:
20
  print(f"Agent received question (first 50 chars): {question[:50]}...")
21
+ if self.question_dict[question]:
22
+ return self.question_dict[question]
23
  fixed_answer = self.agent.run(question)
24
+ self.question_dict[question] = fixed_answer
25
  print(f"Agent returning fixed answer: {fixed_answer}")
26
  return fixed_answer
27