Spaces:
Sleeping
Sleeping
Fix requirements, clean up agent config and dead code
Browse files- Add python-dotenv to requirements.txt
- Remove redundant ddgs dependency
- Set max_steps=8 and verbosity_level=0 on CodeAgent
- Remove dead commented code in __call__
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- app.py +4 -7
- requirements.txt +2 -2
app.py
CHANGED
|
@@ -23,15 +23,12 @@ class BasicAgent:
|
|
| 23 |
self.agent = CodeAgent(
|
| 24 |
model=model,
|
| 25 |
tools=[DuckDuckGoSearchTool(), WikipediaSearchTool(user_agent="BasicAgent/1.0")],
|
| 26 |
-
max_steps=
|
|
|
|
| 27 |
)
|
|
|
|
| 28 |
def __call__(self, question: str) -> str:
|
| 29 |
-
|
| 30 |
-
# fixed_answer = "This is a default answer."
|
| 31 |
-
# print(f"Agent returning fixed answer: {fixed_answer}")
|
| 32 |
-
# return fixed_answer
|
| 33 |
-
response = self.agent.run(question)
|
| 34 |
-
return str(response) # run returns an object, we must cast it to str
|
| 35 |
|
| 36 |
|
| 37 |
|
|
|
|
| 23 |
self.agent = CodeAgent(
|
| 24 |
model=model,
|
| 25 |
tools=[DuckDuckGoSearchTool(), WikipediaSearchTool(user_agent="BasicAgent/1.0")],
|
| 26 |
+
max_steps=8,
|
| 27 |
+
verbosity_level=0,
|
| 28 |
)
|
| 29 |
+
|
| 30 |
def __call__(self, question: str) -> str:
|
| 31 |
+
return str(self.agent.run(question))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
|
| 34 |
|
requirements.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
gradio
|
| 2 |
requests
|
| 3 |
smolagents
|
| 4 |
-
|
| 5 |
-
|
|
|
|
| 1 |
gradio
|
| 2 |
requests
|
| 3 |
smolagents
|
| 4 |
+
wikipedia-api
|
| 5 |
+
python-dotenv
|