Spaces:
Sleeping
Sleeping
Add run method to GAIAAgent class
Browse files- src/gaia/agent/agent.py +15 -1
src/gaia/agent/agent.py
CHANGED
|
@@ -351,4 +351,18 @@ class GAIAAgent:
|
|
| 351 |
if hasattr(self, 'result_cache') and self.result_cache:
|
| 352 |
self.result_cache.clear()
|
| 353 |
|
| 354 |
-
logger.info("Agent memory cleared")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 351 |
if hasattr(self, 'result_cache') and self.result_cache:
|
| 352 |
self.result_cache.clear()
|
| 353 |
|
| 354 |
+
logger.info("Agent memory cleared")
|
| 355 |
+
|
| 356 |
+
def run(self, question: str) -> str:
|
| 357 |
+
"""
|
| 358 |
+
Run the agent on a question and return the answer.
|
| 359 |
+
|
| 360 |
+
This method is required by the app.py interface.
|
| 361 |
+
|
| 362 |
+
Args:
|
| 363 |
+
question (str): The question to process
|
| 364 |
+
|
| 365 |
+
Returns:
|
| 366 |
+
str: The answer to the question
|
| 367 |
+
"""
|
| 368 |
+
return self.process_question(question)
|