Spaces:
Sleeping
Sleeping
Fix the AssertionError about count
Browse files```
Traceback (most recent call last):
File "/home/user/app/app.py", line 29, in <module>
soccer_news_tool = SoccerNewsTool()
File "/usr/local/lib/python3.10/site-packages/smolagents/tools.py", line 68, in new_init
self.validate_arguments()
File "/usr/local/lib/python3.10/site-packages/smolagents/tools.py", line 184, in validate_arguments
assert "nullable" in value, (
AssertionError: Nullable argument 'count' in function signature should have key 'nullable' set to True in inputs.
```
tools.py
CHANGED
@@ -67,6 +67,7 @@ class SoccerNewsTool(Tool):
|
|
67 |
"count": {
|
68 |
"type": "integer",
|
69 |
"description": "How many headlines to return (1-20, default 5).",
|
|
|
70 |
"default": 5,
|
71 |
}
|
72 |
}
|
|
|
67 |
"count": {
|
68 |
"type": "integer",
|
69 |
"description": "How many headlines to return (1-20, default 5).",
|
70 |
+
"nullable": True,
|
71 |
"default": 5,
|
72 |
}
|
73 |
}
|