Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
|