Spaces:
Sleeping
Sleeping
feat: final answer generation
Browse files
app.py
CHANGED
@@ -20,7 +20,10 @@ class BasicAgent:
|
|
20 |
print("BasicAgent initialized.")
|
21 |
def __call__(self, question: str) -> str:
|
22 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
23 |
-
answer = self.agent.chat(
|
|
|
|
|
|
|
24 |
print(f"Agent returning answer: {answer}")
|
25 |
return answer
|
26 |
|
|
|
20 |
print("BasicAgent initialized.")
|
21 |
def __call__(self, question: str) -> str:
|
22 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
23 |
+
answer = self.agent.chat(
|
24 |
+
question,
|
25 |
+
only_final_answer=True
|
26 |
+
)
|
27 |
print(f"Agent returning answer: {answer}")
|
28 |
return answer
|
29 |
|