Spaces:
Sleeping
Sleeping
refactor BasicAgent to use agent.run for question handling
Browse files
app.py
CHANGED
|
@@ -15,10 +15,11 @@ class BasicAgent:
|
|
| 15 |
def __init__(self):
|
| 16 |
self.agent = create_agent()
|
| 17 |
def __call__(self, question: str) -> str:
|
| 18 |
-
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 19 |
-
fixed_answer = "This is a default answer."
|
| 20 |
-
print(f"Agent returning fixed answer: {fixed_answer}")
|
| 21 |
-
return fixed_answer
|
|
|
|
| 22 |
|
| 23 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
| 24 |
"""
|
|
|
|
| 15 |
def __init__(self):
|
| 16 |
self.agent = create_agent()
|
| 17 |
def __call__(self, question: str) -> str:
|
| 18 |
+
# print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 19 |
+
# fixed_answer = "This is a default answer."
|
| 20 |
+
# print(f"Agent returning fixed answer: {fixed_answer}")
|
| 21 |
+
# return fixed_answer
|
| 22 |
+
return self.agent.run(question)
|
| 23 |
|
| 24 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
| 25 |
"""
|