Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,10 +15,14 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
| 15 |
# --- Basic Agent Definition ---
|
| 16 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 17 |
class BasicAgent:
|
| 18 |
-
def __init__(self):
|
|
|
|
|
|
|
| 19 |
print("BasicAgent initialized.")
|
|
|
|
| 20 |
def __call__(self, question: str) -> str:
|
| 21 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
|
|
|
| 22 |
fixed_answer = "This is a default answer."
|
| 23 |
print(f"Agent returning fixed answer: {fixed_answer}")
|
| 24 |
return fixed_answer
|
|
|
|
| 15 |
# --- Basic Agent Definition ---
|
| 16 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 17 |
class BasicAgent:
|
| 18 |
+
def __init__(self, model=None, tools=None):
|
| 19 |
+
self.model = model
|
| 20 |
+
self.tools = tools if tools is not None else []
|
| 21 |
print("BasicAgent initialized.")
|
| 22 |
+
|
| 23 |
def __call__(self, question: str) -> str:
|
| 24 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 25 |
+
# Implement your agent logic here using self.model and self.tools
|
| 26 |
fixed_answer = "This is a default answer."
|
| 27 |
print(f"Agent returning fixed answer: {fixed_answer}")
|
| 28 |
return fixed_answer
|